- Add a "loadPrivately" method to be used when GetChunks are called to avoid synchronocity issues with super classes being used on different threads
- Synchronise the call method so we're not attempting to call whilst also loading/updating
- Properly ensures we don't try to submit chunks that already have a monitor (prevent the FAWE-freezing)
- We can't detect if "no" threads hold the chunk's monitor, but equally that would also be kinda very bad practice.
- With enough chunks waiting to write to history, it's possible to fill the secondary fork pool up with locked threads, and thus prevent any threads from actually writing their history.
An extent's content was returned flipped when applied for negative positions, as e.g. `Math.abs(-2) % 3` returns 2 instead of 1 (as 1 + -1 * 3 = -2)
(cherry picked from commit b0cf5dd2bf1b9bcbf1c7efff0fe25de7ee9a2090)
* Get rid of FastSchematicReader/Writer and document changed JNBT classes
This commit includes changes from upstream to the schematic classes
(`com.sk89q.worldedit.extent.clipboard.io`). It also documents the JNBT
classes, specifying what has been changed in FAWE. This was done in preparation
for the upcoming move to adventure-nbt.
The PlotSquared schematic handler classes will now use SpongeSchematicReader/Writer rather than FastSchematicReader/Writer.
This is yet untested and the entire branch is a W.I.P.
* Fix JNBT mutability misuse in FAWE
FAWE previously had mutable compound and list tags. The previous commit changed that, and this commit will fix misuse of the tag API.
I've tried to identify the places where mutability was assumed, but I might have missed something. This needs quite extensive testing.
This is yet another change which increases upstream compatibility in FAWE.
* Fix FAWE_Spigot_<..>#getEntity
* Fix JNBT usage in the AsyncBlockState code
* Readd FastSchematicReader/Writer and add a new schematic format (`FAST`)
* Update dead repository
* Implement missing AsyncChunk#getTileEntities
* handle entities properly and add "brokenentity" format
* Fix fast schematic reader
lazily reading means it's read in order of appearance in the inputstream so we need to read schematic version first (skip past everything) and then reset the stream
* Fix p2 FAWE
* Go back to fast schematics in P2/CompressedSchematicTag (#819)
* Fix compile
Co-authored-by: N0tMyFaultOG <mc.cache@web.de>
Co-authored-by: Alexander Söderberg <Sauilitired@users.noreply.github.com>
Co-authored-by: dordsor21 <dordsor21@gmail.com>
Co-authored-by: Aurora <aurora@relanet.eu>
- Have both sponge and fast r/w available but default to "fast"
- Correctly "offset" entities in the schematic, and add a legacy mode for loading old FAWE schematics with entities required.
- Lazily reading means it's read in order of appearance in the inputstream so we need to read schematic version first (skip past everything) and then reset the stream. Fixes#740
- Add an FAWEVersion to the metadata
- Correctly actually return a BlockArrayClipboard when required. Fixes#454