From d549a57ddea4fce2a8acbbf79376da2d0a4436ee Mon Sep 17 00:00:00 2001 From: Roadhog360 Date: Tue, 2 Jan 2024 22:28:52 -0600 Subject: [PATCH] Fix old door recipes not being removed when buff is enabled --- .../ganymedes01/etfuturum/recipes/ModRecipes.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/ganymedes01/etfuturum/recipes/ModRecipes.java b/src/main/java/ganymedes01/etfuturum/recipes/ModRecipes.java index 8b6b68a2..b2266cff 100644 --- a/src/main/java/ganymedes01/etfuturum/recipes/ModRecipes.java +++ b/src/main/java/ganymedes01/etfuturum/recipes/ModRecipes.java @@ -99,6 +99,13 @@ private static void tweakRecipes() { Items.iron_door.setMaxStackSize(64); } + if (ConfigFunctions.enableDoorRecipeBuffs) { + removeFirstRecipeFor(Items.wooden_door); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.wooden_door, 3), "xx", "xx", "xx", 'x', "plankWood")); + removeFirstRecipeFor(Items.iron_door); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.iron_door, 3), "xx", "xx", "xx", 'x', "ingotIron")); + } + if (ConfigBlocksItems.enableFences) { removeFirstRecipeFor(Blocks.fence); removeFirstRecipeFor(Blocks.nether_brick_fence); @@ -591,11 +598,6 @@ private static void registerRecipes() { addShapedRecipe(ModBlocks.CHERRY_SIGN.newItemStack(3), "xxx", "xxx", " y ", 'x', ModBlocks.WOOD_PLANKS.newItemStack(1, 3), 'y', "stickWood"); addShapedRecipe(ModBlocks.BAMBOO_SIGN.newItemStack(3), "xxx", "xxx", " y ", 'x', ModBlocks.WOOD_PLANKS.newItemStack(1, 4), 'y', "stickWood"); - if (ConfigFunctions.enableDoorRecipeBuffs) { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.wooden_door, 3), "xx", "xx", "xx", 'x', "plankWood")); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.iron_door, 3), "xx", "xx", "xx", 'x', "ingotIron")); - } - addShapedRecipe(ModBlocks.RED_SANDSTONE.newItemStack(), "xx", "xx", 'x', new ItemStack(Blocks.sand, 1, 1)); addShapedRecipe(ModBlocks.RED_SANDSTONE.newItemStack(1, 1), "x", "x", 'x', ModBlocks.RED_SANDSTONE_SLAB.newItemStack()); addShapedRecipe(ModBlocks.RED_SANDSTONE.newItemStack(4, 2), "xx", "xx", 'x', ModBlocks.RED_SANDSTONE.newItemStack());