Skip to content

Fix pc/1.21.11 attribute_modifiers entry shape - #1253

Open
extremeheat with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-attribute-modifiers-display
Open

Fix pc/1.21.11 attribute_modifiers entry shape#1253
extremeheat with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-attribute-modifiers-display

Conversation

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

pc/1.21.11 encoded attribute_modifiers differently from adjacent versions: display was attached once after the list instead of per modifier entry. That breaks decoding for items carrying 2+ explicit modifiers because subsequent entries are read at the wrong offset.

  • Protocol shape

    • Update data/pc/1.21.11/proto.yml so attribute_modifiers is an array of entry containers, with display nested inside each entry.
    • Regenerate data/pc/1.21.11/protocol.json from the YAML source.
  • Regression coverage

    • Add a focused test asserting the generated 1.21.11 SlotComponent.attribute_modifiers shape matches the neighboring per-entry layout used by 1.21.9.
if attribute_modifiers: []varint
   typeId: varint
   name: string
   value: f64
   operation: varint => ...
   slot: varint => ...
   display:
      type: varint =>
         - default
         - hidden
         - override
      component: type ?
         if override: anonymousNbt

Co-authored-by: extremeheat <13713600+extremeheat@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix attribute_modifiers display issue in pc/1.21.11 Fix pc/1.21.11 attribute_modifiers entry shape Aug 17, 2026
Copilot AI requested a review from extremeheat August 17, 2026 14:43
@extremeheat
extremeheat marked this pull request as ready for review August 21, 2026 05:48
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.

pc/1.21.11: attribute_modifiers item component has display once after the list; vanilla has it per entry (breaks items with 2+ modifiers)

3 participants