Log spam with EnderIO non-fluid conduits passing next to GenericTank implementations
smbarbour opened this issue ยท 6 comments
[16:38:49] [Server thread/DEBUG] [OpenMods/]: openmods.liquids.GenericTank.fillFromSides(GenericTank.java:154): Tank class crazypants.enderio.conduit.TileConduitBundle @ (-797,63,795) returned null tank info. Nasty.
Block using GenericTank: OpenBlocks sprinkler.
There is no liquid conduit in that block, no. The sprinkler in question is pulling its water from a pressure pipes water source below it.
Can you confirm that the block you are looking at in that screenshot is in fact (-797,63,795)
Debug mode (F3) will tell you the location of the block you are looking at.
From what I can tell this is caused by
https://github.com/SleepyTrousers/EnderIO/blob/master/src/main/java/crazypants/enderio/conduit/TileConduitBundle.java#L773
As well as a lack of Null check at our end.
I do believe the returned array should be empty, not null, when a tank is not available.
A null check at our end will fix this though.
Looking at the API here:
https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/java/net/minecraftforge/fluids/IFluidHandler.java#L73-L81
Does not say if null is valid or invalid for return. I can only assume it's invalid.
Oops, we do the null check, that's exactly what we are seeing here.
https://github.com/OpenMods/OpenModsLib/blob/master/src/main/java/openmods/liquids/GenericTank.java#L153-L157
Our end is working as expected.
Raise an issue with the EnderIO team regarding returning an empty TankInfo array instead of null.
If they insist that null is valid, I will just silence the console output at our end. Nothing is overly broken in OpenMods by this issue, and the library is only warning you that EnderIO might be misbehaving.
I've popped open an issue with MinecraftForge.
MinecraftForge/MinecraftForge#2085
When they clarify the API's intended use, OpenMods will follow that. EnderIO will have to follow.