use of forestry.apiculture.blocks.BlockRegistryApiculture in project ForestryMC by ForestryMC.
the class ModuleBackpacks method registerRecipes.
@Override
public void registerRecipes() {
ItemRegistryBackpacks items = getItems();
if (items.apiaristBackpack != null && ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.APICULTURE))) {
BlockRegistryApiculture beeBlocks = ModuleApiculture.getBlocks();
addBackpackRecipe("bee", items.apiaristBackpack, "stickWood", beeBlocks.beeChest);
}
if (items.lepidopteristBackpack != null && ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.LEPIDOPTEROLOGY))) {
BlockRegistryLepidopterology butterflyBlocks = ModuleLepidopterology.getBlocks();
ItemStack chest = new ItemStack(butterflyBlocks.butterflyChest);
addBackpackRecipe("butterfly", items.lepidopteristBackpack, "stickWood", chest);
}
addBackpackRecipe("mining", items.minerBackpack, "ingotIron");
addBackpackRecipe("digging", items.diggerBackpack, "stone");
addBackpackRecipe("foresting", items.foresterBackpack, "logWood");
addBackpackRecipe("hunting", items.hunterBackpack, Items.FEATHER);
addBackpackRecipe("adventuring", items.adventurerBackpack, Items.BONE);
addBackpackRecipe("building", items.builderBackpack, Items.CLAY_BALL);
// / CARPENTER
if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.FACTORY))) {
// / BACKPACKS WOVEN
addT2BackpackRecipe(items.minerBackpack, items.minerBackpackT2);
addT2BackpackRecipe(items.diggerBackpack, items.diggerBackpackT2);
addT2BackpackRecipe(items.foresterBackpack, items.foresterBackpackT2);
addT2BackpackRecipe(items.hunterBackpack, items.hunterBackpackT2);
addT2BackpackRecipe(items.adventurerBackpack, items.adventurerBackpackT2);
addT2BackpackRecipe(items.builderBackpack, items.builderBackpackT2);
}
}
use of forestry.apiculture.blocks.BlockRegistryApiculture in project ForestryMC by ForestryMC.
the class ModuleApiculture method registerRecipes.
@Override
public void registerRecipes() {
ItemRegistryCore coreItems = ModuleCore.getItems();
ItemRegistryFluids fluidItems = ModuleFluids.getItems();
ItemRegistryApiculture items = getItems();
BlockRegistryApiculture blocks = getBlocks();
// / APIARIST'S ARMOR
ItemStack wovenSilk = coreItems.craftingMaterial.getWovenSilk();
RecipeUtil.addRecipe("apiarist_hat", items.apiaristHat, "###", "# #", '#', wovenSilk);
RecipeUtil.addRecipe("apiarist_chest", items.apiaristChest, "# #", "###", "###", '#', wovenSilk);
RecipeUtil.addRecipe("apiarist_legs", items.apiaristLegs, "###", "# #", "# #", '#', wovenSilk);
RecipeUtil.addRecipe("apiarist_boots", items.apiaristBoots, "# #", "# #", '#', wovenSilk);
// / HABITAT LOCATOR
RecipeUtil.addRecipe("habitat_locator", items.habitatLocator, " X ", "X#X", " X ", '#', OreDictUtil.DUST_REDSTONE, 'X', OreDictUtil.INGOT_BRONZE);
// Bees
RecipeUtil.addRecipe("scoop", items.scoop, "#X#", "###", " # ", '#', OreDictUtil.STICK_WOOD, 'X', OreDictUtil.BLOCK_WOOL);
RecipeUtil.addRecipe("smoker", items.smoker, "LS#", "LF#", "###", '#', "ingotTin", 'S', OreDictUtil.STICK_WOOD, 'F', Items.FLINT_AND_STEEL, 'L', OreDictUtil.LEATHER);
RecipeUtil.addRecipe("propolis_to_slime", new ItemStack(Items.SLIME_BALL), "#X#", "#X#", "#X#", '#', items.propolis, 'X', items.pollenCluster.get(EnumPollenCluster.NORMAL, 1));
RecipeUtil.addRecipe("honey_melon", new ItemStack(Items.SPECKLED_MELON), "#X#", "#Y#", "#X#", '#', items.honeyDrop, 'X', items.honeydew, 'Y', Items.MELON);
RecipeUtil.addRecipe("frame_untreated", items.frameUntreated, "###", "#S#", "###", '#', OreDictUtil.STICK_WOOD, 'S', Items.STRING);
RecipeUtil.addRecipe("frame_impregnated", items.frameImpregnated, "###", "#S#", "###", '#', coreItems.stickImpregnated, 'S', Items.STRING);
RecipeUtil.addRecipe("bee_house_minecart", items.minecartBeehouse.getBeeHouseMinecart(), "B", "C", 'B', new ItemStack(blocks.beeHouse), 'C', Items.MINECART);
RecipeUtil.addRecipe("apiary_minecart", items.minecartBeehouse.getApiaryMinecart(), "B", "C", 'B', new ItemStack(blocks.apiary), 'C', Items.MINECART);
for (int blockCount = 0; blockCount < blocks.beeCombs.length; blockCount++) {
BlockHoneyComb block = blocks.beeCombs[blockCount];
for (int blockMeta = 0; blockMeta < EnumHoneyComb.VALUES.length - blockCount * 16; blockMeta++) {
int itemMeta = blockMeta + blockCount * 16;
RecipeUtil.addRecipe("comb." + itemMeta, new ItemStack(block, 1, blockMeta), "###", "###", "###", '#', items.beeComb.get(EnumHoneyComb.get(itemMeta), 1));
}
}
// FOOD STUFF
if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.FOOD))) {
ItemRegistryFood foodItems = ModuleFood.getItems();
RecipeUtil.addRecipe("honeyed_slice", new ItemStack(foodItems.honeyedSlice, 4), "###", "#X#", "###", '#', items.honeyDrop, 'X', Items.BREAD);
RecipeUtil.addRecipe("honey_pot", foodItems.honeyPot, "# #", " X ", "# #", '#', items.honeyDrop, 'X', fluidItems.waxCapsuleEmpty);
RecipeUtil.addRecipe("ambrosia", foodItems.ambrosia, "#Y#", "XXX", "###", '#', items.honeydew, 'X', items.royalJelly, 'Y', fluidItems.waxCapsuleEmpty);
}
// / CAPSULES
int outputCapsuleAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.capsule");
if (outputCapsuleAmount > 0) {
ItemStack capsule = fluidItems.waxCapsuleEmpty.getItemStack(outputCapsuleAmount);
RecipeUtil.addRecipe("wax_capsule", capsule, "###", '#', coreItems.beeswax);
}
int outputRefractoryAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.refractory");
if (outputRefractoryAmount > 0) {
ItemStack capsule = fluidItems.refractoryEmpty.getItemStack(outputRefractoryAmount);
RecipeUtil.addRecipe("refractory_capsule", capsule, "###", '#', coreItems.refractoryWax);
}
// / BITUMINOUS PEAT
RecipeUtil.addRecipe("bituminous_peat", coreItems.bituminousPeat.getItemStack(), " # ", "XYX", " # ", '#', OreDictUtil.DUST_ASH, 'X', coreItems.peat, 'Y', items.propolis);
// / TORCHES
RecipeUtil.addRecipe("beeswax_worth", new ItemStack(Blocks.TORCH, 3), " # ", " # ", " Y ", '#', coreItems.beeswax, 'Y', OreDictUtil.STICK_WOOD);
RecipeUtil.addRecipe("pulsating_mesh", coreItems.craftingMaterial.getPulsatingMesh(), "# #", " # ", "# #", '#', items.propolis.get(EnumPropolis.PULSATING, 1));
// / WAX CAST
RecipeUtil.addRecipe("wax_cast", items.waxCast, "###", "# #", "###", '#', coreItems.beeswax);
// / ALVEARY
ItemStack alvearyPlainBlock = blocks.getAlvearyBlock(BlockAlvearyType.PLAIN);
RecipeUtil.addRecipe("alveary_plain", alvearyPlainBlock, "###", "#X#", "###", 'X', coreItems.impregnatedCasing, '#', coreItems.craftingMaterial.getScentedPaneling());
// SWARMER
RecipeUtil.addRecipe("alveary_swarmer", blocks.getAlvearyBlock(BlockAlvearyType.SWARMER), "#G#", " X ", "#G#", '#', coreItems.tubes.get(EnumElectronTube.DIAMOND, 1), 'X', alvearyPlainBlock, 'G', OreDictUtil.INGOT_GOLD);
// FAN
RecipeUtil.addRecipe("alveary_fan", blocks.getAlvearyBlock(BlockAlvearyType.FAN), "I I", " X ", "I#I", '#', coreItems.tubes.get(EnumElectronTube.GOLD, 1), 'X', alvearyPlainBlock, 'I', OreDictUtil.INGOT_IRON);
// HEATER
RecipeUtil.addRecipe("alveary_heater", blocks.getAlvearyBlock(BlockAlvearyType.HEATER), "#I#", " X ", "YYY", '#', coreItems.tubes.get(EnumElectronTube.GOLD, 1), 'X', alvearyPlainBlock, 'I', OreDictUtil.INGOT_IRON, 'Y', OreDictUtil.STONE);
// HYGROREGULATOR
RecipeUtil.addRecipe("alveary_hygro", blocks.getAlvearyBlock(BlockAlvearyType.HYGRO), "GIG", "GXG", "GIG", 'X', alvearyPlainBlock, 'I', OreDictUtil.INGOT_IRON, 'G', OreDictUtil.BLOCK_GLASS);
// STABILISER
RecipeUtil.addRecipe("alveary_stabiliser", blocks.getAlvearyBlock(BlockAlvearyType.STABILISER), "G G", "GXG", "G G", 'X', alvearyPlainBlock, 'G', OreDictUtil.GEM_QUARTZ);
// SIEVE
RecipeUtil.addRecipe("alveary_sieve", blocks.getAlvearyBlock(BlockAlvearyType.SIEVE), "III", " X ", "WWW", 'X', alvearyPlainBlock, 'I', OreDictUtil.INGOT_IRON, 'W', coreItems.craftingMaterial.getWovenSilk());
if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.FACTORY))) {
// / SQUEEZER
FluidStack honeyDropFluid = Fluids.FOR_HONEY.getFluid(Constants.FLUID_PER_HONEY_DROP);
RecipeManagers.squeezerManager.addRecipe(10, items.honeyDrop.getItemStack(), honeyDropFluid, items.propolis.getItemStack(), 5);
RecipeManagers.squeezerManager.addRecipe(10, items.honeydew.getItemStack(), honeyDropFluid);
ItemStack phosphor = coreItems.phosphor.getItemStack(2);
NonNullList<ItemStack> lavaIngredients = NonNullList.create();
lavaIngredients.add(phosphor);
lavaIngredients.add(new ItemStack(Blocks.SAND));
RecipeManagers.squeezerManager.addRecipe(10, lavaIngredients, new FluidStack(FluidRegistry.LAVA, 2000));
lavaIngredients = NonNullList.create();
lavaIngredients.add(phosphor);
lavaIngredients.add(new ItemStack(Blocks.SAND, 1, 1));
RecipeManagers.squeezerManager.addRecipe(10, lavaIngredients, new FluidStack(FluidRegistry.LAVA, 2000));
lavaIngredients = NonNullList.create();
lavaIngredients.add(phosphor);
lavaIngredients.add(new ItemStack(Blocks.DIRT));
RecipeManagers.squeezerManager.addRecipe(10, lavaIngredients, new FluidStack(FluidRegistry.LAVA, 1600));
// / CARPENTER
RecipeManagers.carpenterManager.addRecipe(50, Fluids.FOR_HONEY.getFluid(500), ItemStack.EMPTY, coreItems.craftingMaterial.getScentedPaneling(), " J ", "###", "WPW", '#', OreDictUtil.PLANK_WOOD, 'J', items.royalJelly, 'W', coreItems.beeswax, 'P', items.pollenCluster.get(EnumPollenCluster.NORMAL, 1));
RecipeManagers.carpenterManager.addRecipe(30, new FluidStack(FluidRegistry.WATER, 600), ItemStack.EMPTY, blocks.candle.getUnlitCandle(24), " X ", "###", "###", '#', coreItems.beeswax, 'X', Items.STRING);
RecipeManagers.carpenterManager.addRecipe(10, new FluidStack(FluidRegistry.WATER, 200), ItemStack.EMPTY, blocks.candle.getUnlitCandle(6), "#X#", '#', coreItems.beeswax, 'X', coreItems.craftingMaterial.getSilkWisp());
RecipeUtil.addShapelessRecipe("candle_unlit_reset", blocks.candle.getUnlitCandle(1), blocks.candle.getUnlitCandle(1));
RecipeUtil.addShapelessRecipe("candle_lit_reset", blocks.candle.getLitCandle(1), blocks.candle.getLitCandle(1));
// / CENTRIFUGE
// Honey combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.HONEY, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.9f));
// Cocoa combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.COCOA, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 1.0f, new ItemStack(Items.DYE, 1, 3), 0.5f));
// Simmering combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.SIMMERING, 1), ImmutableMap.of(coreItems.refractoryWax.getItemStack(), 1.0f, coreItems.phosphor.getItemStack(2), 0.7f));
// Stringy combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.STRINGY, 1), ImmutableMap.of(items.propolis.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.4f));
// Dripping combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.DRIPPING, 1), ImmutableMap.of(items.honeydew.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.4f));
// Frozen combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.FROZEN, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 0.8f, items.honeyDrop.getItemStack(), 0.7f, new ItemStack(Items.SNOWBALL), 0.4f, items.pollenCluster.get(EnumPollenCluster.CRYSTALLINE, 1), 0.2f));
// Silky combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.SILKY, 1), ImmutableMap.of(items.honeyDrop.getItemStack(), 1.0f, items.propolis.get(EnumPropolis.SILKY, 1), 0.8f));
// Parched combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.PARCHED, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.9f));
// Mysterious combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1), ImmutableMap.of(items.propolis.get(EnumPropolis.PULSATING, 1), 1.0f, items.honeyDrop.getItemStack(), 0.4f));
// Irradiated combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), ImmutableMap.of());
// Powdery combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.POWDERY, 1), ImmutableMap.of(items.honeyDrop.getItemStack(), 0.2f, coreItems.beeswax.getItemStack(), 0.2f, new ItemStack(Items.GUNPOWDER), 0.9f));
// Wheaten Combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.WHEATEN, 1), ImmutableMap.of(items.honeyDrop.getItemStack(), 0.2f, coreItems.beeswax.getItemStack(), 0.2f, new ItemStack(Items.WHEAT), 0.8f));
// Mossy Combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.MOSSY, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.9f));
// Mellow Combs
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.MELLOW, 1), ImmutableMap.of(items.honeydew.getItemStack(), 0.6f, coreItems.beeswax.getItemStack(), 0.2f, new ItemStack(Items.QUARTZ), 0.3f));
// Silky Propolis
RecipeManagers.centrifugeManager.addRecipe(5, items.propolis.get(EnumPropolis.SILKY, 1), ImmutableMap.of(coreItems.craftingMaterial.getSilkWisp(), 0.6f, items.propolis.getItemStack(), 0.1f));
// / FERMENTER
RecipeManagers.fermenterManager.addRecipe(items.honeydew.getItemStack(), 500, 1.0f, Fluids.SHORT_MEAD.getFluid(1), Fluids.FOR_HONEY.getFluid(1));
}
RecipeUtil.addRecipe("apiary", blocks.apiary, "XXX", "#C#", "###", 'X', OreDictUtil.SLAB_WOOD, '#', OreDictUtil.PLANK_WOOD, 'C', coreItems.impregnatedCasing);
RecipeUtil.addRecipe("bee_chest", blocks.beeChest, " # ", "XYX", "XXX", '#', OreDictUtil.BLOCK_GLASS, 'X', OreDictUtil.BEE_COMB, 'Y', OreDictUtil.CHEST_WOOD);
RecipeUtil.addRecipe("bee_house", blocks.beeHouse, "XXX", "#C#", "###", 'X', OreDictUtil.SLAB_WOOD, '#', OreDictUtil.PLANK_WOOD, 'C', OreDictUtil.BEE_COMB);
// BREWING RECIPES
BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), items.pollenCluster.get(EnumPollenCluster.NORMAL, 1), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.HEALING));
BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), items.pollenCluster.get(EnumPollenCluster.CRYSTALLINE, 1), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.REGENERATION));
}
use of forestry.apiculture.blocks.BlockRegistryApiculture in project ForestryMC by ForestryMC.
the class ModuleBackpacks method setDefaultsForConfig.
private void setDefaultsForConfig() {
ItemRegistryCore coreItems = ModuleCore.getItems();
backpackAcceptedOreDictRegexpDefaults.put(BackpackManager.MINER_UID, Arrays.asList("obsidian", "ore[A-Z].*", "dust[A-Z].*", "gem[A-Z].*", "ingot[A-Z].*", "nugget[A-Z].*", "crushed[A-Z].*", "cluster[A-Z].*", "denseore[A-Z].*"));
backpackAcceptedOreDictRegexpDefaults.put(BackpackManager.DIGGER_UID, Arrays.asList("cobblestone", "dirt", "gravel", "netherrack", "stone", "stone[A-Z].*", "sand"));
backpackAcceptedOreDictRegexpDefaults.put(BackpackManager.HUNTER_UID, Arrays.asList("bone", "egg", "enderpearl", "feather", "fish[A-Z].*", "gunpowder", "leather", "slimeball", "string"));
backpackAcceptedOreDictRegexpDefaults.put(BackpackManager.FORESTER_UID, Arrays.asList("logWood", "stickWood", "woodStick", "saplingTree", "treeSapling", "vine", "sugarcane", "blockCactus", "crop[A-Z].*", "seed[A-Z].*", "tree[A-Z].*"));
backpackAcceptedOreDictRegexpDefaults.put(BackpackManager.BUILDER_UID, Arrays.asList("block[A-Z].*", "paneGlass[A-Z].*", "slabWood[A-Z].*", "stainedClay[A-Z].*", "stainedGlass[A-Z].*", "stone", "sandstone", OreDictUtil.PLANK_WOOD, OreDictUtil.STAIR_WOOD, OreDictUtil.SLAB_WOOD, OreDictUtil.FENCE_WOOD, OreDictUtil.FENCE_GATE_WOOD, OreDictUtil.TRAPDOOR_WOOD, "glass", "paneGlass", "torch", "chest", "chest[A-Z].*", "workbench", "doorWood"));
backpackAcceptedItemDefaults.put(BackpackManager.MINER_UID, getItemStrings(Arrays.asList(new ItemStack(Blocks.COAL_ORE), new ItemStack(Items.COAL), coreItems.bronzePickaxe.getItemStack(), coreItems.kitPickaxe.getItemStack(), coreItems.brokenBronzePickaxe.getItemStack())));
backpackAcceptedItemDefaults.put(BackpackManager.DIGGER_UID, getItemStrings(Arrays.asList(new ItemStack(Blocks.DIRT, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.FLINT), new ItemStack(Blocks.SANDSTONE, 1, 0), new ItemStack(Items.CLAY_BALL), new ItemStack(Items.SNOWBALL), new ItemStack(Blocks.SOUL_SAND), coreItems.bronzeShovel.getItemStack(), coreItems.kitShovel.getItemStack(), coreItems.brokenBronzeShovel.getItemStack())));
backpackAcceptedItemDefaults.put(BackpackManager.FORESTER_UID, getItemStrings(Arrays.asList(new ItemStack(Blocks.RED_MUSHROOM), new ItemStack(Blocks.BROWN_MUSHROOM), new ItemStack(Blocks.RED_FLOWER, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.YELLOW_FLOWER), new ItemStack(Blocks.TALLGRASS, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.DOUBLE_PLANT, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.PUMPKIN), new ItemStack(Blocks.MELON_BLOCK), new ItemStack(Items.GOLDEN_APPLE), new ItemStack(Items.NETHER_WART), new ItemStack(Items.WHEAT_SEEDS), new ItemStack(Items.PUMPKIN_SEEDS), new ItemStack(Items.MELON_SEEDS), new ItemStack(Items.BEETROOT_SEEDS), new ItemStack(Items.BEETROOT), new ItemStack(Items.CHORUS_FRUIT), new ItemStack(Items.APPLE))));
backpackAcceptedItemDefaults.put(BackpackManager.HUNTER_UID, getItemStrings(Arrays.asList(new ItemStack(Items.BLAZE_POWDER), new ItemStack(Items.BLAZE_ROD), new ItemStack(Items.ROTTEN_FLESH), new ItemStack(Items.SKULL, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.GHAST_TEAR), new ItemStack(Items.GOLD_NUGGET), new ItemStack(Items.ARROW), new ItemStack(Items.SPECTRAL_ARROW), new ItemStack(Items.TIPPED_ARROW), new ItemStack(Items.PORKCHOP), new ItemStack(Items.COOKED_PORKCHOP), new ItemStack(Items.BEEF), new ItemStack(Items.COOKED_BEEF), new ItemStack(Items.CHICKEN), new ItemStack(Items.COOKED_CHICKEN), new ItemStack(Items.MUTTON), new ItemStack(Items.COOKED_MUTTON), new ItemStack(Items.RABBIT), new ItemStack(Items.COOKED_RABBIT), new ItemStack(Items.RABBIT_FOOT), new ItemStack(Items.RABBIT_HIDE), new ItemStack(Items.SPIDER_EYE), new ItemStack(Items.FERMENTED_SPIDER_EYE), new ItemStack(Items.DYE, 1, 0), new ItemStack(Blocks.HAY_BLOCK), new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.ENDER_EYE), new ItemStack(Items.MAGMA_CREAM), new ItemStack(Items.SPECKLED_MELON), new ItemStack(Items.FISH, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.COOKED_FISH, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.LEAD), new ItemStack(Items.FISHING_ROD), new ItemStack(Items.NAME_TAG), new ItemStack(Items.SADDLE), new ItemStack(Items.DIAMOND_HORSE_ARMOR), new ItemStack(Items.GOLDEN_HORSE_ARMOR), new ItemStack(Items.IRON_HORSE_ARMOR))));
backpackAcceptedItemDefaults.put(BackpackManager.BUILDER_UID, getItemStrings(Arrays.asList(new ItemStack(Blocks.REDSTONE_TORCH), new ItemStack(Blocks.REDSTONE_LAMP), new ItemStack(Blocks.SEA_LANTERN), new ItemStack(Blocks.END_ROD), new ItemStack(Blocks.STONEBRICK, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.BRICK_BLOCK), new ItemStack(Blocks.CLAY), new ItemStack(Blocks.HARDENED_CLAY, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.STAINED_HARDENED_CLAY, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.PACKED_ICE), new ItemStack(Blocks.NETHER_BRICK), new ItemStack(Blocks.NETHER_BRICK_FENCE), new ItemStack(Blocks.CRAFTING_TABLE), new ItemStack(Blocks.FURNACE), new ItemStack(Blocks.LEVER), new ItemStack(Blocks.DISPENSER), new ItemStack(Blocks.DROPPER), new ItemStack(Blocks.LADDER), new ItemStack(Blocks.IRON_BARS), new ItemStack(Blocks.QUARTZ_BLOCK, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.QUARTZ_STAIRS), new ItemStack(Blocks.SANDSTONE_STAIRS), new ItemStack(Blocks.RED_SANDSTONE_STAIRS), new ItemStack(Blocks.COBBLESTONE_WALL, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.STONE_BUTTON), new ItemStack(Blocks.WOODEN_BUTTON), new ItemStack(Blocks.STONE_SLAB, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.STONE_SLAB2, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.WOODEN_SLAB, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.PURPUR_BLOCK), new ItemStack(Blocks.PURPUR_PILLAR), new ItemStack(Blocks.PURPUR_STAIRS), new ItemStack(Blocks.PURPUR_SLAB), new ItemStack(Blocks.END_BRICKS), new ItemStack(Blocks.CARPET, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.IRON_TRAPDOOR), new ItemStack(Blocks.STONE_PRESSURE_PLATE), new ItemStack(Blocks.WOODEN_PRESSURE_PLATE), new ItemStack(Blocks.LIGHT_WEIGHTED_PRESSURE_PLATE), new ItemStack(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE), new ItemStack(Items.SIGN), new ItemStack(Items.ITEM_FRAME), new ItemStack(Items.ACACIA_DOOR), new ItemStack(Items.BIRCH_DOOR), new ItemStack(Items.DARK_OAK_DOOR), new ItemStack(Items.IRON_DOOR), new ItemStack(Items.JUNGLE_DOOR), new ItemStack(Items.OAK_DOOR), new ItemStack(Items.SPRUCE_DOOR))));
if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.APICULTURE))) {
BlockRegistryApiculture beeBlocks = ModuleApiculture.getBlocks();
backpackAcceptedItemDefaults.get(BackpackManager.BUILDER_UID).addAll(getItemStrings(Arrays.asList(new ItemStack(beeBlocks.candle, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(beeBlocks.stump, 1, OreDictionary.WILDCARD_VALUE))));
}
// include everything added via the API
BackpackInterface backpackInterface = (BackpackInterface) BackpackManager.backpackInterface;
backpackAcceptedItemDefaults.putAll(backpackInterface.getBackpackAcceptedItems());
}
use of forestry.apiculture.blocks.BlockRegistryApiculture in project ForestryMC by ForestryMC.
the class ModuleApiculture method registerItemsAndBlocks.
@Override
public void registerItemsAndBlocks() {
items = new ItemRegistryApiculture();
blocks = new BlockRegistryApiculture();
}
use of forestry.apiculture.blocks.BlockRegistryApiculture in project ForestryMC by ForestryMC.
the class ModuleApiculture method doInit.
// TODO: Buildcraft for 1.9
// @Override
// public void registerTriggers() {
// ApicultureTriggers.initialize();
// }
@Override
public void doInit() {
File configFile = new File(Forestry.instance.getConfigFolder(), CONFIG_CATEGORY + ".cfg");
LocalizedConfiguration config = new LocalizedConfiguration(configFile, "3.0.0");
if (!Objects.equals(config.getLoadedConfigVersion(), config.getDefinedConfigVersion())) {
boolean deleted = configFile.delete();
if (deleted) {
config = new LocalizedConfiguration(configFile, "3.0.0");
}
}
initFlowerRegistry();
List<IBeekeepingMode> beekeepingModes = BeeManager.beeRoot.getBeekeepingModes();
String[] validBeekeepingModeNames = new String[beekeepingModes.size()];
for (int i = 0; i < beekeepingModes.size(); i++) {
validBeekeepingModeNames[i] = beekeepingModes.get(i).getName();
}
beekeepingMode = config.getStringLocalized("beekeeping", "mode", "NORMAL", validBeekeepingModeNames);
Log.debug("Beekeeping mode read from config: " + beekeepingMode);
secondPrincessChance = config.getFloatLocalized("beekeeping", "second.princess", secondPrincessChance, 0.0f, 100.0f);
maxFlowersSpawnedPerHive = config.getIntLocalized("beekeeping", "flowers.spawn", 20, 0, 1000);
String[] blacklist = config.getStringListLocalized("species", "blacklist", Constants.EMPTY_STRINGS);
parseBeeBlacklist(blacklist);
ticksPerBeeWorkCycle = config.getIntLocalized("beekeeping", "ticks.work", 550, 250, 850);
hivesDamageOnPeaceful = config.getBooleanLocalized("beekeeping", "hivedamage.peaceful", false);
doSelfPollination = config.getBooleanLocalized("beekeeping", "self.pollination", false);
config.save();
// Genetics
createAlleles();
BeeDefinition.initBees();
// Hives
createHives();
registerBeehiveDrops();
ItemRegistryApiculture items = getItems();
BlockRegistryApiculture blocks = getBlocks();
// Inducers for swarmer
BeeManager.inducers.put(items.royalJelly.getItemStack(), 10);
GameRegistry.registerTileEntity(TileAlvearyPlain.class, "forestry.Alveary");
GameRegistry.registerTileEntity(TileHive.class, "forestry.Swarm");
GameRegistry.registerTileEntity(TileAlvearySwarmer.class, "forestry.AlvearySwarmer");
GameRegistry.registerTileEntity(TileAlvearyHeater.class, "forestry.AlvearyHeater");
GameRegistry.registerTileEntity(TileAlvearyFan.class, "forestry.AlvearyFan");
GameRegistry.registerTileEntity(TileAlvearyHygroregulator.class, "forestry.AlvearyHygro");
GameRegistry.registerTileEntity(TileAlvearyStabiliser.class, "forestry.AlvearyStabiliser");
GameRegistry.registerTileEntity(TileAlvearySieve.class, "forestry.AlvearySieve");
GameRegistry.registerTileEntity(TileCandle.class, "forestry.Candle");
ResourceLocation beeHouseCartResource = new ResourceLocation(Constants.MOD_ID, "cart.beehouse");
EntityUtil.registerEntity(beeHouseCartResource, EntityMinecartBeehouse.class, "cart.beehouse", 1, 0x000000, 0xffffff, 256, 3, true);
ResourceLocation apiaryCartResource = new ResourceLocation(Constants.MOD_ID, "cart.apiary");
EntityUtil.registerEntity(apiaryCartResource, EntityMinecartApiary.class, "cart.apiary", 2, 0x000000, 0xffffff, 256, 3, true);
BeeManager.commonVillageBees.add(BeeDefinition.FOREST.getGenome());
BeeManager.commonVillageBees.add(BeeDefinition.MEADOWS.getGenome());
BeeManager.commonVillageBees.add(BeeDefinition.MODEST.getGenome());
BeeManager.commonVillageBees.add(BeeDefinition.MARSHY.getGenome());
BeeManager.commonVillageBees.add(BeeDefinition.WINTRY.getGenome());
BeeManager.commonVillageBees.add(BeeDefinition.TROPICAL.getGenome());
BeeManager.uncommonVillageBees.add(BeeDefinition.FOREST.getRainResist().getGenome());
BeeManager.uncommonVillageBees.add(BeeDefinition.COMMON.getGenome());
BeeManager.uncommonVillageBees.add(BeeDefinition.VALIANT.getGenome());
if (Config.enableVillagers) {
// Register villager stuff
VillageCreationApiculture villageHandler = new VillageCreationApiculture();
VillagerRegistry villagerRegistry = VillagerRegistry.instance();
villagerRegistry.registerVillageCreationHandler(villageHandler);
villagerApiarist = new VillagerRegistry.VillagerProfession(Constants.ID_VILLAGER_APIARIST, Constants.TEXTURE_SKIN_BEEKPEEPER, Constants.TEXTURE_SKIN_ZOMBIE_BEEKPEEPER);
IForgeRegistry<VillagerRegistry.VillagerProfession> villagerProfessions = ForgeRegistries.VILLAGER_PROFESSIONS;
villagerProfessions.register(villagerApiarist);
ItemStack wildcardPrincess = new ItemStack(items.beePrincessGE, 1);
ItemStack wildcardDrone = new ItemStack(items.beeDroneGE, 1);
ItemStack apiary = new ItemStack(blocks.apiary);
ItemStack provenFrames = items.frameProven.getItemStack();
ItemStack monasticDrone = BeeDefinition.MONASTIC.getMemberStack(EnumBeeType.DRONE);
ItemStack endDrone = BeeDefinition.ENDED.getMemberStack(EnumBeeType.DRONE);
ItemStack propolis = new ItemStack(items.propolis, 1);
VillagerRegistry.VillagerCareer apiaristCareer = new VillagerRegistry.VillagerCareer(villagerApiarist, "apiarist");
apiaristCareer.addTrade(1, new VillagerApiaristTrades.GiveRandomCombsForItems(items.beeComb, new ItemStack(Items.WHEAT), new EntityVillager.PriceInfo(8, 12), new EntityVillager.PriceInfo(2, 4)), new VillagerApiaristTrades.GiveRandomCombsForItems(items.beeComb, new ItemStack(Items.CARROT), new EntityVillager.PriceInfo(8, 12), new EntityVillager.PriceInfo(2, 4)), new VillagerApiaristTrades.GiveRandomCombsForItems(items.beeComb, new ItemStack(Items.POTATO), new EntityVillager.PriceInfo(8, 12), new EntityVillager.PriceInfo(2, 4)));
apiaristCareer.addTrade(2, new VillagerTradeLists.GiveItemForEmeralds(new EntityVillager.PriceInfo(1, 4), new ItemStack(items.smoker), null), new VillagerTradeLists.GiveItemForLogsAndEmeralds(apiary, new EntityVillager.PriceInfo(1, 1), new EntityVillager.PriceInfo(16, 32), new EntityVillager.PriceInfo(1, 2)), new VillagerApiaristTrades.GiveRandomHiveDroneForItems(propolis, null, wildcardDrone, new EntityVillager.PriceInfo(2, 4)));
apiaristCareer.addTrade(3, new VillagerTradeLists.GiveEmeraldForItems(wildcardPrincess, null), new VillagerTradeLists.GiveItemForEmeralds(new EntityVillager.PriceInfo(1, 2), provenFrames, new EntityVillager.PriceInfo(1, 6)));
apiaristCareer.addTrade(4, new VillagerTradeLists.GiveItemForItemAndEmerald(wildcardPrincess, null, new EntityVillager.PriceInfo(10, 64), monasticDrone, null), new VillagerTradeLists.GiveItemForTwoItems(wildcardPrincess, null, new ItemStack(Items.ENDER_EYE), new EntityVillager.PriceInfo(12, 16), endDrone, null));
}
blocks.apiary.init();
blocks.beeHouse.init();
blocks.beeChest.init();
}
Aggregations