fixed the spawn lamp crashing

Closes #80
This commit is contained in:
Ellpeck 2020-02-16 15:18:15 +01:00
parent 5d94984aa5
commit df1b703534

View file

@ -54,6 +54,8 @@ public class BlockSpawnLamp extends BlockContainerImpl implements IVisualizable,
return; return;
IWorld world = event.getWorld(); IWorld world = event.getWorld();
BlockPos pos = new BlockPos(event.getX(), event.getY(), event.getZ()); BlockPos pos = new BlockPos(event.getX(), event.getY(), event.getZ());
if (!(world instanceof World))
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) {
int range = lamp.getRadius(); int range = lamp.getRadius();