use of forestry.lepidopterology.items.ItemRegistryLepidopterology 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;
}
use of forestry.lepidopterology.items.ItemRegistryLepidopterology in project ForestryMC by ForestryMC.
the class ModuleLepidopterology method registerItemsAndBlocks.
@Override
public void registerItemsAndBlocks() {
items = new ItemRegistryLepidopterology();
blocks = new BlockRegistryLepidopterology();
}
use of forestry.lepidopterology.items.ItemRegistryLepidopterology in project ForestryMC by ForestryMC.
the class ButterflyRoot method getType.
@Nullable
@Override
public EnumFlutterType getType(ItemStack stack) {
if (stack.isEmpty()) {
return null;
}
ItemRegistryLepidopterology butterflyItems = ModuleLepidopterology.getItems();
Preconditions.checkState(butterflyItems != null);
Item item = stack.getItem();
if (butterflyItems.butterflyGE == item) {
return EnumFlutterType.BUTTERFLY;
} else if (butterflyItems.serumGE == item) {
return EnumFlutterType.SERUM;
} else if (butterflyItems.caterpillarGE == item) {
return EnumFlutterType.CATERPILLAR;
} else if (butterflyItems.cocoonGE == item) {
return EnumFlutterType.COCOON;
} else {
return null;
}
}
use of forestry.lepidopterology.items.ItemRegistryLepidopterology in project ForestryMC by ForestryMC.
the class ModuleLepidopterology method registerRecipes.
@Override
public void registerRecipes() {
BlockRegistryLepidopterology blocks = getBlocks();
ItemRegistryLepidopterology items = getItems();
ForgeRegistries.RECIPES.register(new MatingRecipe());
RecipeUtil.addRecipe("butterfly_chest", blocks.butterflyChest, " # ", "XYX", "XXX", '#', "blockGlass", 'X', new ItemStack(items.butterflyGE, 1, OreDictionary.WILDCARD_VALUE), 'Y', "chestWood");
}
Aggregations