pmmp / BedrockBlockUpgradeSchema

(Mostly) auto-generated schemas for upgrading blockstates found in older Minecraft: Bedrock worlds
Creative Commons Zero v1.0 Universal
15 stars 4 forks source link

Allow partial matching for blockstate remapping #6

Closed dktapps closed 1 year ago

dktapps commented 1 year ago

https://github.com/pmmp/BedrockBlockUpgradeSchema/blob/1c07ced86be7d185551082441b5a2b9b7fbd6b21/nbt_upgrade_schema/0181_1.19.70_to_1.19.80.24_beta.json#L81-L95 https://github.com/pmmp/BedrockBlockUpgradeSchema/blob/1c07ced86be7d185551082441b5a2b9b7fbd6b21/nbt_upgrade_schema/0181_1.19.70_to_1.19.80.24_beta.json#L144-L159 https://github.com/pmmp/BedrockBlockUpgradeSchema/blob/1c07ced86be7d185551082441b5a2b9b7fbd6b21/nbt_upgrade_schema/0181_1.19.70_to_1.19.80.24_beta.json#L208-L223

These three state mappings are all applying the exact same blockstate alteration (removing the old_log_type field and changing the ID according to the value of old_log_type. However, because the oldState must exactly match the input blockstate, it has to also generate the same mapping for every value of pillar_axis, leading to a bunch of repeated information.

This can be represented more efficiently by allowing oldState to act as a filter rather than an exact match. I'm not sure on the exact logistics of generating such data from the mapping tables generated by bds-mod-mapping, but I'm sure it can be done.

dktapps commented 1 year ago

Implemented by: https://github.com/pmmp/BedrockBlockUpgradeSchema/commit/85b83b360eec4377e40cc9ab6c6f09d99d109527

Related generator and handling updates: https://github.com/pmmp/PocketMine-MP/commit/a1d44de4874539a367588f3e3ecd5da31778e870

@TwistedAsylumMC @JustTalDevelops you guys may find this relevant for df blockupgrader