Merge pull request #1854 from Prototik/tile-marker-crash
Fix tile marker crash
This commit is contained in:
commit
10e7429847
1 changed files with 5 additions and 1 deletions
|
@ -10,6 +10,7 @@ package buildcraft.builders;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
|
@ -54,7 +55,10 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider {
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue