Skip to content

Commit

Permalink
Fix old door recipes not being removed when buff is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadhog360 committed Jan 3, 2024
1 parent e84ae18 commit d549a57
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/ganymedes01/etfuturum/recipes/ModRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit d549a57

Please sign in to comment.