* feat: make more commands unqueued
- Effectively fixes the very specific "issue" in #2223 I guess
- Use this opportunity to clean up the command classes a bit
* Address comments
- immediately return limit if unlimited (limit combination take the "higher" value)
- add fawe.limit.unlimited permission and it's an intuitive permission to give
- It's very resource-intensive and probably doesn't work anyway
- Tick limiter should not be enabled by default, it confuses a lot of people with the console logs
* fix: add null-check for brush in traceMask
- Fixes#2149
* Switch to print from printError
Co-authored-by: Alexander Brandes <mc.cache@web.de>
---------
Co-authored-by: Alexander Brandes <mc.cache@web.de>
* feat: improvements to clipboard on disk
- close clipboard on instantiation failure
- set canHaveBiomes when loading clipboard from disk (only possible cause I can find for #2151 ..?)
- check file length and give more appropriate error if it exceeds maximum. Fixes#2151 I guess?#
- set byteBuffer to null before invoking cleaning. Addresses #1985
- don't catch and print all exceptions when getBlock fails - prevents large console output for what is likely to be a failed operation anyway
* Fix comments
The problem: Off by one error for negative coordinates. Source: Behaviour of rounding coordinates (doubles) after deform.
The off by error came down to rounding using casts (int) and rounding using Math.floor()
(int)( 1.8) = 1
(int)(-1.8) = -1
(int)Math.floor( 1.8) = 1
(int)Math.floor(-1.8) = -2
Looking at the original WorldEdit implementation a Math.floor call is present too. It was missing FAWE which resulted in the bug.
Co-authored-by: Alexander Brandes <mc.cache@web.de>
* feat: retrieve the latest release version automatically
(cherry picked from commit a8885a349a567849f6db29565cc65b14e3dab155)
* feat/fix: validate hash of downloaded asset file
* chore: address review comments
Usage of nio Path instead of direct File access
Usage of HexFormat instead of custom implementation
No need for usage of channels
* chore: simplified sha-1 calculation logic
Co-authored-by: Pierre Maurice Schwang <mail@pschwang.eu>
* Don't do the unbelievable bad use of a MutableBlockVector2 in the creation of a set
- FixesIntellectualSites/PlotSquared#3683
* Clean up remnants of the use of MutableBlockVector2
* If a char mask is successfully created from the full input, return it
* Don't double-up adding a block to a BlockMaskBuilder (if adding by regex is successful)
- InputParseException is thrown if unsuccessful
* Fix optimisation of BlockMask for negation of a single block type
- Fixes#1755
* Allow early returning of an optimized MaskIntersection to avoid unnecessary work
* Actually allow underscore in isAlphanumericUnd
- Fixes#1626
* Replace a few more hard-coded air internal IDs
* Don't fail silently if BlockMaskBuilder#addRegex doesn't work when testing all block types
* Remove unused import
* Fix horrendous variable assignment in PNGWriter
- Fixes#1679
* More detailed information on PNG format
* Avoid a larger number of blocks that do nto have a color assigned in TextureUtil
* Don't error in PNGWriter if biomes aren't saved to clipboard and grass is present
* Only implement cache to MaskingExtent when off main thread
- It's possible for a [Chunk/Char]FilterBlock to be used multiple times in the same "tree" of method calls meaning the mutable paramets (particularly index) get increased within a loop, causing AIOOBs and other issues
- This is only possible on the main thread due to the handling of submissions in SingleThreadQueueExtent, as it ensures all operation remains on the main thread to prevent deadlocks
- Therefore safe usage of FilterBlocks requires that main-threaded operation create a new [Chunk/Char]FilterBlock instance each time
- Further fixes#1681
* Fix typos
* Switch to LongFunction
* Only synchronise tree generation at the very lowest level
- Fixes#1681
* Perform the generate inside try-finally and actually use the resultant copied map to place blocks to the editsession
* Check result of generateTree and return null if failed
* Implement limits to image size and load times
- Prevents issues caused by users attempting to load large images
- Implements #1729
* Check dimensions given before attempting to load image
* feat: Add support for 1.19
* build: Update paperweight version
* fix: obfuscated names, invalid method signatures
* avoid NPE on config access
* build: Update paperweight
* implement no-op light engine to avoid stalled tasks that never complete
* Apply DelegateSemaphore fixes to 1.19 (#1782)
* Apply DelegateSemaphore fixes to 1.19
* Fixes
* Avoid using PalettedContainerRO#recreate as much as possible. Show an error or warning when we're forced to use it to help fix (#1784)
Co-authored-by: Pierre Maurice Schwang <mail@pschwang.eu>
Co-authored-by: SirYwell <hannesgreule@outlook.de>
Co-authored-by: Jordan <dordsor21@gmail.com>
* Allow NBT stored in DiskOptimizedClipboards to be written to disk as a compressed byte array at the end of the file
* Add some deprecations/javadocs and provide the expected clipboard version on error
* Javadoc since tags and add location of clipboard folder to error
* Refactor load-from-file method into DOC class
* Refactor nbt loading code into separate method in DOC
* the set array given in NMSAdapter should have get data written to it
- Fixes#1664
- May fix#1700
* Having target size >= 2* parallel threads allows for adjacent chunks to be loaded with issues
* "empty" chunk section doesn't need to be localised to the chunk and may be static
* Switch to slightly more performant stream method for testing for non-empty sections
* Implement lock into ChunkHolder preventing any modification to occur whilst the edit is being applied to the world
(when ChunkHolder is called)
* Add config note about target-size
* set ordinal equal to air if both set and get are `__reserved__`
* Add note to checkAndWaitOnCalledLock method of its use
* Don't print exception and throw
* Switch to a wrapped StampedLock allowing reentrant behaviour
- StampedLock is not reentrent
- Allow unlock from a different thread only if it provides the correct stamp
- This stamp can only be retrieved by the thread owning the lock
* Avoid some "doubling-up" of using checkAndWaitOnCalledLock
* Unbloat `checkAndWaitOnCalledLock`
* Add since tags
* Fix SideEffectSet.none() being the default set (#1620)
* Fix SideEffectSet.none() being the default set
* Remove the unnecessary private empty constructor for SideEffectSet
* Back to ImmutableMap.of
* Speed up Fast Reorder Mode and make it default (#1653)
* Speed up Fast Reorder Mode and make it default
* Make non-exposed side effects internal
* Docs on isExposed
Co-authored-by: Matthew Miller <mnmiller1@me.com>
* Implement getNameUnsafe method to allow an unloaded world's name to be accessed
- Fixes#1671 and #504
* Add javadoc since tag
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
* Make postProcessSet a default method and change to void
* Throwable#getMessage is nullable
* Move (re-)ticking to a post-processor per "platform"
- Add fluid ticking
* chore: Ignore (for us) irrelevant rules
* chore: Fix correct toml syntax?
* Re-add removed method for API-compliance and refactor it to have a use
* Switch to javax annotations
* Switch to recalcBlockCounts for ticking blocks.
* No need to set air count anymore either
* We can still "not tick" in fast mode in 1.17.2
* update adapters
* Let paper create the chunk section if biomes are null
* Adjust notes to settings
* 1.17.2 didn't exist
* Add 1.18.2
* Don't attempt to cache plains biome ID
* Use correct annotation
Co-authored-by: NotMyFault <mc.cache@web.de>