Skip to content

Commit

Permalink
Merge pull request #123 from Thorfusion/103-bug-crash-when-connecting…
Browse files Browse the repository at this point in the history
…-power-cable-to-railcraft-steam-engine

add nullcheck to fix crash #103
  • Loading branch information
maggi373 committed May 25, 2023
2 parents abb487e + 057c41a commit 0c68d5f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ public boolean canConnectMutual(EnumFacing side) {
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());
}

Expand Down Expand Up @@ -652,4 +655,4 @@ public String translationKey() {
return "mekanism.pipe.connectiontype." + getName();
}
}
}
}

0 comments on commit 0c68d5f

Please sign in to comment.