Version of Advanced Rocketry
2.2.14
Have you verified this is an issue in the latest unstable build
Version of LibVulpes
0.5.7
Version of Minecraft
1.12.2
Does this occur without other mods installed
If Y, what is the MINIMUM set of mods required.
Crash report or log or visualVM (if applicable)
https://mclo.gs/bEQg12L
Description of the problem
The dedicated server crashes during the server tick loop with a NullPointerException in LibVulpes:
Cannot invoke "net.minecraftforge.fluids.FluidStack.isFluidEqual(net.minecraftforge.fluids.FluidStack)" because "resource" is null
Stack trace points to:
zmaster587.libVulpes.tile.multiblock.hatch.TileFluidHatch.drain(TileFluidHatch.java:114)
zmaster587.libVulpes.cap.FluidCapability.drain(FluidCapability.java:27)
appeng.fluids.parts.FluidHandlerAdapter$InventoryCache.update(FluidHandlerAdapter.java:198)
appeng.fluids.parts.PartFluidStorageBus.getInventoryWrapper(PartFluidStorageBus.java:372)
appeng.fluids.parts.PartFluidStorageBus.getInternalHandler(PartFluidStorageBus.java:421)
appeng.fluids.parts.PartFluidStorageBus.getCellArray(PartFluidStorageBus.java:491)
appeng.me.cache.GridStorageCache.addCellProvider(GridStorageCache.java:153)
appeng.me.cache.GridStorageCache.cellUpdate(GridStorageCache.java:205)
It appears that AE2's fluid storage bus is updating/scanning the LibVulpes fluid hatch and calls drain with a null FluidStack resource. Per Forge's IFluidHandler, drain(null, ...) is a valid way to query/drain any fluid. TileFluidHatch.drain does not handle a null resource and calls resource.isFluidEqual(...), causing the server crash.
Reproduction
- Use Minecraft 1.12.2 with Advanced Rocketry 2.2.14 and LibVulpes 0.5.7.
- Have Applied Energistics 2 / AE2 fluid integration installed, e.g. AE2 UEL v0.56.7 with fluid storage bus support.
- Place an Advanced Rocketry / LibVulpes multiblock fluid hatch.
- Connect an AE2 fluid storage bus to the fluid hatch.
- Power/update the ME network, or let the network update the storage bus.
- The server crashes in the tick loop with the above NPE.
Expected behavior
TileFluidHatch.drain should handle a null FluidStack resource safely, as expected by Forge's fluid handler API, or at least not crash the server.
Actual behavior
Server crashes due to NullPointerException in TileFluidHatch.drain.
Additional environment
- Modpack: Enigmatica 2- Expert - Extended, Version 1.87.1
Version of Advanced Rocketry
2.2.14
Have you verified this is an issue in the latest unstable build
Version of LibVulpes
0.5.7
Version of Minecraft
1.12.2
Does this occur without other mods installed
Crash report or log or visualVM (if applicable)
https://mclo.gs/bEQg12L
Description of the problem
The dedicated server crashes during the server tick loop with a
NullPointerExceptionin LibVulpes:Cannot invoke "net.minecraftforge.fluids.FluidStack.isFluidEqual(net.minecraftforge.fluids.FluidStack)" because "resource" is nullStack trace points to:
zmaster587.libVulpes.tile.multiblock.hatch.TileFluidHatch.drain(TileFluidHatch.java:114)zmaster587.libVulpes.cap.FluidCapability.drain(FluidCapability.java:27)appeng.fluids.parts.FluidHandlerAdapter$InventoryCache.update(FluidHandlerAdapter.java:198)appeng.fluids.parts.PartFluidStorageBus.getInventoryWrapper(PartFluidStorageBus.java:372)appeng.fluids.parts.PartFluidStorageBus.getInternalHandler(PartFluidStorageBus.java:421)appeng.fluids.parts.PartFluidStorageBus.getCellArray(PartFluidStorageBus.java:491)appeng.me.cache.GridStorageCache.addCellProvider(GridStorageCache.java:153)appeng.me.cache.GridStorageCache.cellUpdate(GridStorageCache.java:205)It appears that AE2's fluid storage bus is updating/scanning the LibVulpes fluid hatch and calls
drainwith a nullFluidStack resource. Per Forge'sIFluidHandler,drain(null, ...)is a valid way to query/drain any fluid.TileFluidHatch.draindoes not handle a nullresourceand callsresource.isFluidEqual(...), causing the server crash.Reproduction
Expected behavior
TileFluidHatch.drainshould handle a nullFluidStack resourcesafely, as expected by Forge's fluid handler API, or at least not crash the server.Actual behavior
Server crashes due to
NullPointerExceptioninTileFluidHatch.drain.Additional environment