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