owengage / fastnbt

Fast serde serializer and deserializer for Minecraft's NBT and Anvil formats
MIT License
185 stars 35 forks source link

Extend palette blocks support. #112

Closed masaishi closed 3 months ago

masaishi commented 4 months ago

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.

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:

owengage commented 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.