Search in sources :

Example 1 with INBT

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

the class TileEngine method writeToPacketNBT.

@Override
protected void writeToPacketNBT(CompoundNBT compound) {
    super.writeToPacketNBT(compound);
    int rotation = orientation.get3DDataValue();
    compound.putInt("rotation", rotation);
    compound.putByte("pumpspeed", pumpSpeed);
    compound.putByte("pumptick", pumpTick);
    INBT nbtstorage = CapabilityBlutricity.BLUTRICITY_CAPABILITY.getStorage().writeNBT(CapabilityBlutricity.BLUTRICITY_CAPABILITY, storage, null);
    compound.put("energy", nbtstorage);
}
Also used : INBT(net.minecraft.nbt.INBT)

Example 2 with INBT

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

the class TileEngine method readFromPacketNBT.

@Override
protected void readFromPacketNBT(CompoundNBT compound) {
    super.readFromPacketNBT(compound);
    orientation = Direction.from3DDataValue(compound.getInt("rotation"));
    pumpSpeed = compound.getByte("pumpspeed");
    pumpTick = compound.getByte("pumptick");
    if (compound.contains("energy")) {
        INBT nbtstorage = compound.get("energy");
        CapabilityBlutricity.BLUTRICITY_CAPABILITY.getStorage().readNBT(CapabilityBlutricity.BLUTRICITY_CAPABILITY, storage, null, nbtstorage);
    }
}
Also used : INBT(net.minecraft.nbt.INBT)

Example 3 with INBT

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

the class TileSolarPanel 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 4 with INBT

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

the class TileThermopile 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 5 with INBT

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

the class TileBattery method writeToPacketNBT.

@Override
protected void writeToPacketNBT(CompoundNBT tCompound) {
    super.writeToPacketNBT(tCompound);
    INBT nbtstorage = CapabilityBlutricity.BLUTRICITY_CAPABILITY.getStorage().writeNBT(CapabilityBlutricity.BLUTRICITY_CAPABILITY, storage, null);
    tCompound.put("energy", nbtstorage);
}
Also used : INBT(net.minecraft.nbt.INBT)

Aggregations

INBT (net.minecraft.nbt.INBT)14