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())); }