Commit Graph
100 Commits
Author SHA1 Message Date
JordanandGitHub 476ba4ab41 refactor: efficiency improvements to some editsession methods (#2304) 2023-06-27 18:36:54 +02:00
dordsor21 924805af8f fix: fix obnoxious error message if using p2 v7 with FAWE main branch 2023-06-25 13:52:13 +01:00
dordsor21 05d5ad161a chore: add obnoxious error message if using p2 v7 with FAWE main branch 2023-06-23 21:57:51 +01:00
JordanandGitHub 9f0a0dbd35 fix: ensure mask is initialised upon visiting a point in BreadthFirstSearch (#2314)
fix: ensure mask is initialised upon visiting a point in BreadFirstSearch
2023-06-22 21:32:54 +02:00
JordanandGitHub d961aa91bc fix: fix regex block masking (#2242) 2023-06-22 11:24:03 +01:00
JordanandGitHub 88533118bc fix: uncache the chunk SET at a better time in ChunkHolder to prevent "lost" changes (#2300)
- blocks could still be set to the ChunkHolder during a call
 - create a new chunk SET in that case
 - make cached get/set volatile to improve thread safety
2023-06-19 22:46:10 +02:00
JordanandGitHub 8ca25fa7d7 fix: towny max bounds are exclusive (#2301)
fix: towny max bounds are exlusive
 - Fixes #2293
2023-06-19 22:46:01 +02:00
JordanandGitHub 01be53ed65 fix: add missing BlockType constructor (#2306)
- Deprecate public BlockType constructors
 - People really should not be initialising their own block types. This can and most likely will cause issues.
 - Fixes #2290
2023-06-19 14:36:47 +01:00
JordanandGitHub a8c8a0fbd6 fix: always return the changeset from EditSessionBuilder (#2302)
- Ensure history will actually always be closed if combine-stages is false
- Fixes #2148
2023-06-19 14:34:54 +01:00
JordanandGitHub 1ede11b129 fix: use new array when creating palette (#2305)
- Fixes #2291
2023-06-19 14:34:02 +01:00
JordanandGitHub 39de48cdb1 chore: Address kotlin String#capitalize() deprecation (#2308)
* chore: Address kotlin String#capitalize() deprecation
 - Fixes #2283
 - Don't bother with the longer version that allows Locales, we don't need that

* Address comments
2023-06-18 16:31:49 +00:00
JordanandGitHub f0aef98870 fix: don't "double-up" a setblocks if a region is being set (#2299)
- Fixes #2294
2023-06-18 18:08:31 +02:00
dordsor21 135c77cfb5 chore: minor changes
- null check get tile in ThreadUnsafeCharBlocks
 - 0 to reserved ID
2023-06-18 15:03:51 +01:00
51e238c352 feat: add new tree types to tree tool and brush (#2286)
* feat: add new tree types
 - implements #2197

* Remove nonsensical test case

---------

Co-authored-by: Alexander Brandes <[email protected]>
2023-06-15 10:18:01 +02:00
JordanandGitHub 79a2c14caa fix #2292 2023-06-13 19:12:24 +02:00
JordanandGitHub dae6c69e54 feat: send one of an error message during edits if otherwise squashed by LimitExtent (#2246)
* feat: send one of an error message during edits if otherwise squashed by LimitExtent

* no region is not ingorable
2023-06-12 12:14:24 +02:00
JordanandGitHub e449910af5 feat: prevent edits outside +/- 30,000,000 blocks (#2285)
* feat: prevent edits outside +/- 30,000,000 blocks

* Remove import
2023-06-12 11:27:07 +02:00
1356cd5caa feat: implement a player-specific queue for clipboard IO tasks (#2267)
* feat: implement a player-specific queue for clipboard IO tasks
 - Addresses #2222 (hopefully fixes)

* Address comments

* Add since

---------

Co-authored-by: Alexander Brandes <[email protected]>
2023-06-07 00:35:37 +02:00
JordanandGitHub 84872cf9a2 chore: improve queue documentation and submit history to better queue (#2266) 2023-06-06 19:22:25 +02:00
JordanandGitHub b7719d17bd fix: correctly processSet with blacklist when required (#2270)
* fix: correctly processSet with blacklist when required

* Fix incorrect region
2023-06-06 19:21:18 +02:00
JordanandGitHub 5504811f11 chore: minor improvements to processing-related code (#2271) 2023-06-06 19:21:02 +02:00
dordsor21 5da5b216f3 fix #2268
-.-
2023-06-05 22:26:41 +01:00
dordsor21 e5d27c27bb chore: replace some hardcoded ordinals 2023-06-05 00:17:13 +01:00
dordsor21 46e8a37cf0 fix: improve test for polygonal region containment of cuboid
- Possibly fixes #2265
2023-06-04 23:57:51 +01:00
JordanandGitHub e9fed5a066 feat: improve error when loading biomes (#2241) 2023-06-04 18:50:08 +02:00
JordanandGitHub 0e215e98d5 fix: minor changes to fix loading blocks outside stored range in ThreadUnsafeCharBlocks (#2260)
- Fixes #2258
2023-06-04 17:22:21 +02:00
dordsor21 048dcaf327 fix: do not always set random rotate to true
- Fixes #2259
 - How'd that even get through
2023-06-03 16:34:23 +01:00
JordanandGitHub 228e84e555 fix: Improve edit processing (#2247) 2023-06-01 15:11:16 +01:00
JordanandGitHub 03487718e7 feat: configurable image hosts (#2243) 2023-05-31 16:48:45 +01:00
JordanandGitHub a553961c05 refactor: switch to EnumSet for heightmaps to improve performance (#2248) 2023-05-27 14:25:07 +02:00
JordanandGitHub 3041ff3e50 feat: add -r (random rotate) flag to schem load and clipboard brush (#2244)
- Implements #1873
2023-05-25 19:06:20 +02:00
dordsor21 362f6cc6e1 fix #2009 2023-05-22 19:43:21 +01:00
JordanandGitHub 5dca925bc3 feat: make more commands unqueued (#2235)
* 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
2023-05-22 20:33:59 +02:00
JordanandGitHub 435161d566 fix: only send invalid region messages with debug true (#2238)
- Addresses #2188
2023-05-22 20:33:15 +02:00
JordanandGitHub 7c01c1e95e feat: allow captions in SuggestInputParseException (#2239)
- Deprecate for removal methods using string message
 - Fixes #2026
2023-05-22 20:32:56 +02:00
JordanandGitHub 74aff920a8 fix: fix universal disallowed blocks logic in limit and EditSession compilation (#2237)
- Fixes #2184
2023-05-22 20:32:36 +02:00
JordanandGitHub 2c7b529f67 fix: create single threaded executor for use with non-concurrent generators (#2236)
- Fixes #2228
2023-05-20 20:56:46 +02:00
JordanandGitHub 85f5006a0b fix: correctly handle creation of extents in EditSessionBuilder (#2232)
- Add regionExtent process to the queue (fixes #2227)
 - Correctly wrap extents in each other
2023-05-20 20:33:18 +02:00
JordanandGitHub 1b0fb9ed48 fix: more intuitive limit permissions (#2233)
- immediately return limit if unlimited (limit combination take the "higher" value)
 - add fawe.limit.unlimited permission and it's an intuitive permission to give
2023-05-20 20:32:38 +02:00
JordanandGitHub 3a13c4aaa7 chore: remove firework-chunk-loading prevention and default tick limiter to false (#2234)
- 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
2023-05-20 16:25:24 +02:00
JordanandGitHub e9b781d127 fix: correctly in initialise unlimited limit (#2231) 2023-05-20 16:22:02 +02:00
JordanandGitHub 2a08ad28a4 fix: correct issues with processor scopes (#2230) 2023-05-20 16:21:11 +02:00
dordsor21 dd6197922c fix: remove invalid file length check
- NBT is stored at the end of the clipboard file
 - Fixes #2209
2023-05-10 17:27:44 +01:00
JordanandGitHub 8cfb8cb322 chore: add chunk tickets to all chunks accessed (#2163)
- This isn't necessarily targeting any fix, but I think we should be ensuring a ticket is being added to chunks "access asynchronously", as done by the getChunkAtAsync method
2023-04-22 09:45:02 +00:00
JordanandGitHub 5cd9616507 fix: Ensure BaseBlock is not returned when a BlockState is wanted in BlockTransformExtent (#2161
- NBT will be handled appropriately at another point
 - Fixes #2085
2023-04-13 17:34:16 +01:00
JordanandGitHub e4158ac084 fix: invalidate cached FaweMask when a plot is unlinked (#2157)
* fix: invalidate cached FaweMask when a plot is unlinked
 - Fixes IntellectualSites/PlotSquared#3998

* Use a weakly-referenced copy of the copnncted plots set
2023-04-13 17:34:05 +01:00
a9e1d5009c fix: add null-check for brush in traceMask (#2160)
* fix: add null-check for brush in traceMask
 - Fixes #2149

* Switch to print from printError

Co-authored-by: Alexander Brandes <[email protected]>

---------

Co-authored-by: Alexander Brandes <[email protected]>
2023-03-31 20:45:34 +02:00
JordanandGitHub 508b94ddc3 feat: improvements to clipboard on disk (#2162)
* 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
2023-03-30 00:13:50 +02:00
dordsor21 d82bf0527e fix: use correct string for disallowed property use 2023-03-22 17:28:50 +00:00
JordanandGitHub 7ab04317fa fix: clear above and below plot gen heights if build heights are larger (#2153) 2023-03-17 21:56:48 +01:00
JordanandGitHub ae57ac5d50 fix: don't quash a cancellation FaweException in LimitExtent (#2068)
- This allowed some edits to continue after a player left the server when they shouldn't
 - Possible sort-of fix for #1985
 - Possible fix for #1955
2023-01-16 00:33:44 +01:00
JordanandGitHub 0d112b2913 fix: move main-thread call to be implementation from WorldWrapper (#1991)
- Fixes #1990
2022-10-23 21:22:53 +02:00
JordanandGitHub bf28ab47b8 fix: bring default min/max y in line with upstream in AbstractRegion (#1992)
- Fixes #1987
2022-10-23 21:22:43 +02:00
JordanandGitHub 2082df4141 fix: Add blocked blocks to the correct set (#1975)
* fix: Add blocked blocks to the correct set

* Address comment
2022-10-13 19:21:25 +02:00
JordanandGitHub 8971d7064c feat: Reduce any spam caused by exceptions thrown when writing history (#1976)
- Closes #1960
2022-10-13 19:21:02 +02:00
JordanandGitHub ccb31c0ecc fix: Do not cast y to byte in history database (#1978)
- y is/was already stored as an int
 - Fixes #1931
2022-10-13 19:20:17 +02:00
JordanandGitHub 878509406b fix: Add items to a player's inventory on the main thread (#1977)
- Fixes #1954
2022-10-12 20:48:56 +02:00
dordsor21 a1babd5ec9 biomes is now an two-dimensional array in CharSetBlocks
- Fixes #1878
2022-07-17 17:33:51 +01:00
dordsor21 3212dddb2d Fix BlendBall for no mask 2022-06-27 13:38:22 +01:00
JordanandGitHub 34ea713d29 Fix walls command on 1D/2D selection (#1821) 2022-06-24 15:04:11 +01:00
dordsor21 38d1a64bf5 Correctly recycle CharSetBlocks 2022-06-24 15:03:48 +01:00
dordsor21 9762e4e220 Add Object2ObjectArrayMap to "DoNotMinimiseThese" class
- Fixes #1839
2022-06-24 10:43:21 +01:00
JordanandGitHub 8094b68967 Actually implement ChunkHolder/ChunkSet pools (#1840) 2022-06-24 10:13:58 +01:00
JordanandGitHub 800988aae7 Assume a file not being in a subdirectory of root means a symlink is used (#1838) 2022-06-23 17:32:21 +01:00
dordsor21 010611c4ac Don't hide ChunkHolder generic "T" type paramter 2022-06-23 16:10:30 +01:00
JordanandGitHub 704f87da23 Re-implement incremental schematic names in a folder (#1833)
* Re-implement incremental schematic names in a folder
 - Fixes #1545

* Move fawe end comment

* Slight cleanup
2022-06-23 10:23:22 +02:00
JordanandGitHub 100288ada5 Implement a "sensitivity" setting, a mask, and an option to only distinguish air vs blocks to blendball (#1832) 2022-06-22 12:50:22 +01:00
JordanandGitHub d498996cbd Use Material rather than legacy int/data when specifying block break effect type (#1829) 2022-06-22 12:50:09 +01:00
968799503f Re-implement full Entity support in history, entity removal, entity creation, etc. (#1812)
Co-authored-by: Alexander Brandes <[email protected]>
2022-06-21 14:52:02 +01:00
dordsor21 d62c88a2ca Remove unused import 2022-06-21 13:00:19 +01:00
dordsor21 8b05738929 Remove P2 apidescription annotation 2022-06-21 12:58:21 +01:00
JordanandGitHub c5073d79e7 Account for use of MutableBlockVector3 in Spline Brush (#1831) 2022-06-21 12:56:02 +01:00
JordanandGitHub 3f103eea9b Set the correct delegate to the ChunkHolder when using get or set in NULL delegate (#1830) 2022-06-21 12:55:51 +01:00
dacb89a480 Bring stack in line with upstream using offset rather than direction (#1822)
Co-authored-by: Alexander Brandes <[email protected]>
2022-06-20 10:46:19 +02:00
JordanandGitHub 396faf6732 Support using //distr on console properly (#1827) 2022-06-19 22:35:36 +01:00
JordanandGitHub dac3610bcf Implement generation of biome decorations to //regen <biome> and add option for a random seed to be used (#1819) 2022-06-19 22:33:16 +01:00
JordanandGitHub 692a010c39 Actually apply source mask when using //paste -m <mask> (#1810) 2022-06-19 22:33:01 +01:00
JordanandGitHub 84f6039f41 Fix #fullcopy -r (#1816) 2022-06-19 00:59:11 +01:00
JordanandGitHub aadd35c0c4 Don't limit split size for extra block data (signs, spawner, etc.) (#1818) 2022-06-19 00:58:59 +01:00
JordanandGitHub 8e5204c311 Allow editing solely of tiles/entities/heightmaps (#1817) 2022-06-19 00:58:54 +01:00
JordanandGitHub 003cec30be Fix saving entities in DiskOptimizedClipboard when no tiles are present (#1815) 2022-06-19 00:58:47 +01:00
JordanandGitHub 907ad8528e Don't do the unbelievable bad use of a MutableBlockVector2 in the creation of a set (#1825)
* Don't do the unbelievable bad use of a MutableBlockVector2 in the creation of a set
 - Fixes IntellectualSites/PlotSquared#3683

* Clean up remnants of the use of MutableBlockVector2
2022-06-17 23:41:25 +02:00
JordanandGitHub d2b4154cc0 Properly support extended world heights (y > 255) in tripleBlockCoord (#1805) 2022-06-17 15:39:27 +01:00
JordanandGitHub fd00635533 Fixes to BlockMask and "char" masks (#1787)
* 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
2022-06-16 16:24:48 +02:00
JordanandGitHub f2bab901f4 The extent minY check in clipboard paste is un-needed as it is handled gracefully by FAWE (#1806)
- Fixes #1771
2022-06-16 16:24:00 +02:00
JordanandGitHub 1da987d594 Fix PNGWriter exporting blank PNGs (#1807)
* 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
2022-06-16 16:23:52 +02:00
JordanandGitHub ac11da855a Processor should be added to queue, not extent (#1809)
- Fixes #1559 root cause
2022-06-16 16:23:45 +02:00
JordanandGitHub 9395b3c575 Prevent unhinged tree generation by doing a sanity check on the block below/block of the tree placement (#1811) 2022-06-16 16:23:37 +02:00
dordsor21 462bba4f87 Fix biome history on 1.19 2022-06-15 18:52:49 +01:00
JordanandGitHub cb6e200ca6 Use the correct CuboidRegion constructor to prevent clipboard height being limited when loading schematics (#1798)
Use the correct CuboidRegion constructor to prevent clipboard height being limited when loading schematicsd
 - Fixes #1757
2022-06-15 13:37:32 +02:00
JordanandGitHub ea434163c4 Only create entities during a restore if they are contained by the region and the editsession's mask (#1800) 2022-06-15 13:37:20 +02:00
dordsor21 111d604075 Follow up to 39e1a811f7 to fix DOC loading 2022-06-14 17:20:59 +01:00
JordanandGitHub b797655d0c Only implement cache to MaskingExtent when off main thread (#1789)
* 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
2022-06-13 23:42:40 +02:00
JordanandGitHub 97ab47c90b Command block messages should be sent on the main thread as it causes a block update (#1796)
- Fixes #1786
2022-06-13 23:42:26 +02:00
dordsor21 f8583fb7cb Remove erroneous world height 256 limit 2022-06-13 15:11:39 +01:00
JordanandGitHub 63f031b01a Only synchronise tree generation at the very lowest level (#1788)
* 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
2022-06-13 09:05:18 +02:00
JordanandGitHub 02a6bb9b27 Implement limits to image size and load times (#1790)
* 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
2022-06-13 09:04:59 +02:00
JordanandGitHub da3fc2e6ea Fix DelegateSemaphore synchronisation issues on Spigot (#1781)
* Fix DelegateSemaphore synchronisation issues on Spigot
 - Also effectively nullify it on paper - the synchronisation on the object is enough

* Remove unneeded imports
2022-06-10 19:50:16 +02:00
JordanandGitHub 0b33fa8757 Allow NBT stored in DiskOptimizedClipboards to be written to disk as a compressed byte array at the end of the file (#1745)
* 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
2022-06-09 12:48:35 +02:00
JordanandGitHub 32231b48fe Avoid int overflow when using fillr in negative coords (#1711)
Fix int overflow when using fill and fillr in negative y-coordinates
2022-06-05 20:52:36 +02:00