コード例 #1
0
  @Override
  public void readCustomNBT(NBTTagCompound nbt, boolean descPacket) {
    super.readCustomNBT(nbt, descPacket);
    facing = nbt.getInteger("facing");
    energyStorage.readFromNBT(nbt);

    tank.readFromNBT(nbt.getCompoundTag("tank"));

    this.inventory = Utils.readInventory(nbt.getTagList("inventory", 10), 5);
    this.predictedOutput = Utils.readInventory(nbt.getTagList("predictedOutput", 10), 5);
    process = nbt.getIntArray("process");
  }
コード例 #2
0
 @Override
 public void readCustomNBT(NBTTagCompound nbt, boolean descPacket) {
   super.readCustomNBT(nbt, descPacket);
   facing = nbt.getInteger("facing");
   tank0.readFromNBT(nbt.getCompoundTag("tank0"));
   tank1.readFromNBT(nbt.getCompoundTag("tank1"));
   tank2.readFromNBT(nbt.getCompoundTag("tank2"));
   energyStorage.readFromNBT(nbt);
   if (!descPacket) {
     inventory = Utils.readInventory(nbt.getTagList("inventory", 10), 6);
   }
 }