Search in sources :

Example 6 with INBT

use of net.minecraft.nbt.INBT in project BluePower by Qmunity.

the class TileBlulectricAlloyFurnace method writeToPacketNBT.

@Override
public void writeToPacketNBT(CompoundNBT tag) {
    super.writeToPacketNBT(tag);
    tag.putInt("currentProcessTime", currentProcessTime);
    tag.putBoolean("isActive", isActive);
    INBT nbtstorage = CapabilityBlutricity.BLUTRICITY_CAPABILITY.getStorage().writeNBT(CapabilityBlutricity.BLUTRICITY_CAPABILITY, storage, null);
    tag.put("energy", nbtstorage);
}
Also used : INBT(net.minecraft.nbt.INBT)

Example 7 with INBT

use of net.minecraft.nbt.INBT in project BluePower by Qmunity.

the class TileBlulectricAlloyFurnace method readFromPacketNBT.

@Override
public void readFromPacketNBT(CompoundNBT tag) {
    super.readFromPacketNBT(tag);
    isActive = tag.getBoolean("isActive");
    currentProcessTime = tag.getInt("currentProcessTime");
    markForRenderUpdate();
    if (tag.contains("energy")) {
        INBT nbtstorage = tag.get("energy");
        CapabilityBlutricity.BLUTRICITY_CAPABILITY.getStorage().readNBT(CapabilityBlutricity.BLUTRICITY_CAPABILITY, storage, null, nbtstorage);
    }
}
Also used : INBT(net.minecraft.nbt.INBT)

Example 8 with INBT

use of net.minecraft.nbt.INBT in project BluePower by Qmunity.

the class TileBlulectricFurnace method readFromPacketNBT.

@Override
public void readFromPacketNBT(CompoundNBT tag) {
    super.readFromPacketNBT(tag);
    isActive = tag.getBoolean("isActive");
    currentProcessTime = tag.getInt("currentProcessTime");
    markForRenderUpdate();
    if (tag.contains("energy")) {
        INBT nbtstorage = tag.get("energy");
        CapabilityBlutricity.BLUTRICITY_CAPABILITY.getStorage().readNBT(CapabilityBlutricity.BLUTRICITY_CAPABILITY, storage, null, nbtstorage);
    }
}
Also used : INBT(net.minecraft.nbt.INBT)

Example 9 with INBT

use of net.minecraft.nbt.INBT in project BluePower by Qmunity.

the class TileBattery method readFromPacketNBT.

@Override
protected void readFromPacketNBT(CompoundNBT tCompound) {
    super.readFromPacketNBT(tCompound);
    if (tCompound.contains("energy")) {
        INBT nbtstorage = tCompound.get("energy");
        CapabilityBlutricity.BLUTRICITY_CAPABILITY.getStorage().readNBT(CapabilityBlutricity.BLUTRICITY_CAPABILITY, storage, null, nbtstorage);
    }
}
Also used : INBT(net.minecraft.nbt.INBT)

Example 10 with INBT

use of net.minecraft.nbt.INBT in project BluePower by Qmunity.

the class TileBlulectricCable method readFromPacketNBT.

@Override
protected void readFromPacketNBT(CompoundNBT tCompound) {
    super.readFromPacketNBT(tCompound);
    if (tCompound.contains("energy")) {
        INBT nbtstorage = tCompound.get("energy");
        CapabilityBlutricity.BLUTRICITY_CAPABILITY.getStorage().readNBT(CapabilityBlutricity.BLUTRICITY_CAPABILITY, storage, null, nbtstorage);
    }
}
Also used : INBT(net.minecraft.nbt.INBT)

Aggregations

INBT (net.minecraft.nbt.INBT)14