Skip to content

Fix complete 1.21.4 attribute registry - #1209

Open
iiroak wants to merge 2 commits into
PrismarineJS:masterfrom
iiroak:fix/complete-1.21.4-attributes
Open

Fix complete 1.21.4 attribute registry#1209
iiroak wants to merge 2 commits into
PrismarineJS:masterfrom
iiroak:fix/complete-1.21.4-attributes

Conversation

@iiroak

@iiroak iiroak commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • restore the complete 32-entry Java 1.21.4 attribute registry
  • correct movement speed to protocol ID 21 and step height to ID 27
  • regenerate the JSON protocol definition
  • add a regression test for the affected IDs

The incomplete table shifted attributes after ID 8, causing movement speed packets to decode as step height.

Validation

  • npm run build -- pc 1.21.4
  • npx mocha test/audit_attributes.js test/protocolSync.js --exit
  • npm run lint

@extremeheat

Copy link
Copy Markdown
Member

Does this only affect 1.21.4 ?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_attributes in data/pc/1.21.4/proto.yml.
  • Regenerates data/pc/1.21.4/protocol.json so 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')
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.

3 participants