mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-27 15:23:16 +00:00
Merge pull request #123 from Thorfusion/103-bug-crash-when-connecting-power-cable-to-railcraft-steam-engine
add nullcheck to fix crash #103
This commit is contained in:
1 file changed
+4
-1
@@ -262,6 +262,9 @@ public abstract class TileEntitySidedPipe extends TileEntity implements ITileNet
|
||||
if (!CapabilityUtils.hasCapability(tile, Capabilities.BLOCKABLE_CONNECTION_CAPABILITY, side.getOpposite())) {
|
||||
return true;
|
||||
}
|
||||
if (Capabilities.BLOCKABLE_CONNECTION_CAPABILITY == null) {
|
||||
return false;
|
||||
}
|
||||
return CapabilityUtils.getCapability(tile, Capabilities.BLOCKABLE_CONNECTION_CAPABILITY, side.getOpposite()).canConnect(side.getOpposite());
|
||||
}
|
||||
|
||||
@@ -652,4 +655,4 @@ public abstract class TileEntitySidedPipe extends TileEntity implements ITileNet
|
||||
return "mekanism.pipe.connectiontype." + getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user