Fix complete 1.21.4 attribute registry - #1209
Open
iiroak wants to merge 2 commits into
Open
Conversation
Member
|
Does this only affect 1.21.4 ? |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Java Edition 1.21.4 UpdateAttributes packet’s attribute ID→name mapping by restoring the full 32-entry registry, ensuring attribute IDs (notably movement speed and step height) decode to the correct attribute names across the protocol schema and generated JSON.
Changes:
- Restores the complete 32-entry attribute registry for
packet_entity_update_attributesindata/pc/1.21.4/proto.yml. - Regenerates
data/pc/1.21.4/protocol.jsonso the mapper IDs match the corrected registry (movement speed → 21, step height → 27). - Adds a regression test to validate key attribute IDs for 1.21.4.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/js/test/audit_attributes.js | Adds a Mocha regression test asserting critical attribute mapper IDs for 1.21.4. |
| data/pc/1.21.4/protocol.json | Updates the generated protocol JSON mapper table to the corrected 32-entry registry. |
| data/pc/1.21.4/proto.yml | Fixes the source protocol DSL mapping list for packet_entity_update_attributes to include all 32 attributes in the correct order. |
Comment on lines
+9
to
+13
| const mappings = findMappings(packet) | ||
|
|
||
| assert.strictEqual(mappings['9'], 'player.entity_interaction_range') | ||
| assert.strictEqual(mappings['21'], 'generic.movement_speed') | ||
| assert.strictEqual(mappings['27'], 'generic.step_height') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The incomplete table shifted attributes after ID 8, causing movement speed packets to decode as step height.
Validation
npm run build -- pc 1.21.4npx mocha test/audit_attributes.js test/protocolSync.js --exitnpm run lint