ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLimeTemplate(), EnumGermlingType.POLLEN), 1, 2, 3));
}
}
private ItemStack getTreeItemFromTemplate(IAllele[] template, EnumGermlingType type) {
ITree tree = new Tree(PluginArboriculture.treeInterface.templateAsGenome(template));
ItemStack treeItem;
switch (type) {
default:
case POLLEN:
treeItem = ForestryItem.pollenFertile.getItemStack();
break;
case SAPLING:
treeItem = ForestryItem.sapling.getItemStack();
}
NBTTagCompound nbtTagCompound = new NBTTagCompound();
tree.writeToNBT(nbtTagCompound);
treeItem.setTagCompound(nbtTagCompound);
return treeItem;
}