Tile Saving
This commit is contained in:
parent
08e232ec63
commit
ac365b28c6
7 changed files with 31 additions and 2 deletions
|
@ -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()
|
||||
|
|
|
@ -9,4 +9,6 @@ public interface IInterfaceHost extends IActionHost
|
|||
DualityInterface getInterfaceDuality();
|
||||
|
||||
TileEntity getTileEntity();
|
||||
|
||||
void saveChanges();
|
||||
}
|
||||
|
|
|
@ -320,4 +320,8 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
|||
return what == BusSupport.CABLE;
|
||||
}
|
||||
|
||||
public void saveChanges()
|
||||
{
|
||||
host.markForSave();
|
||||
}
|
||||
}
|
|
@ -172,4 +172,10 @@ public class UpgradeInventory extends AppEngInternalInventory implements IAEAppE
|
|||
parent.onChangeInventory( inv, slot, mc, removedStack, newStack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChanges()
|
||||
{
|
||||
parent.saveChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
|
|||
te.onChangeInventory( this, slot, InvOperation.decrStackSize, ns, null );
|
||||
}
|
||||
|
||||
onInventoryChanged();
|
||||
return ns;
|
||||
}
|
||||
|
||||
|
@ -122,6 +123,8 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
|
|||
}
|
||||
|
||||
te.onChangeInventory( this, slot, InvOperation.setInventorySlotContents, removed, added );
|
||||
|
||||
onInventoryChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue