diff --git a/helpers/DualityInterface.java b/helpers/DualityInterface.java index 4100db0d0..3aab7feac 100644 --- a/helpers/DualityInterface.java +++ b/helpers/DualityInterface.java @@ -55,6 +55,12 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt mySrc = fluids.changeSource = items.changeSource = new MachineSource( iHost ); } + @Override + public void saveChanges() + { + iHost.saveChanges(); + } + private void readConfig() { boolean hadConfig = hasConfig; @@ -354,8 +360,8 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt public boolean hasWorkToDo() { - return requireWork[0] != null || requireWork[1] != null || requireWork[2] != null || requireWork[3] != null || requireWork[4] != null - || requireWork[5] != null || requireWork[6] != null || requireWork[7] != null; + return requireWork[0] != null || requireWork[1] != null || requireWork[2] != null || requireWork[3] != null || requireWork[4] != null || requireWork[5] != null + || requireWork[6] != null || requireWork[7] != null; } private boolean updateStorage() diff --git a/helpers/IInterfaceHost.java b/helpers/IInterfaceHost.java index d27196ee3..2d1c22a0a 100644 --- a/helpers/IInterfaceHost.java +++ b/helpers/IInterfaceHost.java @@ -9,4 +9,6 @@ public interface IInterfaceHost extends IActionHost DualityInterface getInterfaceDuality(); TileEntity getTileEntity(); + + void saveChanges(); } diff --git a/parts/AEBasePart.java b/parts/AEBasePart.java index 35bbd909d..6689d0118 100644 --- a/parts/AEBasePart.java +++ b/parts/AEBasePart.java @@ -320,4 +320,8 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea return what == BusSupport.CABLE; } + public void saveChanges() + { + host.markForSave(); + } } \ No newline at end of file diff --git a/parts/automation/UpgradeInventory.java b/parts/automation/UpgradeInventory.java index 759e43218..37c54aa9f 100644 --- a/parts/automation/UpgradeInventory.java +++ b/parts/automation/UpgradeInventory.java @@ -172,4 +172,10 @@ public class UpgradeInventory extends AppEngInternalInventory implements IAEAppE parent.onChangeInventory( inv, slot, mc, removedStack, newStack ); } + @Override + public void saveChanges() + { + parent.saveChanges(); + } + } diff --git a/tile/AEBaseTile.java b/tile/AEBaseTile.java index 59318416f..13d45081e 100644 --- a/tile/AEBaseTile.java +++ b/tile/AEBaseTile.java @@ -340,4 +340,10 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile worldObj.destroyBlock( xCoord, yCoord, zCoord, true ); dropItems = false; } + + public void saveChanges() + { + super.onInventoryChanged(); + } + } diff --git a/tile/inventory/AppEngInternalInventory.java b/tile/inventory/AppEngInternalInventory.java index 83d121d10..40a2d1d19 100644 --- a/tile/inventory/AppEngInternalInventory.java +++ b/tile/inventory/AppEngInternalInventory.java @@ -78,6 +78,7 @@ public class AppEngInternalInventory implements IInventory, Iterable te.onChangeInventory( this, slot, InvOperation.decrStackSize, ns, null ); } + onInventoryChanged(); return ns; } @@ -122,6 +123,8 @@ public class AppEngInternalInventory implements IInventory, Iterable } te.onChangeInventory( this, slot, InvOperation.setInventorySlotContents, removed, added ); + + onInventoryChanged(); } } diff --git a/tile/inventory/IAEAppEngInventory.java b/tile/inventory/IAEAppEngInventory.java index cbedca223..a0d9bc6ca 100644 --- a/tile/inventory/IAEAppEngInventory.java +++ b/tile/inventory/IAEAppEngInventory.java @@ -6,6 +6,8 @@ import net.minecraft.item.ItemStack; public interface IAEAppEngInventory { + void saveChanges(); + void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack); }