Skip to content

Fix bugs about in world recipe crafting 修复世界内配方的相关问题#3432

Open
QiuShui1012 wants to merge 2 commits intoAnvil-Dev:dev/1.21/1.6from
QiuShui1012:recipe1/1.21/1.6
Open

Fix bugs about in world recipe crafting 修复世界内配方的相关问题#3432
QiuShui1012 wants to merge 2 commits intoAnvil-Dev:dev/1.21/1.6from
QiuShui1012:recipe1/1.21/1.6

Conversation

@QiuShui1012
Copy link
Copy Markdown
Contributor

  • fixed [Bug] 无法制作水泥 #3428
  • HasCauldron 添加了 produce 字段,用于声明流体产生量
    • 所有原先使用 consume 负值声明流体产生量的情况已迁移

Copilot AI review requested due to automatic review settings April 23, 2026 13:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes in-world cauldron recipe handling (notably cement crafting, #3428) by replacing the legacy “negative consume means produce” convention with an explicit produce field on cauldron predicates/components, and migrating affected recipes/builders to the new model.

Changes:

  • Add produce to HasCauldron / HasCauldronSimple (CODEC + StreamCodec) and update predicate application logic.
  • Migrate recipe builders (TimeWarp/SuperHeating/Squeezing/Bulging/NeutronIrradiation) away from negative consume.
  • Update generated recipe JSONs (and cement loader) to use produce (and proper positive consume where needed, e.g. cement).

Reviewed changes

Copilot reviewed 8 out of 29 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/main/java/dev/dubhe/anvilcraft/recipe/component/HasCauldronSimple.java Adds produce to the simple cauldron component and updates codecs + builder.
src/main/java/dev/dubhe/anvilcraft/recipe/anvil/wrap/TimeWarpRecipe.java Migrates builder produce() to the new produce field.
src/main/java/dev/dubhe/anvilcraft/recipe/anvil/wrap/SuperHeatingRecipe.java Migrates builder produce() to the new produce field.
src/main/java/dev/dubhe/anvilcraft/recipe/anvil/wrap/SqueezingRecipe.java Migrates builder produce() to the new produce field.
src/main/java/dev/dubhe/anvilcraft/recipe/anvil/wrap/NeutronIrradiationRecipe.java Migrates builder produce() to the new produce field.
src/main/java/dev/dubhe/anvilcraft/recipe/anvil/wrap/BulgingRecipe.java Migrates builder produce() to the new produce field.
src/main/java/dev/dubhe/anvilcraft/recipe/anvil/predicate/block/HasCauldron.java Adds produce to the predicate and updates test/accept logic + codecs/builders.
src/main/java/dev/dubhe/anvilcraft/data/recipe/BulgingRecipeLoader.java Fixes cement cauldron recipe by explicitly consuming and producing 1000 mB.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_zombie_head.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_spider_eye.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_rotten_flesh.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_piglin_head.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_foods/raw_rabbit.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_foods/raw_porkchop.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_foods/raw_mutton.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_foods/raw_fish.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_foods/raw_chicken.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/time_warp/oil_from_foods/raw_beef.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/super_heating/melt_gem_cauldron_from_gem_block.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/super_heating/melt_gem_cauldron_from_chromatic_stone.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/super_heating/lava_from_stone.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/super_heating/lava_from_cobblestone.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/squeezing/water_cauldron_from_wet_sponge.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/squeezing/water_cauldron_from_moss_block.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/squeezing/powder_snow_cauldron_from_snow_block.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/squeezing/lava_cauldron_from_magma_block.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/squeezing/exp_fluid_from_sculk_use_frost_anvil.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/squeezing/exp_fluid_from_sculk.json Migrates to produce field.
src/generated/resources/data/anvilcraft/recipe/bulging/cement_cauldron.json Fixes cement recipe by explicitly consuming and producing 1000 mB.
Comments suppressed due to low confidence (1)

src/main/java/dev/dubhe/anvilcraft/recipe/component/HasCauldronSimple.java:33

  • HasCauldronSimple record now has a produce component, but the constructor Javadoc still lists fluid/consume/transform/chance only. This is misleading for API consumers; please add @param produce (and consider clarifying units, e.g. mB).
    /**
     * 构造一个简单的炼药锅条件
     *
     * @param fluid     流体ID
     * @param consume   消耗量
     * @param transform 转换后的流体ID
     * @param chance    转换成功的概率
     */

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 无法制作水泥

2 participants