Qveshn / LightAPI

Bukkit Library for create invisible light source
Other
29 stars 13 forks source link

Lights disappear on block update #24

Open Rincewind34 opened 3 years ago

Rincewind34 commented 3 years ago

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?

Qveshn commented 3 years ago

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.