feat: add 1.8-1.15 world support using generated blocks reports#67
feat: add 1.8-1.15 world support using generated blocks reports#67petarduss wants to merge 1 commit into
Conversation
| 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), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
ea86cda to
614d87e
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I'll look at it after the holidays. Thanks
There was a problem hiding this comment.
FYI, I've fixed the bug about cobblestone I mentioned in 409e57d
Summary
This PR adds missing world/chunk support for legacy clients and fixes legacy login/tab issues.
What changed
legacy_level_chunk).Validation
cargo fmtcargo test -p minecraft_packets legacy_chunk_data_packet -- --nocapturecargo test -p pico_limbo configuration -- --nocapturecargo build --release -p pico_limboNotes