Fixed crash with Detector, fixes #1390
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
### 1.5.14
|
### 1.5.14
|
||||||
- Fixed more crashes relating to scrollbar in GUIs (raoulvdberge)
|
- 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)
|
- A Solderer with Speed Upgrades is now 2 times faster (raoulvdberge)
|
||||||
|
|
||||||
### 1.5.13
|
### 1.5.13
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ public class BlockDetector extends BlockNode {
|
|||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public int getWeakPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user