Ender IO Zoo

Ender IO Zoo

964k Downloads

Power Advantage drain + EnderIO fluid tank crash

OhiraKyou opened this issue ยท 3 comments

commented

Sucking water from a Power Advantage drain into an EnderIO fluid tank causes a crash then and on subsequent world loading attempts.

I am also posting this report to the Power Advantage issues.

Data

Crash log
Screenshots with steps
Example world that crashes on load (489 KB)

Versions

Minecraft

  • Minecraft 1.9.4
  • Forge 1.9.4-12.17.0.1951

EnderIO

  • EnderIO 1.9.4-3.0.0.37_alpha
  • EnderCore 1.9.4-0.4.0.23

Power Advantage

  • OreSpawn 1.9.4-1.0.2
  • BaseMetals 1.9.4-2.3.2.6
  • PowerAdvantage 1.9.4-2.2.1
commented

Our code here is:

    if(tank.getFluidAmount() > 0) {
      FluidStack canPull = tank.getFluid().copy();
      canPull.amount = tank.getCapacity() - tank.getFluidAmount();
      canPull.amount = Math.min(canPull.amount, IO_MB_TICK);
      FluidStack drained = target.drain(dir.getOpposite(), canPull, true); <--- 107
      if(drained != null && drained.amount > 0) {
        tank.fill(drained, true);
        tankDirty = true;
        return res;
      }

I see no way we could give something null-crashable into that call, unless the tank had a null fluid in it. Which would be near impossible as FluidStacks react quite violently to be created with a null fluid.

PS: please link the sister issue, thx.

commented
commented

I've looked at their code and found the problem. Closing this ticket.