Repository navigation
Generate recipes for 1.10.2, 1.11.2 and 1.12.2 - #81
Conversation
rom1504
left a comment
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
Reviewed at the maintainer's request. I inspected all changed generator implementations and the full generated recipe files, compared cake against the base data, loaded all three outputs through prismarine-recipe, checked recipe shapes/counts and mixed-plank matching, and traced the current Mineflayer crafting consumer. The inline finding concerns lost crafting remainders. I did not run the Java generator or a live crafting server.
| } | ||
| JsonObject json = new JsonObject(); | ||
| json.add("inShape", inShape); | ||
| json.add("result", resultFor(recipe.getOutput())); |
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
Could the shaped generators also emit crafting remainders as outShape? Cake is a concrete case: its three milk buckets (335) leave three empty buckets (325), as documented in minecraft-data's recipe schema. These generators only emit inShape/result, and all three files in minecraft-data#1283 consequently lose the previously present bucket row. In Mineflayer craft.js, updateOutShape() clears the local crafting grid and returns when this field is absent, skipping the putAway calls that collect those buckets. Please preserve the remainder shape for all three versions and add a cake regression checking the three returned buckets.
There was a problem hiding this comment.
Done in b49eacf. The 1.10.2, 1.11.2 and 1.12.2 shaped generators now emit outShape. It holds Item.getRecipeRemainder() for each cell and is included only when some slot has a remainder. In 1.12.2 each ingredient alternative carries its item so the remainder follows the cartesian expansion. The cake regression check lives in minecraft-data (PrismarineJS/minecraft-data#1283, cake returns its buckets in audit_recipes.js).
Cake leaves three buckets behind in the grid; without outShape, mineflayer clears the grid instead of collecting them.
|
Thanks for the review. Its one finding, lost crafting remainders, is addressed in b49eacf: shaped recipes in 1.10.2, 1.11.2 and 1.12.2 now emit |
rom1504
left a comment
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
Looks ready to merge from this review. The three shaped generators now preserve per-cell recipe remainders, including the item chosen during 1.12 alternative expansion. I downloaded this head's successful CI artifacts for 1.10.2/1.11.2/1.12.2 and compared their entire recipe outputs to minecraft-data #1283: all match, including cake's three empty buckets. All 1,206 records also load through prismarine-recipe with mixed-plank wildcards preserved. Current generator CI is green. Java generation was executed by CI; my independent checks cover its artifacts and downstream models, not a locally rerun Java server.
Skills used: prismarine-item-inventory-review traced cake remainders into prismarine-recipe/Mineflayer; prismarine-protocol-data-review checked generator output against the published-data candidate; prismarine-review checked current revisions, CI and existing feedback.
Implements
RecipeDataGeneratorfor the 1.10.2, 1.11.2 and 1.12.2 modules (previously a disabled stub). 1.10.2 and 1.11.2 readRecipeDispatcher.getInstance().getAllRecipes()through accessor mixins for the private recipe fields; 1.12.2 readsRecipeDispatcher.REGISTRYand expandsIngredientalternatives.Output follows the minecraft-data recipes schema for metadata versions:
Blocks.PLANKSin 1.10/1.11 code recipes), an item that only exists with one metadata value, or a 1.12 alternatives list that covers every variant of one item (planks0-5 incrafting_table.json). This is exact per slot: vanilla accepts mixed plank types in one grid.{id, metadata}. Alternatives that do not collapse are expanded into separate recipes.{id, metadata, count}.ShapedRecipeTypeandShapelessRecipeTypethemselves are emitted. Subclasses such as map extending compute their output at craft time, as do the special recipe types (dyeing, repair, banners, fireworks, book copying).Legacy yarn 541 maps 1.12.2
Item.getHasSubtypesto a wrong name (the method namedhasSubTypesis a constant false), so variants are derived from the item's own creative-tab stacks instead.For 1.12.2 the output equals a direct conversion of the 432 recipe JSON files in the client jar, recipe for recipe.