From 72688f7ea4dee3154273408cc9e7d2782871632e Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Sat, 31 Oct 2015 22:26:29 -0400 Subject: [PATCH] Fix Erebus recipes --- packs/Erebus/build.gradle | 2 +- .../packs/erebus/core/ModRecipes.java | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packs/Erebus/build.gradle b/packs/Erebus/build.gradle index ad654b7..3c2f75a 100644 --- a/packs/Erebus/build.gradle +++ b/packs/Erebus/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "1.7.10-1.0.2" +version = "1.7.10-1.0.3" group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "StorageDrawers-Erebus" diff --git a/packs/Erebus/src/com/jaquadro/minecraft/storagedrawers/packs/erebus/core/ModRecipes.java b/packs/Erebus/src/com/jaquadro/minecraft/storagedrawers/packs/erebus/core/ModRecipes.java index 107b339..39aa467 100644 --- a/packs/Erebus/src/com/jaquadro/minecraft/storagedrawers/packs/erebus/core/ModRecipes.java +++ b/packs/Erebus/src/com/jaquadro/minecraft/storagedrawers/packs/erebus/core/ModRecipes.java @@ -35,24 +35,29 @@ public class ModRecipes if (!resolver.isValidMetaValue(i)) continue; - if (resolver.getUnlocalizedName(i).equals("scorched")) + int src = i; + if (resolver.getUnlocalizedName(i).equals("scorched")) { planks = GameRegistry.findBlock("erebus", "planks_scorched"); - else if (resolver.getUnlocalizedName(i).equals("varnished")) + src = 0; + } + else if (resolver.getUnlocalizedName(i).equals("varnished")) { planks = GameRegistry.findBlock("erebus", "planks_varnished"); + src = 0; + } if (planks != null) { if (blockConfig.isBlockEnabled(nameFull1)) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.fullDrawers1, blockConfig.getBlockRecipeOutput(nameFull1), i), "xxx", " y ", "xxx", - 'x', new ItemStack(planks, 1, i), 'y', "chestWood")); + 'x', new ItemStack(planks, 1, src), 'y', "chestWood")); if (blockConfig.isBlockEnabled(nameFull2)) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.fullDrawers2, blockConfig.getBlockRecipeOutput(nameFull2), i), "xyx", "xxx", "xyx", - 'x', new ItemStack(planks, 1, i), 'y', "chestWood")); + 'x', new ItemStack(planks, 1, src), 'y', "chestWood")); if (blockConfig.isBlockEnabled(nameFull4)) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.fullDrawers4, blockConfig.getBlockRecipeOutput(nameFull4), i), "yxy", "xxx", "yxy", - 'x', new ItemStack(planks, 1, i), 'y', "chestWood")); + 'x', new ItemStack(planks, 1, src), 'y', "chestWood")); if (blockConfig.isBlockEnabled(nameTrim)) { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.trim, blockConfig.getBlockRecipeOutput(nameTrim), i), "xyx", "yyy", "xyx", - 'x', "stickWood", 'y', new ItemStack(planks, 1, i))); + 'x', "stickWood", 'y', new ItemStack(planks, 1, src))); } }