FastAsyncWorldEdit
FastAsyncWorldEdit copied to clipboard
FAWE reads and writes corrupt .schematic and .schem files (since 1.12.2)
[REQUIRED] FastAsyncWorldEdit Configuration Files: Not provided, since this bug isn't affected by configuration files.
[REQUIRED] FastAsyncWorldEdit Version Number: 19.11.13-5505943-1282-22.3.5 1.15-101;0bf0848 1.15-161;755ea09
[REQUIRED] Spigot/Paper Version Number: ---FAWE 1.12--- Spigot 1.9.4 Paper 1.10.2 Spigot 1.12.2 Paper 1.12.2 ---FAWE 1.15--- Spigot 1.15.2 (git-Spigot-6de3d4b-796eb15 (MC: 1.15.2))
[REQUIRED] Description of the problem: The WEOrigin (WEOffset in Sponge schematics) is included in the position of all tile entities in McEdit and Sponge schematic format. This is an incorrect implementation, since the reference implementation of WorldEdit doesn't include the WEOrigin in the schematics and throws errors parsing them (https://github.com/EngineHub/WorldEdit/issues/1278). FastAsyncWorldEdit ignores such errors. This affects also .schem schematic files and is the reason for missing TileEntity data in some schematics (when switching implementation). Maybe Entity coordinates are also affected, but this is untested.
How to replicate: Compare any schematic file with at least one TileEntity created by WorldEdit and FastAsyncWorldEdit. If you don't want to create schematic files compare these: schematics.zip. "works" was created using (Async)WorldEdit (was uploaded by user), "doesnt_work" was created using FastAsyncWorldEdit (1.12.2).
Plugins being used on the server: Doesn't matter since observed on schematics from many servers, some dating back multiple years.
Possible solution Since FAWE currently isn't usable enough in 1.15.2 and I therefore need to use WE, a fix in FAWE won't help me (currently) and doesn't fix all the schematics created with FAWE. So I needed to modify the existing implementations and have come up with a workaround/fix for the schematic reader (from the view of the WE implementation for both schematic types, you could invert the procedure to check for correct schematics and "fix" them accordingly):
- Check if any TileEntity coordinate is outside of the schematic dimensions, if so, it is a FAWE generated schematic
- When iterating over TileEntities and it seems to be a FAWE generated schematic, subtract the WEOrigin from the coordinates.
Checklist:
- [X] I included all information required in the sections above
- [X] I made sure there are no duplicates of this report (Use Search)
- [X] I made sure I am using an up-to-date version of FastAsyncWorldEdit for 1.15.2
- [X] I made sure the bug/error is not caused by any other plugin
I'll mark this as a feature request to create a command that will take schematic files and fix them for use in other plugins/tools. Thank you for bringing it to our attention.
Is it possible that - compared to WorldEdit - FAWE only support Sponge .schem files, and no MCEdit .schematic files in general?
I think at this point the issue can be closed? It effectively no longer exists, and I see little reason to add a workaround for schematics at this point. @IntellectualSites/fastasyncworldedit-team thoughts?