Skip to content

feat: add 1.8-1.15 world support using generated blocks reports#67

Open
petarduss wants to merge 1 commit into
Quozul:masterfrom
petarduss:fix/legacy-1.8-1.15-worlds
Open

feat: add 1.8-1.15 world support using generated blocks reports#67
petarduss wants to merge 1 commit into
Quozul:masterfrom
petarduss:fix/legacy-1.8-1.15-worlds

Conversation

@petarduss
Copy link
Copy Markdown
Contributor

Summary

This PR adds missing world/chunk support for legacy clients and fixes legacy login/tab issues.

What changed

  • Added legacy chunk packet path for 1.8–1.12 (legacy_level_chunk).
  • Implemented structure rendering for legacy clients instead of sending only void chunks.
  • Added fallback report mapping path for 1.13–1.15 where needed.
  • Fixed 1.8 packet layout/encoding issues (including legacy bitmask/data layout).
  • Added stable non-nil UUID fallback for legacy login paths that do not provide UUID, restoring proper tab-list behavior.
  • Registered packet mappings for legacy/older generated packet reports.

Validation

  • cargo fmt
  • cargo test -p minecraft_packets legacy_chunk_data_packet -- --nocapture
  • cargo test -p pico_limbo configuration -- --nocapture
  • cargo build --release -p pico_limbo

Notes

  • This keeps behavior for modern versions unchanged while enabling proper world visibility for 1.8–1.15 clients.

Comment thread pico_limbo/src/server/game_profile.rs
Comment on lines +242 to +252
match block_name {
"stone" => legacy_state(1, 0),
"granite" => legacy_state(1, 1),
"polished_granite" => legacy_state(1, 2),
"diorite" => legacy_state(1, 3),
"polished_diorite" => legacy_state(1, 4),
"andesite" => legacy_state(1, 5),
"polished_andesite" => legacy_state(1, 6),
"grass_block" => legacy_state(2, 0),
"dirt" => legacy_state(3, 0),
"coarse_dirt" => legacy_state(3, 1),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I'd have preferred the list of block IDs to be handled the same way as in the other versions rather than hard-coding all the values into the code. That is, using a blocks.json file. This way, it can be centralized which will simplify further improvements. Similar remark for 1.13-1.15.x. Ideally, you'd have exported the IDs from the game itself for each version to get the actual block IDs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. I removed hardcoded legacy block ID mapping from runtime and moved it to generated blocks reports.
This PR now uses blocks.json-based mappings for 1.8-1.15.

@petarduss petarduss force-pushed the fix/legacy-1.8-1.15-worlds branch from ea86cda to 614d87e Compare March 25, 2026 13:55
@petarduss petarduss changed the title Add 1.8–1.15 world support and fix legacy UUID/tab issues feat: add 1.8-1.15 world support using generated blocks reports Mar 25, 2026
Copy link
Copy Markdown
Owner

@Quozul Quozul left a comment

Choose a reason for hiding this comment

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

I quickly tested this PR by running a few versions using this schematic which uses 1.8 blocks:

  • 1.16: the entire schematic got surrounded by cobblestone
    • seems like this bug also appears on the master branch on all versions onwards with this specific schematic, I'll look into it
  • 1.15: entire chunk sections went missing
  • 1.13: crashed due to a network protocol error
  • 1.8: connects but most of the blocks get replaced with quartz for some reasons

Please make sure to test your work on all versions and with several schematics.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

How did you generate these blocks.json files? I see some blocks that don't exists in older versions, such as "bamboo". I'm pretty sure this is the case for all the blocks.json file. You can extract official blocks.json from the game starting 1.13. For older versions, you'll have to find real list of IDs by yourself. I think Burger may have most of it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll look at it after the holidays. Thanks

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

FYI, I've fixed the bug about cobblestone I mentioned in 409e57d

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