mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fix crash caused by placing piles immediately adjacent to RBMKs
This commit is contained in:
parent
bb84ebe209
commit
a6b1a9068b
@ -65,7 +65,7 @@ public class PileNeutronHandler {
|
||||
TileEntity tile;
|
||||
|
||||
NeutronNode node = NeutronNodeWorld.getNode(worldObj, nodePos);
|
||||
if(node != null) {
|
||||
if(node != null && node instanceof PileNeutronNode) {
|
||||
tile = node.tile;
|
||||
} else {
|
||||
tile = blockPosToTE(worldObj, nodePos);
|
||||
|
||||
@ -222,7 +222,7 @@ public class RBMKNeutronHandler {
|
||||
pos.mutate(origin.tile.xCoord + x, origin.tile.yCoord, origin.tile.zCoord + z);
|
||||
|
||||
NeutronNode node = NeutronNodeWorld.getNode(world, pos);
|
||||
if(node != null) {
|
||||
if(node != null && node instanceof RBMKNeutronNode) {
|
||||
positions[i - 1] = node;
|
||||
} else if(this.origin.tile.getBlockType() instanceof RBMKBase) {
|
||||
TileEntity te = blockPosToTE(world, pos);
|
||||
@ -292,7 +292,7 @@ public class RBMKNeutronHandler {
|
||||
|
||||
RBMKType type = (RBMKType) targetNode.data.get("type");
|
||||
|
||||
if(type == RBMKType.OTHER) // pass right on by!
|
||||
if(type == RBMKType.OTHER || type == null) // pass right on by!
|
||||
continue;
|
||||
|
||||
// we established earlier during `getNodes()` that they should all be RBMKBase TEs
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user