fix: sponge v3 palette writer with __reserved__
Overview
Fixes an issue where reserved was written into the block palette for sponge v3 schematics (example would be masked copies).
Submitter Checklist
- [x] Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
- [x] Ensure that the pull request title represents the desired changelog entry.
- [x] New public fields and methods are annotated with
@since TODO. - [x] I read and followed the contribution guidelines.
What exactly is the fix? The change is a little abstract aha
Uhm, it was something related to an issue reported on discord. When saving a clipboard with some (maybe specific) mask, the writer would add a minecraft:reserved block state into the palette iirc.
I think this fix kinda streamlines it with the FastV2Writer? I'll have to look into it again lol. But this should write reserved as air for some reason (I guess because the state cache is setup that way or something)
Ah, yeah: https://github.com/IntellectualSites/FastAsyncWorldEdit/blob/main/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicWriterV3.java#L144
I replace the ordinal in the resolver function if it's reserved, but don't use the ordinal to retrieve the string representation. I guess updating / replacing the actually BlockStateHolder could be cleaner?
Yeah we shouldn't have __RESERVED__ going into schematics at all ideally