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);
}
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);
}
}
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);
}
}
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);
}
}
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);
}
Aggregations