- Correctly handle block state limit checks.
- Don't quash exceptions thrown in a region operation by having a "max-fails" check that can only be hit once....
Fixes#1127
- ImmutableBaseBlock is no longer needed as NBT was made immutable previously
- BlanketBaseBlock represents to masks that the block has NBT, but does not need to match a specific state
- Allow FuzzyBlockState to create BaseBlocks without NBT data (fixed tab completion issues)
- Required new argument parser, which should ultimately be made into a singe blockstate parser for best results, and proper tab-completion
- The layer brush itself is broken because of the changes to internal block retrieval from legacy
**Add a null-check to CharBlocks FULL section layer-retrieval.**
- It is possible to trim CharBlocks whilst it is attempting to read data due to the batching of chunks to help reduce memory
- This is done when the number of chunks sitting loaded in memory with having been "submitted" to the queue for writing to disk becomes high
- Seconday operations such as heightmap processing and lighting will quickly load chunks, meaning many chunks are submitted early
- This leads to much higher chances of the chunk being submitted and subsequently trimmed given heightmap and light processing is done layer-by-layer over many chunks, rather than chunk-by-chunk - thus leading to NPEs.
- By adding synchronisation to and around only the specific sections when loading/updating, and not blocking the whole chunk, many access can still be thread-safe without causing deadlocks
- This allows removal of lots of the needless and very-slowing synchronisation on get**Block** methods
**Remove much of the synchronisation from ChunkHolder**
- We shouldn't be synchronising with call() and safety should be added elsewhere. (plus it's making edits very very slow when queue target size is hit)
- Also remove much of synchronisation because we've added the null-check and section-specific synchronisation to CharBlocks
**Some QOL/thread-safe data access changes**
- Replaces the Array#clone seen in the get blocks classes with System#arraycopy as deep cloning is not required, and is also slower than arraycopy
- Add System#arraycopy when accessing chunk section data via history to ensure it is not altered whilst being written
- Renaming EMPTY to empty means it is not implied to be a static variable
Fixes https://github.com/IntellectualSites/FastAsyncWorldEdit/issues/1028
Fixes https://github.com/IntellectualSites/FastAsyncWorldEdit/issues/1025
Fixes https://github.com/IntellectualSites/FastAsyncWorldEdit/issues/1089
Fixes https://github.com/IntellectualSites/FastAsyncWorldEdit/issues/1091
Fixes https://github.com/IntellectualSites/FastAsyncWorldEdit/issues/1097
* Use Unsafe to replace Lock
* Start cleaning up everything that has to do with CleanableThreadLocal
* Make cancellation work
Co-authored-by: NotMyFault <mc.cache@web.de>