Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds support for specific blocks that are currently not handled properly due to unique blockstates. The changes include the addition of exception handlers when
make_palette
.I'm not sure if my approach is the correct way to support new blocks. If my implementation is incorrect, please give me advice of the proper way to extend support for blocks with unique blockstates.
Changes
Below are the detailed implementations proposed for two blocks, explaining the error causes and the solutions applied.
pink_petals
Blockstate::Multipart
-> try_mappingsminecraft:block/pink_petals
.pointed_dripstone
Blockstate::Variants
-> renderer.get_top -> Variants::Single -> self.model_get_top -> el.faces.get("up").ok_or_else( || -> Error::MissingElements) -> try_mappingsminecraft:block/pointed_dripstone_up_tip
.mangrove_roots
Blockstate::Variants
-> renderer.get_top -> Variants::Single -> self.model_get_top -> el.faces.get("up").ok_or_else( || -> Error::MissingElements) -> try_mappingsminecraft:block/mangrove_roots_top
.melon_stem
Blockstate::Variants
-> renderer.get_top -> Variants::Single -> self.model_get_top -> el.faces.get("up").ok_or_else( || -> Error::MissingElements) -> try_mappingsminecraft:block/$1_stem_top
.stripped_warped_stem
), so I used a specific stem names to handle.stripped_warped_stem
crimson_stem
warped_stem
stripped_crimson_stem
pumpkin_stem
melon_stem
attached_melon_stem
attached_pumpkin_stem
big_dripleaf_stem
mushroom_stem
glow_lichen
Blockstate::Multipart
-> try_mappingsminecraft:block/glow_lichen
.composter
Blockstate::Multipart
-> try_mappingsminecraft:block/composter_top
.Identified Mapping Issues for Minecraft 1.20.4
During testing with the Minecraft 1.20.4 world data, several blocks did not map correctly, potentially leading to incomplete or inaccurate renderings in generated maps. Here are some of the affected blocks and their respective counts from the process log:
"short_grass": 1105963,(Support by Support rendering of short_grass in rendered_palette.rs #111)"pink_petals": 52293,"pointed_dripstone": 1000,"mangrove_roots": 373,"melon_stem": 249,"glow_lichen": 51,"pumpkin_stem": 48,"composter": 47,"attached_pumpkin_stem": 47,"attached_melon_stem": 10,"big_dripleaf_stem": 8,