Fixed spawn lamp behavior sometimes persisting without the lamps being present

Closes #131
This commit is contained in:
Ellpeck 2020-07-23 16:33:06 +02:00
parent d1e445e54d
commit 5a4dbfb453

View file

@ -58,6 +58,9 @@ public class BlockSpawnLamp extends BlockContainerImpl implements IVisualizable,
return; return;
WorldData data = (WorldData) IWorldData.getWorldData((World) world); WorldData data = (WorldData) IWorldData.getWorldData((World) world);
for (TileEntitySpawnLamp lamp : data.spawnLamps) { for (TileEntitySpawnLamp lamp : data.spawnLamps) {
if (lamp.isRemoved())
continue;
int range = lamp.getRadius(); int range = lamp.getRadius();
if (range <= 0) if (range <= 0)
continue; continue;