Commit Graph

236 Commits

Author SHA1 Message Date
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