mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-12 00:07:29 +00:00
fix npe from two storage bus facing each other
This commit is contained in:
1 parent
4d236cb898
commit
fc9893ac32
1 file changed
+4
-2
+4
-2
@@ -25,9 +25,11 @@ public class AEFluidInterfaceHandler implements IExternalStorageHandler {
|
||||
@SuppressWarnings("rawtypes")
|
||||
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src) {
|
||||
if (channel == StorageChannel.FLUIDS) {
|
||||
if (te instanceof ITileStorageMonitorable) {
|
||||
if (te instanceof ITileStorageMonitorable
|
||||
&& ((ITileStorageMonitorable) te).getMonitorable(d, src) != null) {
|
||||
return ((ITileStorageMonitorable) te).getMonitorable(d, src).getFluidInventory();
|
||||
} else if (Util.getPart(te, d.getOpposite()) instanceof ITileStorageMonitorable) {
|
||||
} else if (Util.getPart(te, d.getOpposite()) instanceof ITileStorageMonitorable
|
||||
&& ((ITileStorageMonitorable) Util.getPart(te, d.getOpposite())).getMonitorable(d, src) != null) {
|
||||
ITileStorageMonitorable part = (ITileStorageMonitorable) Util.getPart(te, d.getOpposite());
|
||||
return part.getMonitorable(d, src).getFluidInventory();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user