Commit Graph

2262 Commits

Author SHA1 Message Date
Jordan
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
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
Jordan
ac11da855a
Processor should be added to queue, not extent (#1809)
- Fixes #1559 root cause
2022-06-16 16:23:45 +02:00
Jordan
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
Jordan
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
Jordan
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
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
aa94612b70
feat: Add support for 1.19 (#1783)
* 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>
2022-06-10 23:22:06 +02:00
Alexander Brandes
3ec17f3507
chore: Drop WEManager#cancelEditSafe() logger (#1779) 2022-06-10 01:26:59 +02:00
Alexander Brandes
d7d43869e6
chore: Update upstream
31e5298 Fixed //stack erroring when given a count of 0 (2108)
2022-06-10 01:05:51 +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
Owen
af234b284b
Add block break effect to area pickaxe (#1770)
* Add block break effect to area pickaxe

* Create pos lower

* Check before queueing block effect

* comment
2022-06-09 12:48:24 +02:00
Owen
a16074cbe4
Fix //snowsmooth not working below Y0 (#1769)
* Use min y instead of 0 for SnowHeightMap

* Correctly handle rounding for height

* Revert old fix

* Use y instead of newHeight

* Remove line diff
2022-06-07 12:06:03 +02:00
Jordan
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
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
Pierre Maurice Schwang
39d77091d9
Don't error when loading a schematic fails (#1744)
fix: Throwable#getMessage may be null
2022-05-16 13:23:21 +01:00
Jordan
deaf5ad2d6
Respect clipboard settings (disk vs memory) when loading a schematic (#1742) 2022-05-14 21:10:13 +01:00
Jordan
1c7643bb58
Allow use of BlockVectorSet for large //line selections instead of LocalBlockVectorSet (#1713) 2022-05-11 13:22:10 +01:00
dordsor21
059c5f046d
"Empty" side effects is default, and default does "apply" side effects 2022-05-10 17:28:09 +01:00
Jordan
b237ddf076
Cherry pick upstream commits to fix SideEffectSet (#1737)
* 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>
2022-05-10 10:11:12 +02:00
Jordan
267dc153f0
Don't initialise a DiskOptimisedClipboard before checking for an existing one in the LocalSession when using loadClipboardFromDisk (#1731) 2022-05-09 12:50:19 +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
82ba96bf71
Add constraints to //asc and //desc 2022-04-24 00:11:57 +01:00
dordsor21
f5ef0cadb6
Clean up remaining byte casts from 39081e62c9 2022-04-20 23:47:09 +01:00
Orlaando
3610af15e8
Show number of affected blocks in //set command (#1703)
* Show # of blocks affected in //set

* Fix typo

* fix: Add amount of blocks affected to strings.json

Co-authored-by: NotMyFault <mc.cache@web.de>
2022-04-19 08:55:19 +02: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
Pierre Maurice Schwang
d1588f9207
Fix tabcomplete for random pattern / multiple pattern (#1675)
* Merge RandomPatternParser#getSuggestions with upstream

* fix: don't throw AIIBE if patterns are empty

shouldn't be the case in the first place
2022-03-27 09:46:36 +02:00
NotMyFault
d400a470a1
Update upstream
5843aa5 Change vector command converter wording. (2059)
2022-03-13 19:19:59 +01: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
Alex
345785a25e
feat: Support for 1.18.2 (#1641)
* feat: Preliminary work for 1.18.2

* Update SpigotNames to 1.18.2 (#1642)

* 1.18.2 / Biome-Holders, regeneration (#1645)

* 1.18.2 / Biome-Holders, regeneration

* fix: reuse old structure sets

* build: Update dev bundles

* fix: Don't log regen world generation

* fix: Run DataConverter with CBT

* fix: Override `#toNativeBinary`

* fix: Exception on regen

Co-Authored-By: Pierre Maurice Schwang <mail@pschwang.eu>

* refactor: Minor cleanup

Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com>
Co-authored-by: Pierre Maurice Schwang <mail@pschwang.eu>
2022-03-07 15:20:05 +01:00
Jordan
dec0373081
Fix 1.17 snapshot restoration (#1632) 2022-02-27 21:20:16 +00: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
NotMyFault
f8e6feb1f2
Update upstream
17b9f00 Move tinyurls to ehub.to (2033)
76ec878 Allow biome commands to be used from non-player actors (2034)
2022-02-20 14:18:58 +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