Search in sources :

Example 1 with TankInfo

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);
            }
        }
    }
}
Also used : ITankMachine(binnie.core.machines.power.ITankMachine) TankInfo(binnie.core.machines.power.TankInfo)

Example 2 with TankInfo

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);
}
Also used : TankInfo(binnie.core.machines.power.TankInfo)

Aggregations

TankInfo (binnie.core.machines.power.TankInfo)2 ITankMachine (binnie.core.machines.power.ITankMachine)1