Skip to content

Commit

Permalink
Merge pull request #130 from Gu-ZT/recipe
Browse files Browse the repository at this point in the history
修复部分物品膨发配方耗水过多
  • Loading branch information
Gu-ZT authored Apr 1, 2024
2 parents b5e96a4 + 7362592 commit 8a4f5bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@ public static void bulging(Item item, Item item1, Consumer<FinishedRecipe> 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))
.hasItemIngredient(new Vec3(0.0, -1.0, 0.0), item)
.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))
.hasItemIngredient(new Vec3(0.0, -1.0, 0.0), item)
.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<FinishedRecipe> exporter) {
Expand All @@ -73,22 +73,22 @@ public static void crystallize(Item item, Item item1, Consumer<FinishedRecipe> 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))
.hasItemIngredient(new Vec3(0.0, -1.0, 0.0), item)
.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))
.hasItemIngredient(new Vec3(0.0, -1.0, 0.0), item)
.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"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ private Builder(RecipeCategory category, ItemStack icon) {
for (Map.Entry<Property<?>, Comparable<?>> entry : states) {
properties.hasProperty(entry.getKey(), entry.getValue().toString());
}
blockPredicate.setProperties(properties.build());
return this.addPredicates(new HasBlock(offset, blockPredicate.build()));
}

Expand Down

0 comments on commit 8a4f5bd

Please sign in to comment.