Closed masaishi closed 3 months ago
Hi, thanks for your contribution. These changes look fine to me.
In a perfect world the texture extraction would be smarter and require less of the regex mappings, but it's not something I'm investing time into at the moment, so I'm more than happy for more mappings.
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 #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,