Skip to content

fix: update block state NBT format for 26.3 - #402

Merged
PotatoPresident merged 1 commit into
QuiltServerTools:masterfrom
PadBro:fix-block-state-nbt
Oct 4, 2026
Merged

PotatoPresident merged 1 commit into
QuiltServerTools:masterfrom
PadBro:fix-block-state-nbt

Conversation

@PadBro

@PadBro PadBro commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Due to the new NBT format, block states are not properly tracked.

This causes the old_block_state and block_state columns to be stored as null, which results in rollbacks restoring blocks to the wrong state. For example, stairs would all face north.

Additionally, rolling back existing data with valid old_block_state and block_state values does not restore the blocks to the world because the old NBT format is no longer correctly interpreted.

This MR updates the NBT format to match the new structure and ensures that block states are persisted and restored correctly again.

@PadBro
PadBro requested a review from a team as a code owner September 27, 2026 20:12

@PotatoPresident PotatoPresident left a comment

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.

Could you add a description? I haven't seen any reports of it being broken, but I haven't been able to test recently

@PadBro

PadBro commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, I added the description.

You can easily test this by placing stairs facing all four directions, destroying them, and then rolling them back.

@PotatoPresident
PotatoPresident merged commit 22705ac into QuiltServerTools:master Oct 4, 2026
1 check passed
Pau1am pushed a commit to Pau1am/Ledger-Reoptimization that referenced this pull request Oct 5, 2026
Purely mechanical - trailing whitespace, trailing commas, and `page-1` spacing.
Needed so the branch satisfies the project's own detekt configuration; safe to
skip when reviewing.

The same reformatting previously rode along inside the NBT commit. That commit was
dropped when this branch was rebased onto 1.3.25 (upstream fixed the NBT issue in
QuiltServerTools#402), so the formatting is restored here on its own.
Pau1am pushed a commit to Pau1am/Ledger-Reoptimization that referenced this pull request Oct 5, 2026
Upstream moved while this branch was in flight:

  22705ac fix: update block state NBT format for 26.3 (QuiltServerTools#402)
  dd947aa Update modVersion from 1.3.24 to 1.3.25

QuiltServerTools#402 fixes exactly what this branch's own NBT commit fixed, so that commit has been
dropped in the rebase and the code is now upstream's - credit belongs there. The one
piece that was ours alone, a read-side fallback to the legacy "Properties" key, was
also dropped: on 26.3 writeBlockState emits "properties", so the fallback could never
fire and was dead code. That also removed the unrelated MessageUtils reformatting
from that commit, which is now its own change.

The CHANGELOG heading and comparison baseline move to 1.3.25, and the NBT entry now
records that the fix is upstream's rather than implying it is ours.

Verified after rebasing: builds clean, detekt passes, and a live MC 26.3 server
completes a rollback -> restore round-trip with the exact block state preserved
(oak_stairs[facing=west,half=top]) and zero exceptions.
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.

2 participants