Fixed crashed in #214 #215

This commit is contained in:
CrazyPants committed 2013-10-28 12:45:44 +08:00
1 parent 4dcb30110a
commit 67bf8d0f2d
2 files changed
+11 -1

No files matched your search

@@ -293,7 +293,11 @@ public abstract class AbstractMachineBlock<T extends AbstractMachineEntity> exte
}
private boolean isActive(IBlockAccess blockAccess, int x, int y, int z) {
return ((AbstractMachineEntity) blockAccess.getBlockTileEntity(x, y, z)).isActive();
TileEntity te = blockAccess.getBlockTileEntity(x, y, z);
if(te instanceof AbstractMachineEntity) {
return ((AbstractMachineEntity) te).isActive();
}
return false;
}
}