Skip to content

Commit

Permalink
Fix npe on fluid conduit connected check (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
lordIcocain authored Jan 2, 2025
1 parent 954f5ee commit 6acffd2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ private boolean isGTMachine(Object o) {
private boolean isFluidConduitConnected(TileEntity te, ForgeDirection dir) {
try {
ILiquidConduit liquidConduit = (ILiquidConduit) eioTypeCheck.invoke(te, ILiquidConduit.class);
return liquidConduit.getConnectionMode(dir.getOpposite()) != ConnectionMode.DISABLED;
return liquidConduit != null
&& liquidConduit.getConnectionMode(dir.getOpposite()) != ConnectionMode.DISABLED;
} catch (IllegalAccessException | InvocationTargetException e) {
return false;
}
Expand Down

0 comments on commit 6acffd2

Please sign in to comment.