Package forestry.api.arboriculture

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


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

    tree.writeToNBT(nbttagcompound);
    return nbttagcompound;
  }

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

        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.