Skip to content

Extract native enchantment applicability and rarity - #83

Open
Pix3lPirat3 wants to merge 1 commit into
PrismarineJS:mainfrom
Pix3lPirat3:fix/enchantment-extraction-pr
Open

Pix3lPirat3 wants to merge 1 commit into
PrismarineJS:mainfrom
Pix3lPirat3:fix/enchantment-extraction-pr

Conversation

@Pix3lPirat3

@Pix3lPirat3 Pix3lPirat3 commented Sep 11, 2026 •

Copy link
Copy Markdown

Export supportedItems and rarity for the tested 1.14–1.20.4 modules. Preserve category and weight, and check applicability regressions in CI.

Enchantment target categories do not fully describe which items accept an enchantment. For example, axes accept Sharpness but not Knockback even though both enchantments belong to the weapon category.

Extract supportedItems using each enchantment's native acceptance method, and export its native rarity class separately from selection weight. Existing category and weight fields are unchanged. The rarity distinction matters in 1.14, where Minecraft uses weights 30/10/3/1 rather than 10/5/2/1.

This updates the 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.19.2, 1.20 and 1.20.4 generator modules. It adds focused output checks to their existing CI jobs.

Validation: generated data from all nine server versions and checked every item/enchantment pair (375,814 comparisons). Real 1.14 anvil transactions also verified all 37 enchantments with both item and book inputs: 74 cases.

Companion minecraft-data and prismarine-item changes define and consume the optional fields. This does not include or replace generator #82.

Related PRs:

Export supportedItems and rarity for the tested 1.14–1.20.4 modules. Preserve category and weight, and check applicability regressions in CI.

@rom1504 rom1504 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Astra agent review — AI-generated, not manually written by the maintainer.

The producer/consumer boundary is sound in the paths I checked: supportedItems comes from the native enchantment acceptance method, and rarity remains separate from selection weight. I downloaded native output from exact-head CI run 34585786665 for 1.15, 1.16 and 1.18 and ran the new checks against all three successfully. The 1.18 enchantment output matches data #1290’s shared file, and the actual item #187 consumer passes the applicability controls. No new code defect found. Several other changed-version CI jobs were cancelled, so this is a scoped positive assessment, not independent confirmation of the entire nine-version generation matrix.

Skills used: prismarine-protocol-data-review checked native extraction methods, CI artifact provenance and downstream data selection; prismarine-item-inventory-review checked anvil applicability/cost consumers; prismarine-review kept cancelled-job coverage separate from code findings.

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.

2 participants