From 7362592d729f15e7c102ac3f6250056cb612df4a Mon Sep 17 00:00:00 2001 From: Gugle Date: Tue, 2 Apr 2024 01:16:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E7=89=A9?= =?UTF-8?q?=E5=93=81=E8=86=A8=E5=8F=91=E9=85=8D=E6=96=B9=E8=80=97=E6=B0=B4?= =?UTF-8?q?=E8=BF=87=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BulgingAndCrystallizeRecipesGenerator.java | 12 ++++++------ .../anvilcraft/data/recipe/anvil/AnvilRecipe.java | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/dev/dubhe/anvilcraft/data/generator/recipe/BulgingAndCrystallizeRecipesGenerator.java b/src/main/java/dev/dubhe/anvilcraft/data/generator/recipe/BulgingAndCrystallizeRecipesGenerator.java index 3111db85a..f4369f109 100644 --- a/src/main/java/dev/dubhe/anvilcraft/data/generator/recipe/BulgingAndCrystallizeRecipesGenerator.java +++ b/src/main/java/dev/dubhe/anvilcraft/data/generator/recipe/BulgingAndCrystallizeRecipesGenerator.java @@ -46,7 +46,7 @@ public static void bulging(Item item, Item item1, Consumer expor .spawnItem(new Vec3(0.0, -1.0, 0.0), item1) .setBlock(Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 2)) .unlockedBy(MyRecipesGenerator.hasItem(item), FabricRecipeProvider.has(item)) - .save(exporter, AnvilCraft.of("bulging/" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_3")); + .save(exporter, AnvilCraft.of("bulging/"+ BuiltInRegistries.ITEM.getKey(item).getPath() + "_2_" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_3")); AnvilRecipe.Builder.create(RecipeCategory.MISC) .icon(item1) .hasBlock(Blocks.WATER_CAULDRON, new Vec3(0.0, -1.0, 0.0), Map.entry(LayeredCauldronBlock.LEVEL, 2)) @@ -54,7 +54,7 @@ public static void bulging(Item item, Item item1, Consumer expor .spawnItem(new Vec3(0.0, -1.0, 0.0), item1) .setBlock(Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 1)) .unlockedBy(MyRecipesGenerator.hasItem(item), FabricRecipeProvider.has(item)) - .save(exporter, AnvilCraft.of("bulging/" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_2")); + .save(exporter, AnvilCraft.of("bulging/" + BuiltInRegistries.ITEM.getKey(item).getPath() + "_2_" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_2")); AnvilRecipe.Builder.create(RecipeCategory.MISC) .icon(item1) .hasBlock(Blocks.WATER_CAULDRON, new Vec3(0.0, -1.0, 0.0), Map.entry(LayeredCauldronBlock.LEVEL, 1)) @@ -62,7 +62,7 @@ public static void bulging(Item item, Item item1, Consumer expor .spawnItem(new Vec3(0.0, -1.0, 0.0), item1) .setBlock(Blocks.CAULDRON) .unlockedBy(MyRecipesGenerator.hasItem(item), FabricRecipeProvider.has(item)) - .save(exporter, AnvilCraft.of("bulging/" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_1")); + .save(exporter, AnvilCraft.of("bulging/" + BuiltInRegistries.ITEM.getKey(item).getPath() + "_2_" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_1")); } public static void crystallize(Item item, Item item1, Consumer exporter) { @@ -73,7 +73,7 @@ public static void crystallize(Item item, Item item1, Consumer e .spawnItem(new Vec3(0.0, -1.0, 0.0), item1) .setBlock(Blocks.POWDER_SNOW_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 2)) .unlockedBy(MyRecipesGenerator.hasItem(item), FabricRecipeProvider.has(item)) - .save(exporter, AnvilCraft.of("crystallize/" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_3")); + .save(exporter, AnvilCraft.of("crystallize/" + BuiltInRegistries.ITEM.getKey(item).getPath() + "_2_" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_3")); AnvilRecipe.Builder.create(RecipeCategory.MISC) .icon(item1) .hasBlock(Blocks.POWDER_SNOW_CAULDRON, new Vec3(0.0, -1.0, 0.0), Map.entry(LayeredCauldronBlock.LEVEL, 2)) @@ -81,7 +81,7 @@ public static void crystallize(Item item, Item item1, Consumer e .spawnItem(new Vec3(0.0, -1.0, 0.0), item1) .setBlock(Blocks.POWDER_SNOW_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 1)) .unlockedBy(MyRecipesGenerator.hasItem(item), FabricRecipeProvider.has(item)) - .save(exporter, AnvilCraft.of("crystallize/" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_2")); + .save(exporter, AnvilCraft.of("crystallize/" + BuiltInRegistries.ITEM.getKey(item).getPath() + "_2_" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_2")); AnvilRecipe.Builder.create(RecipeCategory.MISC) .icon(item1) .hasBlock(Blocks.POWDER_SNOW_CAULDRON, new Vec3(0.0, -1.0, 0.0), Map.entry(LayeredCauldronBlock.LEVEL, 1)) @@ -89,6 +89,6 @@ public static void crystallize(Item item, Item item1, Consumer e .spawnItem(new Vec3(0.0, -1.0, 0.0), item1) .setBlock(Blocks.CAULDRON) .unlockedBy(MyRecipesGenerator.hasItem(item), FabricRecipeProvider.has(item)) - .save(exporter, AnvilCraft.of("crystallize/" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_1")); + .save(exporter, AnvilCraft.of("crystallize/" + BuiltInRegistries.ITEM.getKey(item).getPath() + "_2_" + BuiltInRegistries.ITEM.getKey(item1).getPath() + "_1")); } } diff --git a/src/main/java/dev/dubhe/anvilcraft/data/recipe/anvil/AnvilRecipe.java b/src/main/java/dev/dubhe/anvilcraft/data/recipe/anvil/AnvilRecipe.java index 78fdfbacb..348ba9e18 100644 --- a/src/main/java/dev/dubhe/anvilcraft/data/recipe/anvil/AnvilRecipe.java +++ b/src/main/java/dev/dubhe/anvilcraft/data/recipe/anvil/AnvilRecipe.java @@ -317,6 +317,7 @@ private Builder(RecipeCategory category, ItemStack icon) { for (Map.Entry, Comparable> entry : states) { properties.hasProperty(entry.getKey(), entry.getValue().toString()); } + blockPredicate.setProperties(properties.build()); return this.addPredicates(new HasBlock(offset, blockPredicate.build())); }