From b45c460a014bdd447da437d1d33db30b8b62798e Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Sat, 31 Oct 2015 22:26:39 -0400 Subject: [PATCH] Fix Forestry recipes --- packs/Forestry/build.gradle | 2 +- .../packs/forestry/core/ModRecipes.java | 44 +++++++++++-------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/packs/Forestry/build.gradle b/packs/Forestry/build.gradle index a11da24..126361f 100644 --- a/packs/Forestry/build.gradle +++ b/packs/Forestry/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "1.7.10-1.0.3" +version = "1.7.10-1.0.4" group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "StorageDrawers-Forestry" diff --git a/packs/Forestry/src/com/jaquadro/minecraft/storagedrawers/packs/forestry/core/ModRecipes.java b/packs/Forestry/src/com/jaquadro/minecraft/storagedrawers/packs/forestry/core/ModRecipes.java index d875ed8..d5ad019 100644 --- a/packs/Forestry/src/com/jaquadro/minecraft/storagedrawers/packs/forestry/core/ModRecipes.java +++ b/packs/Forestry/src/com/jaquadro/minecraft/storagedrawers/packs/forestry/core/ModRecipes.java @@ -27,9 +27,15 @@ public class ModRecipes String nameHalf4 = blockConfig.getBlockConfigName(BlockConfiguration.BasicHalf4); String nameTrim = blockConfig.getBlockConfigName(BlockConfiguration.Trim); - Block[] planksSet = new Block[] { - GameRegistry.findBlock("Forestry", "planks"), - GameRegistry.findBlock("Forestry", "planks2") + Block[][] planksSet = new Block[][] { + new Block[] { + GameRegistry.findBlock("Forestry", "planks"), + GameRegistry.findBlock("Forestry", "fireproofPlanks1") + }, + new Block [] { + GameRegistry.findBlock("Forestry", "planks2"), + GameRegistry.findBlock("Forestry", "fireproofPlanks2") + } }; Block[][] slabsSet = new Block[][] { @@ -53,25 +59,27 @@ public class ModRecipes IPackDataResolver[] resolver = new IPackDataResolver[] { StorageDrawersPack.instance.resolver1, StorageDrawersPack.instance.resolver2 }; for (int p = 0; p < resolver.length; p++) { - Block planks = planksSet[p]; + Block[] planksGroup = planksSet[p]; for (int i = 0; i < 16; i++) { - if (resolver[p].isValidMetaValue(i)) + if (!resolver[p].isValidMetaValue(i)) continue; - if (planks != null) { - if (blockConfig.isBlockEnabled(nameFull1)) - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(fullDrawers1[p], blockConfig.getBlockRecipeOutput(nameFull1), i), "xxx", " y ", "xxx", - 'x', new ItemStack(planks, 1, i), 'y', "chestWood")); - if (blockConfig.isBlockEnabled(nameFull2)) - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(fullDrawers2[p], blockConfig.getBlockRecipeOutput(nameFull2), i), "xyx", "xxx", "xyx", - 'x', new ItemStack(planks, 1, i), 'y', "chestWood")); - if (blockConfig.isBlockEnabled(nameFull4)) - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(fullDrawers4[p], blockConfig.getBlockRecipeOutput(nameFull4), i), "yxy", "xxx", "yxy", - 'x', new ItemStack(planks, 1, i), 'y', "chestWood")); - if (blockConfig.isBlockEnabled(nameTrim)) { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(trim[p], blockConfig.getBlockRecipeOutput(nameTrim), i), "xyx", "yyy", "xyx", - 'x', "stickWood", 'y', new ItemStack(planks, 1, i))); + for (Block planks : planksGroup) { + if (planks != null) { + if (blockConfig.isBlockEnabled(nameFull1)) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(fullDrawers1[p], blockConfig.getBlockRecipeOutput(nameFull1), i), "xxx", " y ", "xxx", + 'x', new ItemStack(planks, 1, i), 'y', "chestWood")); + if (blockConfig.isBlockEnabled(nameFull2)) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(fullDrawers2[p], blockConfig.getBlockRecipeOutput(nameFull2), i), "xyx", "xxx", "xyx", + 'x', new ItemStack(planks, 1, i), 'y', "chestWood")); + if (blockConfig.isBlockEnabled(nameFull4)) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(fullDrawers4[p], blockConfig.getBlockRecipeOutput(nameFull4), i), "yxy", "xxx", "yxy", + 'x', new ItemStack(planks, 1, i), 'y', "chestWood")); + if (blockConfig.isBlockEnabled(nameTrim)) { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(trim[p], blockConfig.getBlockRecipeOutput(nameTrim), i), "xyx", "yyy", "xyx", + 'x', "stickWood", 'y', new ItemStack(planks, 1, i))); + } } }