ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getBeeItemFromTemplate(BeeTemplates.getCommonTemplate(), EnumBeeType.DRONE), 1, 2, 8));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getBeeItemFromTemplate(BeeTemplates.getMeadowsTemplate(), EnumBeeType.PRINCESS), 1, 1, 5));
}
private ItemStack getBeeItemFromTemplate(IAllele[] template, EnumBeeType beeType) {
IBee bee = new Bee(PluginApiculture.beeInterface.templateAsGenome(template));
ItemStack beeItem;
switch (beeType) {
default:
case DRONE:
beeItem = ForestryItem.beeDroneGE.getItemStack();
break;
case PRINCESS:
beeItem = ForestryItem.beePrincessGE.getItemStack();
break;
}
NBTTagCompound nbtTagCompound = new NBTTagCompound();
bee.writeToNBT(nbtTagCompound);
beeItem.setTagCompound(nbtTagCompound);
return beeItem;
}