Fix attribute_modifiers structure in protocol.json for 1.21.5-1.21.11#1155
Fix attribute_modifiers structure in protocol.json for 1.21.5-1.21.11#1155reallyoldfogie wants to merge 2 commits intoPrismarineJS:masterfrom
Conversation
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
| - armor | ||
| - body | ||
| - saddle | ||
| showTooltip: bool |
|
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 |
|
This PR fixes two serialization errors in Issue 1:
|
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