#Is there any documentation for the new Block Entity feature ?

18 messages · Page 1 of 1 (latest)

rapid crystal
#

a

frigid gateBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

main forum
#

currently no

rapid crystal
frank fjordBOT
#

ProbeJS is an addon mod for KubeJS that generates typings files for VSCode, allowing VSCode to offer autocompletions for a ton of things!

Mod by @uncut sluice

sterile walrus
#

This will prob help you the most

rapid crystal
#

yeaaaaaahhhhhhhhhhhhh

#

but how do i start it in the first place

frank fjordBOT
#
lat

[Quote ➤](#future-vision message) ## kubejs I'm working on adding custom BlockEntities to KubeJS!
And custom screens/menus. It's still WIP, and only for 1.20.1, but you will be able to do stuff like this:
https://i.latvian.dev/pc/2023-09-11_22.18.55.mp4

Code used for demo:

StartupEvents.registry('block', event => {
    event.create('machine_block').soundType('netherite_block').blockEntity(entityInfo => {
        entityInfo.inventory(9, 4) // create inventory to 9x4 / 36 slots
        entityInfo.rightClickOpensInventory() // Right-clicking on entity opens its inventory

        entityInfo.clientTick(12, 0, entity => { // Tick on client side only. 12, 0 = every 12 ticks with offset 0 (tick % 12 == 0)
            entity.level.addParticle('minecraft:campfire_cosy_smoke', true, entity.x + 0.5, entity.y + 1.05, entity.z + 0.5, 0, 0.3, 0)
        })

        entityInfo.serverTick(20, 0, entity => { // Tick on server side only
            entity.inventory.insertItem('minecraft:apple', false)
        })
    })
})
fickle swift
#

read the example that Lat posted here

rapid crystal
#

oh cool

fickle swift
#

was about to release it but since you asked let's delay it to next month

rapid crystal
#

ANOTHER MONTH AGAIN

#

omg