Skip to content

Commit

Permalink
fix fluid interface doesn't update fluid after copied from memory card
Browse files Browse the repository at this point in the history
  • Loading branch information
GlodBlock committed Jun 3, 2023
1 parent 5134ca9 commit 8054e81
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import appeng.fluids.helper.DualityFluidInterface;
import appeng.fluids.helper.IFluidInterfaceHost;
import appeng.fluids.util.AEFluidInventory;
import appeng.fluids.util.IAEFluidInventory;
import appeng.helpers.DualityInterface;
import appeng.helpers.IInterfaceHost;
import appeng.items.misc.ItemEncodedPattern;
Expand Down Expand Up @@ -255,7 +256,13 @@ public void uploadSettings(NBTTagCompound compound, EntityPlayer player) {
}
final IFluidHandler fluidInv = this.fluidDuality.getFluidInventoryByName("config");
if (fluidInv instanceof AEFluidInventory) {
((AEFluidInventory) fluidInv).readFromNBT(compound, "fluid_config");
AEFluidInventory target = (AEFluidInventory) fluidInv;
AEFluidInventory tmp = new AEFluidInventory(null, target.getSlots());
tmp.readFromNBT(compound, "fluid_config");

for(int x = 0; x < tmp.getSlots(); x++) {
target.setFluidInSlot(x, tmp.getFluidInSlot(x));
}
}
}

Expand Down

0 comments on commit 8054e81

Please sign in to comment.