use of forestry.api.lepidopterology.EnumFlutterType in project ForestryMC by ForestryMC.
the class ButterflyRoot method getMemberStack.
@Override
public ItemStack getMemberStack(IIndividual butterfly, ISpeciesType type) {
Preconditions.checkArgument(type instanceof EnumFlutterType);
ItemRegistryLepidopterology items = ModuleLepidopterology.getItems();
Preconditions.checkState(items != null);
Item butterflyItem;
switch((EnumFlutterType) type) {
case SERUM:
butterflyItem = items.serumGE;
break;
case CATERPILLAR:
butterflyItem = items.caterpillarGE;
break;
case COCOON:
butterflyItem = items.cocoonGE;
break;
case BUTTERFLY:
default:
butterflyItem = items.butterflyGE;
break;
}
NBTTagCompound nbttagcompound = new NBTTagCompound();
butterfly.writeToNBT(nbttagcompound);
ItemStack stack = new ItemStack(butterflyItem);
stack.setTagCompound(nbttagcompound);
if (type == EnumFlutterType.CATERPILLAR) {
ItemButterflyGE.setAge(stack, 0);
}
return stack;
}
Aggregations