Procedure on light level update

Published by BIue on
Status
Fixed
Issue description

Is there a way to detect a change in light level, and run a procedure, without using update tick? If not, can you please consider adding this as a feature?

Issue comments

You can do this. Use tick update to trigger procedure, store old light value in NBT tag of the block, use current light value for difference calculation and then store current value in the said NBT tag.

There is no mechanic in actual Minecraft for detecting light value without checking for it each tick. Imagine the whole logic would calculate all light changes each tick for all blocks in Minecraft or all blocks in the visible range, the lag would be unimaginable.

I was trying to make an ore that would only be visible in the darkness, but I didn't want to use on tick update since that seems to lag when you add too many complicated procedures together for tick update, constantly happening in the world.

Only checking for light level should not be that bad if there are not too many blocks of that type loaded at the same time.