Commit Graph

312 Commits

Author SHA1 Message Date
Jordan
228e84e555
fix: Improve edit processing (#2247) 2023-06-01 15:11:16 +01:00
Jordan
03487718e7
feat: configurable image hosts (#2243) 2023-05-31 16:48:45 +01:00
Jordan
a553961c05
refactor: switch to EnumSet for heightmaps to improve performance (#2248) 2023-05-27 14:25:07 +02:00
dordsor21
362f6cc6e1
fix #2009 2023-05-22 19:43:21 +01:00
Jordan
435161d566
fix: only send invalid region messages with debug true (#2238)
- Addresses #2188
2023-05-22 20:33:15 +02:00
Jordan
7c01c1e95e
feat: allow captions in SuggestInputParseException (#2239)
- Deprecate for removal methods using string message
 - Fixes #2026
2023-05-22 20:32:56 +02:00
Jordan
74aff920a8
fix: fix universal disallowed blocks logic in limit and EditSession compilation (#2237)
- Fixes #2184
2023-05-22 20:32:36 +02:00
Jordan
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
Jordan
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
Jordan
e9b781d127
fix: correctly in initialise unlimited limit (#2231) 2023-05-20 16:22:02 +02:00
Jordan
2a08ad28a4
fix: correct issues with processor scopes (#2230) 2023-05-20 16:21:11 +02:00
Hannes Greule
71bac009db
Properly scale the random in SimpleRandomCollection (#2220) 2023-05-12 23:13:35 +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
360shvit
488a2e5de4
Add an explanation to Disallowed-Blocks Comment (#2186)
Improve user experience by adding an explanation to Disallowed-Blocks Configblock (#2183)
2023-04-22 16:48:59 +00:00
Jordan
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
Hannes Greule
90baa790c3
Make custom toArray methods fulfill the method contract (#2089)
* Make PropertyKeySet#toArray(T) fulfill the method contract

* Make LocalBlockVectorSet#toArray(T) fulfill the method contract
2023-03-06 13:57:40 +01:00
Hannes Greule
8a3052683e
Use unsynchronized buffered OutputStream for history (#2127)
* Use unsychronized buffered OutputStream

* Add note

* Avoid synchronization on DataOutputStream#write
2023-03-06 13:54:35 +01:00
Hannes Greule
1904b1fdd6
Fix reading block states in no redo mode (#2119) 2023-02-27 16:31:15 +01:00
Alexander Brandes
1e5b2fe0de
Back to snapshot for development 2023-02-07 23:25:17 +01:00
Hannes Greule
321a39f121
Remove PlayerMoveEvent listener and deprecate MovableTool (#2083)
Remove PlayerMoveEventListener and deprecate MovableTool
2023-02-07 23:07:57 +01:00
Hannes Greule
f9d6b127e6
Use Pattern Matching for instanceof in PropertyKeySet (#2086) 2023-02-07 23:07:31 +01:00
Hannes Greule
158e51191f
Linear Patterns require flooring division (#2079)
Use floorDiv in linear patterns
2023-01-31 11:21:11 +01:00
Alexander Brandes
09d405935a
Release 2.5.1 2023-01-23 12:37:45 +01:00
TheJonstone✓
0f558425f5
Fix: remove unnecessary bypass permission (#2060)
Fix: remove unnecessary permission
2023-01-16 00:34:28 +01:00
Jordan
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
Hannes Greule
bb0e201c52
Remove usages of JoinedCharSequence (#2062) 2023-01-11 00:07:24 +01:00
Jordan
0d112b2913
fix: move main-thread call to be implementation from WorldWrapper (#1991)
- Fixes #1990
2022-10-23 21:22:53 +02:00
Jordan
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
Jordan
8971d7064c
feat: Reduce any spam caused by exceptions thrown when writing history (#1976)
- Closes #1960
2022-10-13 19:21:02 +02:00
Jordan
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
Aurélien
2e386ea391
Fix region restrictions with methods non-overriden (#1948)
Fix region registrictions with methods non-overriden
See https://github.com/IntellectualSites/fastasyncvoxelsniper/issues/195 for context
2022-10-03 11:20:53 +02:00
Alexander Brandes
4f26561cc1
Release 2.4.6 2022-09-21 16:41:07 +02:00
Pierre Maurice Schwang
ab55d07ffd
Fix #saturate-Pattern (#1944)
* fix: block type access + resources in #saturate pattern

* chore: no need to download jar file in loadModTextures
2022-09-21 16:17:41 +02:00
Alexander Brandes
1706d64ddf
Retrieve the latest asset release version automatically (#1947)
* 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>
2022-09-15 21:19:31 +02:00
Alexander Brandes
129f4f37a3
chore: Update assets to 1.19.2 (#1900) 2022-08-07 11:44:40 +02:00
Aurélien
e942175559
Improve `MainUtil#copyFile` (#1888) 2022-08-02 11:25:56 +02:00
Alexander Brandes
7a498497c5
chore: Use 1.19.1 asset URL (#1889) 2022-08-01 09:50:27 +02:00
dordsor21
a1babd5ec9
biomes is now an two-dimensional array in CharSetBlocks
- Fixes #1878
2022-07-17 17:33:51 +01:00
Aeliios
902f153929
Getting correct String from CompoundTag (#1867) 2022-07-03 12:43:03 +01:00
dordsor21
3212dddb2d
Fix BlendBall for no mask 2022-06-27 13:38:22 +01:00
Alexander Brandes
f812fc14ab
build: Release 2.4.0 2022-06-27 13:52:50 +02:00
dordsor21
38d1a64bf5
Correctly recycle CharSetBlocks 2022-06-24 15:03:48 +01:00
Jordan
8094b68967
Actually implement ChunkHolder/ChunkSet pools (#1840) 2022-06-24 10:13:58 +01:00
dordsor21
010611c4ac
Don't hide ChunkHolder generic "T" type paramter 2022-06-23 16:10:30 +01:00
Jordan
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
Jordan
d498996cbd
Use Material rather than legacy int/data when specifying block break effect type (#1829) 2022-06-22 12:50:09 +01:00
Jordan
968799503f
Re-implement full Entity support in history, entity removal, entity creation, etc. (#1812)
Co-authored-by: Alexander Brandes <mc.cache@web.de>
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
Jordan
c5073d79e7
Account for use of MutableBlockVector3 in Spline Brush (#1831) 2022-06-21 12:56:02 +01:00
Jordan
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
Jordan
84f6039f41
Fix #fullcopy -r (#1816) 2022-06-19 00:59:11 +01:00
Jordan
8e5204c311
Allow editing solely of tiles/entities/heightmaps (#1817) 2022-06-19 00:58:54 +01:00
Jordan
003cec30be
Fix saving entities in DiskOptimizedClipboard when no tiles are present (#1815) 2022-06-19 00:58:47 +01:00
Jordan
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
Jordan
d2b4154cc0
Properly support extended world heights (y > 255) in tripleBlockCoord (#1805) 2022-06-17 15:39:27 +01:00
Jordan
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
Jordan
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
dordsor21
111d604075
Follow up to 39e1a811f7 to fix DOC loading 2022-06-14 17:20:59 +01:00
Owen
39e1a811f7
Don't apply offset to SimpleClipboard (#1751)
* Fix offset

* Don't apply offset in SimpleClipboard

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-06-13 23:42:50 +02:00
Jordan
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
Jordan
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
Jordan
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
Alexander Brandes
e54cae33f1
build: Release 2.3.0 2022-06-10 23:34:05 +02:00
Alexander Brandes
3ec17f3507
chore: Drop WEManager#cancelEditSafe() logger (#1779) 2022-06-10 01:26:59 +02:00
Jordan
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
Jordan
198c6b7800
Some fixes and improvements to internal queuing (#1715)
* 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
2022-06-05 20:52:28 +02:00
Jordan
8228b798e5
Implement biomes to filter blocks and use in Clipboard pasting (#1743)
- Fixes #1741
2022-06-05 20:52:14 +02:00
Alexander Brandes
3a65c64977
chore: Use correct since annoation dates 2022-05-18 21:50:20 +02:00
Alexander Brandes
3c4695bb73
build: Release 2.2.0 2022-05-18 21:46:22 +02:00
Jordan
1c7643bb58
Allow use of BlockVectorSet for large //line selections instead of LocalBlockVectorSet (#1713) 2022-05-11 13:22:10 +01:00
Jordan
210ee9f2ef
Implement getNameUnsafe method to allow an unloaded world's name to be accessed (#1712)
* 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>
2022-05-05 21:39:45 +02:00
Jordan
e294245ec4
Fix some horrendous code where methods supposed to return a boolean only ever return true (#1718) 2022-04-24 18:03:40 +02:00
dordsor21
f5ef0cadb6
Clean up remaining byte casts from 39081e62c9 2022-04-20 23:47:09 +01:00
Pierre Maurice Schwang
6e26741fdc
fix: respect block categories in RichMaskParser (#1694) 2022-04-11 13:59:54 +02:00
NotMyFault
4970db0405
chore: Use assets for 1.18.2 2022-03-29 12:53:19 +02:00
Jordan
5a97b23347
Don't error when adding processors to NullExtent, simply do nothing (#1654) 2022-03-13 18:35:27 +01:00
NotMyFault
95512a4c0b
build: Release 2.1.0 2022-03-10 22:57:23 +01:00
Jordan
e9db749e2f
Add fluid ticking and refactor post-processing a bit (#1554)
* 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>
2022-03-10 15:27:25 +01:00
Alex
5d18e15128
Replace JB occurrences with JSR 305 (for now) (#1651)
* refactor: Replace JB occurrences with JSR 305 (for now)

* chore: Update adapter jar
2022-03-10 14:24:44 +01:00
Jordan
b8ab2a5204
Don't allow heightmap-based brushes to edit the entire world "depth" (#1617)
Fixes #1614

Co-authored-by: Alex <mc.cache@web.de>
2022-02-24 10:33:37 +01:00
Jordan
fc2662e51e
Fix //snapshot in 1.18 and re-implement biome/entity restoration (#1620)
* 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>
2022-02-24 10:33:25 +01:00
Jordan
28a0239437
Fix clipboards to allow proper heights by allowing extended CuboidRegion heights (#1624)
* Fix clipboards to allow proper heights by allowing extended CuboidRegion heights
Fixes #1534

* Add @since

* Fix javadoc comment

Co-authored-by: Alex <mc.cache@web.de>
2022-02-24 10:32:45 +01:00
Jordan
39081e62c9
byte cannot be used to represent height anymore (#1618)
Fixes #1593
2022-02-17 19:34:25 +01:00
Jordan
f7a0c14a1b
Correctly use getNearestSurfaceTerrainBlock in SurfaceSpline and SchemGen (#1616)
Fixes #1609
2022-02-17 19:34:07 +01:00
dordsor21
3f28a5759d
Make slope method slightly more readable in AngleMask 2022-02-16 18:18:58 +00:00
dordsor21
05bd84b504
Don't crazily initialise HeightMapFilter...?? 2022-02-16 17:47:43 +00:00
dordsor21
3e85369765
Make angle pattern slope a little more readable 2022-02-16 17:42:22 +00:00
Pierre Maurice Schwang
f657a80dc6
fix: set size of MappedByteBuffer accordingly (#1608) 2022-02-13 13:57:19 +01:00
Pierre Maurice Schwang
646a683f22
fix: add coordinates to tile-entity nbt component (#1607) 2022-02-12 13:38:37 +01:00
NotMyFault
d80bfc7495
docs: Update wiki link 2022-02-04 11:16:23 +01:00
Jordan
6a972e7b99
Heightmaps used for brushes etc. should be normalised to zero. (#1522)
* Heightmaps used for brushes etc. should be normalised to zero.
Fixes #1508

* chars are unsigned

* Add scale paramer to javadoc
2022-01-14 10:49:23 +01:00
Alex
9ba90d8c83
refactor: Drop custom snakeyaml implementation (#1523)
* refactor: Drop custom snakeyaml implementation

* Merge branch 'main' into chore/main/remove-snakeyaml-wannabe-abstraction
2022-01-09 10:55:16 +01:00
dordsor21
c2f3c13a09
Fix #1510 2022-01-08 18:10:14 +00:00
Alex
64442a8051
refactor: Tackle a few Semgrep and ErrorProne violations (#1520)
* refactor: Tackle a few Semgrep and ErrorProne violations

* Address comments
2022-01-07 12:45:53 +01:00
dordsor21
722c411219
Add workaround for when expressions are parsed in masks/patterns where '&&' is used
Fixes #1517
2022-01-05 17:46:18 +00:00
Owen1212055
c27a34ce40
feat: Add worldedit.schematic.list.other permission and functionality (#1507)
* Add worldedit.schematic.list.other permission and functionality

* Implement StringMan#containsUuid

* Javadocs

* chore: Add since annotation

Co-authored-by: NotMyFault <mc.cache@web.de>
2022-01-05 16:21:44 +01:00
NotMyFault
b8399abfe1
refactor: Deprecate tick limiter API for public use 2022-01-04 20:33:05 +01:00
NotMyFault
7e96853b89
docs: Fix deprecation tag 2022-01-01 18:46:28 +01:00
dordsor21
0994ea1e67
Fix issue with offset/origin when pasting a clipboard via API without wrapping into a BlockArrayClipboard 2021-12-30 16:05:16 +00:00