KubeJS

KubeJS

69M Downloads

Block Update Event

crthpl opened this issue ยท 2 comments

commented

Describe the feature

A 'block.update' event, where you could register a callback for a block that is called with the level, block, current blockstate and position, and returns an updated blockstate.

Additional info

I am trying to make stacking snow layers from primal winter turn into snow blocks at depths higher than two blocks, which would return the same blockstate, but change the block two blocks below.

commented

Block updates happen ridiculously often, I'm not sure how laggy this could potentially be.

A potential alternative would be to add the ability to have a block update callback on custom blocks.

commented

I think it should be of the form event.register('namespace:block', callback), so you can also modify vanilla blocks.