Skip to content

Align Bedrock 1.21.x block ranges with runtime state palettes - #1276

Merged
extremeheat merged 1 commit into
PrismarineJS:masterfrom
Pix3lPirat3:fix/bedrock-runtime-block-mappings
Sep 16, 2026
Merged

extremeheat merged 1 commit into
PrismarineJS:masterfrom
Pix3lPirat3:fix/bedrock-runtime-block-mappings

Conversation

@Pix3lPirat3

Copy link
Copy Markdown
Contributor
  • add matching blocks.json tables for Bedrock 1.21.20, 1.21.30, and 1.21.50;
  • point those releases at their matching block tables;
  • validate complete, non-overlapping state ranges, in-range defaults, and matching block names.

The affected versions had distinct blockStates.json palettes but reused incompatible blocks.json tables. This caused state IDs such as defaultState to resolve to the wrong block. The tables use the same pinned PMMP BedrockData palettes validated by the retained official-BDS probes.

Fixes #1156.

Tests

  • mapping invariant: 30 unique block/state pairs passing
  • full minecraft-data suite: 1,896 passing, 1 expected pending
  • BDS 1.21.20, 1.21.30, and 1.21.50 world/block probes passing
  • dependency-integrated BDS world/block matrix: 51 passing, 0 failing, 2 unavailable

- add matching `blocks.json` tables for Bedrock 1.21.20, 1.21.30, and 1.21.50;
- point those releases at their matching block tables;
- validate complete, non-overlapping state ranges, in-range defaults, and matching block names.

The affected versions had distinct `blockStates.json` palettes but reused incompatible `blocks.json` tables. This caused state IDs such as `defaultState` to resolve to the wrong block. The tables use the same pinned PMMP BedrockData palettes validated by the retained official-BDS probes.

Fixes PrismarineJS#1156.

## Tests

- mapping invariant: 30 unique block/state pairs passing
- full minecraft-data suite: 1,896 passing, 1 expected pending
- BDS 1.21.20, 1.21.30, and 1.21.50 world/block probes passing
- dependency-integrated BDS world/block matrix: 51 passing, 0 failing, 2 unavailable
@@ -0,0 +1,44 @@
/* eslint-env mocha */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wonder if we could enforce this at a schema level--define some items as unique like in SQL that we can catch generically via some tests. Would help catch this kind of error more broadly for rest of the data

@extremeheat

Copy link
Copy Markdown
Member

Merging to make way for #1297

@extremeheat
extremeheat merged commit 3796c6d into PrismarineJS:master Sep 16, 2026
4 checks passed
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.

problem with the StateID of blocks, Bedrock

2 participants