Skip to content

Fix attribute_modifiers structure in protocol.json for 1.21.5-1.21.11#1155

Open
reallyoldfogie wants to merge 2 commits intoPrismarineJS:masterfrom
reallyoldfogie:fix_attribute_modifiers_1.21.5-1.21.11
Open

Fix attribute_modifiers structure in protocol.json for 1.21.5-1.21.11#1155
reallyoldfogie wants to merge 2 commits intoPrismarineJS:masterfrom
reallyoldfogie:fix_attribute_modifiers_1.21.5-1.21.11

Conversation

@reallyoldfogie
Copy link

@reallyoldfogie reallyoldfogie commented Mar 7, 2026

The attribute_modifiers component was incorrectly structured as a container with "attributes" and "display" as sibling top-level fields. Based on an analysis of AttributeModifiersComponent in the affected versions, the correct structure is an array of entries where each entry contains typeId, name, value, operation, slot, and display fields inline (except 1.21.5, which doesn't have a display).

Affected versions: 1.21.5, 1.21.6, 1.21.8, 1.21.9, 1.21.11

The attribute_modifiers component was incorrectly structured as a
container with "attributes" and "display" as sibling top-level fields.
Based on an analysis of AttributeModifiersComponent in the affected versions,
the correct structure is an array of entries where each entry contains
typeId, name, value, operation, slot, and display fields inline (except 1.21.5, where display remains at the outer level).

Affected versions: 1.21.5, 1.21.6, 1.21.8, 1.21.9, 1.21.11
The attribute_modifiers component was incorrectly structured as a
container with "attributes" and "display" as sibling top-level fields.
Based on an analysis of AttributeModifiersComponent in the affected versions,
the correct structure is an array of entries where each entry contains
typeId, name, value, operation, slot, and display fields inline (except 1.21.5, where display remains at the outer level).

Affected versions: 1.21.5, 1.21.6, 1.21.8, 1.21.9, 1.21.11
@reallyoldfogie reallyoldfogie reopened this Mar 7, 2026
- armor
- body
- saddle
showTooltip: bool
Copy link
Member

Choose a reason for hiding this comment

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

Erroneously removed?

@extremeheat
Copy link
Member

Are you sure this is necessary? Seems to me you are only unwrapping a field which should not affect serialization/deserialization beyond an extra container. There are changes between versions also, see comment

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants