* 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>
* Re-add "//snap" and "//snapshot"
* Place code in correct method
* Use CompoundBinaryTags in AnvilChunk18 and implement biome/entity restoration
* Address comments
* Fix biome reading
* Fix retrieval of entities from zipped snapshot world
Co-authored-by: Alex <mc.cache@web.de>
* Add back statically-set reserved IDs for air blocks only, make it clear they're "reserved"
Also:
- Ensure that reserved is never returned in GET block operations
- "empty" thus doesn't exist in the GET update methods; remove the needless checks
- Allow GET/SET chunks to determine their own default values for non-present blocks/sections
* Add comments
* Update swathes of easy-to-update-sort-of-code.
- Untested
- Should compile but NMF broken something
- Several todos:
- biome history//better support (move to biome sections in core)
- regen (haha lol no thanks, someone else can do that)
- probably actually do the palette stuff that probably won't work in PaperweightPlatformAdapter
* ci: Provide basic Jenkinsfile for ghprb pipeline
* build: Update paperweight
* upstream: Update Upstream
de6fa17 Add getBrush helper for use with instanceof pattern matching (1926)
* FAWE will now load on startup
* it....works?
* Begin to allow biome edits (and fix biomes reverting to plains upon editing blocks)
* Add new blocks/block properties
* Only create biome palette if supplies is null
* Fix biome operations
* Finally get removing BlockID done (major version change allows it)
* refactor!: Drop PlotSquared v4
Fawe 2.0.0 and newer requires Java 17, PlotSquared v4 supports 1.13 and 1.14, Fawe wont work on these versions nevertheless and refuses to load due Java version incompatiblities with older versions. Newer versions can use PlotSquared v6.
* docs: Update readme
* Added and removed some comments
* Added and removed some comments
* refactor: Rename worldedit configuration
* build: Re-add 1.17 module
This the a very nasty commit
* chore: Implement missing methods
* build: Update paperweight
* upstream: Update upstream
6df194e Remove finalize, use a Cleaner instead (1943)
9843a4f Fix snapshots in 1.18 (1959)
* ci: Escape workflows
* build: Update paperweight to 1.18.1
* build: Update Paster
* Fix compilation
* Bump to 1.18.1
* Do both 1.18 and 1.18.1
Co-authored-by: Alex <mc.cache@web.de>
* Fix single-block lookups
* Reserve ordinals 0 through 3 for air/"reserved"
* Create block palette data with values
* Fix classpath for testing for starlight
* Correctly use block rather than sky light layer [not used in paper]
Co-authored-by: NotMyFault <mc.cache@web.de>
Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>
* upstream: Update upstream
c407471 Re-add class shutter with tweaks. (1947)
* upstream: Update Upstream
29f1c66 If a trace hits the world limit, cancel it (1942)
* upstream: Update upstream
511daa5 Update paperweight dev bundle
- Also allow tab-completion of % pattern when it's the first/only pattern being used
- Also don't error when attempting to tab complete an invalid percent value
- #826 is a pretty niche requirement, usually permissions do not change without a world change, relog, etc. very frequently
- Allowing //toggleeditwand and /tool none on the wand feels more important