Fixed crash with External Storage, fixes #1490
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
### 1.5.21
|
||||
- Updated Portuguese (Brazilian) translation (Pinz714)
|
||||
- Fixed crash with External Storage (raoulvdberge)
|
||||
|
||||
### 1.5.20
|
||||
- Restore MC 1.12.0 compatibility (raoulvdberge)
|
||||
|
@@ -88,10 +88,14 @@ public class BlockExternalStorage extends BlockCable {
|
||||
super.neighborChanged(state, world, pos, block, fromPos);
|
||||
|
||||
if (!world.isRemote) {
|
||||
NetworkNodeExternalStorage externalStorage = ((TileExternalStorage) world.getTileEntity(pos)).getNode();
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
if (externalStorage.getNetwork() != null) {
|
||||
externalStorage.updateStorage(externalStorage.getNetwork());
|
||||
if (tile instanceof TileExternalStorage) {
|
||||
NetworkNodeExternalStorage externalStorage = ((TileExternalStorage) tile).getNode();
|
||||
|
||||
if (externalStorage.getNetwork() != null) {
|
||||
externalStorage.updateStorage(externalStorage.getNetwork());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user