Examples of writeToNBT()


Examples of com.pahimar.ee3.settings.ChalkSettings.writeToNBT()

                {
                    chalkSettings.rotateCounterClockwise();
                }
            }

            chalkSettings.writeToNBT(playerCustomData);
            EntityHelper.saveCustomEntityData(entityPlayer, playerCustomData);
            PacketHandler.INSTANCE.sendTo(new MessageChalkSettings(chalkSettings), (EntityPlayerMP) entityPlayer);
        }
    }
View Full Code Here

Examples of com.pahimar.ee3.skill.PlayerKnowledge.writeToNBT()

    {
        if (this.canLearnItemStack())
        {
            PlayerKnowledge playerKnowledge = PlayerKnowledge.readPlayerKnowledgeFromNBT(this.inventory[TOME_SLOT_INVENTORY_INDEX].getTagCompound());
            playerKnowledge.learnItemStack(this.inventory[ITEM_SLOT_INVENTORY_INDEX]);
            playerKnowledge.writeToNBT(this.inventory[TOME_SLOT_INVENTORY_INDEX].getTagCompound());

            this.inventory[ITEM_SLOT_INVENTORY_INDEX].stackSize--;

            if (this.inventory[ITEM_SLOT_INVENTORY_INDEX].stackSize <= 0)
            {
View Full Code Here

Examples of erogenousbeef.bigreactors.common.data.ReactantStack.writeToNBT()

  protected NBTTagCompound writeToNBT(NBTTagCompound destination) {
    ReactantStack stack;
    for(int i = 0; i < tankNames.length; i++) {
      stack = tanks[i];
      if(stack != null) {
        destination.setTag(tankNames[i], stack.writeToNBT(new NBTTagCompound()));
      }
    }
   
    return destination;
  }
View Full Code Here

Examples of forestry.api.apiculture.IBee.writeToNBT()

      IBee imprint = getSelectedBee();
      if (imprint == null)
        return;

      NBTTagCompound nbttagcompound = new NBTTagCompound();
      imprint.writeToNBT(nbttagcompound);
      inventoryStacks[specimenSlot].setTagCompound(nbttagcompound);

      inventoryStacks[imprintedSlot] = inventoryStacks[specimenSlot];
      inventoryStacks[specimenSlot] = null;
    }
View Full Code Here

Examples of forestry.api.apiculture.IBee.writeToNBT()

          PluginApiculture.beeInterface.getBreedingTracker(player.worldObj, player.getGameProfile()).registerSpecies(bee.getGenome().getPrimary());
          PluginApiculture.beeInterface.getBreedingTracker(player.worldObj, player.getGameProfile()).registerSpecies(bee.getGenome().getSecondary());
        }

        NBTTagCompound nbttagcompound = new NBTTagCompound();
        bee.writeToNBT(nbttagcompound);
        getStackInSlot(SLOT_SPECIMEN).setTagCompound(nbttagcompound);

        // Decrease energy
        decrStackSize(SLOT_ENERGY, 1);
      }
View Full Code Here

Examples of forestry.api.apiculture.IBee.writeToNBT()

    // Age the queen
    queen.age(housing.getWorld(), housing.getLifespanModifier(queen.getGenome(), queen.getMate(), 0f));

    // Write the changed queen back into the item stack.
    NBTTagCompound nbttagcompound = new NBTTagCompound();
    queen.writeToNBT(nbttagcompound);
    housing.getQueen().setTagCompound(nbttagcompound);

    return;
  }
View Full Code Here

Examples of forestry.api.apiculture.IBee.writeToNBT()

    case PRINCESS:
      beeItem = ForestryItem.beePrincessGE.getItemStack();
      break;
    }
    NBTTagCompound nbtTagCompound = new NBTTagCompound();
    bee.writeToNBT(nbtTagCompound);
    beeItem.setTagCompound(nbtTagCompound);

    return beeItem;
  }
View Full Code Here

Examples of forestry.api.arboriculture.ITree.writeToNBT()

      break;
    case SAPLING:
      treeItem = ForestryItem.sapling.getItemStack();
    }
    NBTTagCompound nbtTagCompound = new NBTTagCompound();
    tree.writeToNBT(nbtTagCompound);
    treeItem.setTagCompound(nbtTagCompound);
    return treeItem;
  }
}
View Full Code Here

Examples of forestry.api.arboriculture.ITree.writeToNBT()

    NBTTagCompound nbttagcompound = new NBTTagCompound();
    if (tree == null)
      return nbttagcompound;

    tree.writeToNBT(nbttagcompound);
    return nbttagcompound;
  }

  @SideOnly(Side.CLIENT)
  @Override
View Full Code Here

Examples of forestry.api.arboriculture.ITree.writeToNBT()

        if (player != null) {
          PluginArboriculture.treeInterface.getBreedingTracker(player.worldObj, player.getGameProfile()).registerSpecies(tree.getGenome().getPrimary());
          PluginArboriculture.treeInterface.getBreedingTracker(player.worldObj, player.getGameProfile()).registerSpecies(tree.getGenome().getSecondary());
        }
        NBTTagCompound nbttagcompound = new NBTTagCompound();
        tree.writeToNBT(nbttagcompound);
        getStackInSlot(SLOT_SPECIMEN).setTagCompound(nbttagcompound);

        // Decrease energy
        decrStackSize(SLOT_ENERGY, 1);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.