Real Filing Cabinet

Real Filing Cabinet

11M Downloads

Extracting fluids from Filing Cabinet can cause crashes

tommyTT opened this issue ยท 2 comments

commented

My setup is as followes:

  • Filing Cabinet with one folder containing lava
  • Setup a network with Integrated Tunnels that exports the lava from the cabinet to another machine (e.g. a tank or generator).
  • Apply the fluid upgrade to the filing cabinet.
  • The game crashes.

The logs are here:
Crash: https://hastebin.com/hegurafixi
Latest: https://hastebin.com/karosowuza

My analysis of the code:
The Integrated Tunnels code doesn't expect that null is returned when querying the tank properties. The code in FluidRFC however initializes an array that will contain null values if there is no folder in a stack. However, with the latest 1.11 changes to the ItemStack I would say, that the method should put an empty FluidTankProperties instance in the array. I think EmptyFluidHandler.EMPTY_TANK_PROPERTIES would be appropriate here. I might be wrong, since the rules to the fluid stack handling in Forge seem to be different than for the item stack (there doesn't seem to be a FluidStack.EMPTY).

I guess you're somewhat of a pioneer in that way, since I don't know of another block that exposes multiple tanks in one block :) In a somewhat related matter, I discovered that the fluid upgrade and RefinedStorage doesn't seem to work together. The implementation of the external storage from that mod doesn't expect that multiple tanks are connected. I will report an issue there but I thought I should mention it to you.

commented

Hi,
This is a super good bug report and super descriptive. I came across the crash exactly as you have described, and well, it's just something I didn't expect, lol. Not too many mods out there that actually expects to read multiple different fluids in one block.

I've implemented a hotfix that adds the EMPTY_TANK_PROPERTIES as you suggested, as that fixes it crashing with exporters and giving errors in Integrated Dynamic's fluid reader. e6b1021

commented

Thanks for the fix, I'm always happy to help. I will test the new version today. For reference, here is the issue for the Refined Storage interaction with the multi tank blocks: refinedmods/refinedstorage#1034