LightAPI icon indicating copy to clipboard operation
LightAPI copied to clipboard

Lights disappear on block update

Open Rincewind34 opened this issue 4 years ago • 1 comments

The lights I create are deleted, when I place a block directly next to the block, that holds the light. Is this a known bug?

Rincewind34 avatar Nov 28 '20 04:11 Rincewind34

Hi It is not a bug. It is а shortcoming :worried:

LightAPI does not create permanent lights. It does not store any "hidden" light source blocks in chunk, because there are no such blocks in minecraft. Therefore, bukkit will recalculate light again when updates nearby blocks. It is as if you have set a block with stationary water (9) somewhere, and it will be stationary until you set any block nearby, after which the water begins to spread.

Also bukkit will remove light if you set another light nearby,

To set permanent light sources consider to use plugin ValLight https://www.spigotmc.org/resources/varlight.65268/ I have not used this plugin, but as I understood, it stores light sources in separate files like bukkit stores data in mca-files. Therefore they must be permanent.

Or (with LightAPI) you should monitor the block where you have set light and set light again if it was deleted.

Qveshn avatar Nov 30 '20 05:11 Qveshn