From 5a4dbfb453d8dd09bca2833df4a1bb1ddbf46305 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 23 Jul 2020 16:33:06 +0200 Subject: [PATCH] Fixed spawn lamp behavior sometimes persisting without the lamps being present Closes #131 --- .../java/de/ellpeck/naturesaura/blocks/BlockSpawnLamp.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockSpawnLamp.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockSpawnLamp.java index 137efce4..9774b719 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockSpawnLamp.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockSpawnLamp.java @@ -58,6 +58,9 @@ public class BlockSpawnLamp extends BlockContainerImpl implements IVisualizable, return; WorldData data = (WorldData) IWorldData.getWorldData((World) world); for (TileEntitySpawnLamp lamp : data.spawnLamps) { + if (lamp.isRemoved()) + continue; + int range = lamp.getRadius(); if (range <= 0) continue;