Skip to content

Commit

Permalink
Fix npe on fluid conduit connected check (#255)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6acffd2)
  • Loading branch information
lordIcocain authored and Dream-Master committed Feb 23, 2025
1 parent a046633 commit 2814cbf
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 2814cbf

Please sign in to comment.