use of binnie.core.machines.power.TankInfo in project Binnie by ForestryMC.
the class ContainerCraftGUI method sendTankChanges.
private void sendTankChanges() {
ITankMachine tanks = Machine.getInterface(ITankMachine.class, this.window.getInventory());
if (tanks != null && this.window.isServer()) {
for (int i = 0; i < tanks.getTankInfos().length; ++i) {
final TankInfo tank = tanks.getTankInfos()[i];
if (!this.getTankInfo(i).equals(tank)) {
this.syncedNBT.put("tank-update-" + i, this.createTankNBT(i, tank));
this.syncedTanks.put(i, tank);
}
}
}
}
use of binnie.core.machines.power.TankInfo in project Binnie by ForestryMC.
the class ContainerCraftGUI method onTankUpdate.
public void onTankUpdate(final NBTTagCompound nbt) {
final int tankID = nbt.getByte("tank");
final TankInfo tank = new TankInfo();
tank.readFromNBT(nbt);
this.syncedTanks.put(tankID, tank);
}
Aggregations