Fixed crash with Detector, fixes #1390

This commit is contained in:
raoulvdberge
2017-07-27 21:37:31 +02:00
parent 0b5604fc09
commit d25a3e975e
2 changed files with 4 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
### 1.5.14
- Fixed more crashes relating to scrollbar in GUIs (raoulvdberge)
- Fixed crash with Detector (raoulvdberge)
- A Solderer with Speed Upgrades is now 2 times faster (raoulvdberge)
### 1.5.13

View File

@@ -53,7 +53,9 @@ public class BlockDetector extends BlockNode {
@Override
@SuppressWarnings("deprecation")
public int getWeakPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
return ((TileDetector) world.getTileEntity(pos)).getNode().isPowered() ? 15 : 0;
TileEntity tile = world.getTileEntity(pos);
return (tile instanceof TileDetector && ((TileDetector) tile).getNode().isPowered()) ? 15 : 0;
}
@Override