mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-26 06:53:24 +00:00
Fix: NPE on kamikaze fluid container
This commit is contained in:
1 parent
f928709e52
commit
5d446e10c6
1 file changed
+4
-2
@@ -346,7 +346,7 @@ public class TileTank extends AbstractMachineEntity implements IFluidHandler, IT
|
||||
|
||||
int slot = getSlotDefinition().getMinOutputSlot();
|
||||
|
||||
if (inventory[slot] != null) {
|
||||
if (inventory[slot] != null && fill.result.itemStack != null) {
|
||||
if (inventory[slot].isStackable() && ItemUtil.areStackMergable(inventory[slot], fill.result.itemStack)
|
||||
&& inventory[slot].stackSize < inventory[slot].getMaxStackSize()) {
|
||||
fill.result.itemStack.stackSize += inventory[slot].stackSize;
|
||||
@@ -357,7 +357,9 @@ public class TileTank extends AbstractMachineEntity implements IFluidHandler, IT
|
||||
|
||||
getInputTank(fill.result.fluidStack).setFluid(fill.remainder.fluidStack);
|
||||
setInventorySlotContents(getSlotDefinition().getMinInputSlot(), fill.remainder.itemStack);
|
||||
setInventorySlotContents(slot, fill.result.itemStack);
|
||||
if (fill.result.itemStack != null) {
|
||||
setInventorySlotContents(slot, fill.result.itemStack);
|
||||
}
|
||||
|
||||
setTanksDirty();
|
||||
markDirty();
|
||||
|
||||
Reference in new issue
Block a user