Fix tile marker crash

This commit is contained in:
Prototik 2014-05-27 16:18:22 +08:00
parent ae43e9cdb9
commit 173db45f4b

View file

@ -10,6 +10,7 @@ package buildcraft.builders;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import buildcraft.BuildCraftBuilders; import buildcraft.BuildCraftBuilders;
@ -54,7 +55,10 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider {
} }
if (marker == null) { if (marker == null) {
marker = (TileMarker) world.getTileEntity(x, y, z); TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileMarker) {
marker = (TileMarker) tile;
}
} }
return marker; return marker;