Commit Graph

1154 Commits

Author SHA1 Message Date
Maddy Miller
6e72ee00e9
Add morph brush (#2078)
* Add erosion brush

* Rename to the Morph brush, and add Erode and Dilate presets

Co-authored-by: Lewis B <lbobbermen@bigpond.com>
2022-06-04 14:03:32 +10:00
Maddy Miller
15bd7ff441
Increase default BlockState count (#2102) 2022-05-22 17:28:42 +10:00
Maddy Miller
3eefaa29dd
Fix block state mask with string properties (#2091) 2022-05-01 12:00:28 +10:00
wizjany
e715ccc3b4
Fix passenger entity saving and loading (#2058)
* Fix incorrect saving and subsequent loading of passenger entities in vehicles.

Originally from https://github.com/EngineHub/WorldEdit/issues/1763#issuecomment-1062429891.

Co-authored-by: wizjany <wizjany@gmail.com>

* Port to Fabric/Forge.

Rewrite in Sponge to use EntityArchetype.
Sponge is untested because WE doesn't properly build/run on it right now apparently?

* NBT Constants.

Co-authored-by: Red_Epicness <red.epicness@icloud.com>
2022-03-18 14:33:35 +10:00
wizjany
5843aa50e6
Change vector command converter wording. (#2059)
Hopefully will cut down on questions of how to use `//pos x,y,z`.
2022-03-13 02:38:50 +00:00
Octavia Togami
a6c05c22d8 [Forge] 1.18.2
Plus bonus debug and Fabric improvements
2022-03-04 22:03:12 -08:00
Maddy Miller
30e1601489
Apply update flag on later change (#2037)
* Apply update flag on later change

* Checkstyle

* Move entry point for UPDATE
2022-03-05 03:32:03 +00:00
Maddy Miller
76ec878eb2
Allow biome commands to be used from non-player actors (#2034) 2022-02-20 15:12:05 +10:00
Octavia Togami
17b9f00501
Move tinyurls to ehub.to (#2033) 2022-02-20 14:02:02 +10:00
JOO200
e485433805
Fix legacy error message output for WorldGuard commands (#2023) 2022-01-30 14:39:06 +10:00
Octavia Togami
fb50324767
Update worldedit-sponge to API 8 (#1771)
* Sponge 8 work

Remove text adapter

Debugging the bugs out

* Resolve compiling for latest Sponge

* Update for latest SpongeAPI 8 snapshots

* Fixed a few issues with Sponge8 WorldEdit. Command completions are still broken.

* Resolve completions

* Bump to Sponge API 8 release

* Remove VALIDATION as a supported SideEffect on Sponge for now.

* Append Sponge API version to archive name

* Implement regeneration on Sponge; currently hangs due to a Sponge bug.

* Fixed typo

* Fix commands without permissions and version handling

* Make changes from PR comments and re-add bStats

Co-authored-by: Madeline Miller <mnmiller1@me.com>
2022-01-29 18:02:42 +00:00
Octavia Togami
3e07a99241
Merge branch 'master' into feature/sponge-schematic-3 2022-01-23 11:52:15 -08:00
Octavia Togami
fb5ec19942
Fix error for snapshot restore missing chunk 2022-01-02 15:52:40 -08:00
JOO200
757bef1f7d
Fix for #1983, Use Math.floor instead of int cast (master branch) (#1989) 2021-12-29 14:58:56 +10:00
JOO200
3fa364b448
Fix for #1983, Use Math.floor instead of int cast (#1986) 2021-12-28 21:16:16 +10:00
Octavia Togami
c554d7572e
Refactor the selector choice enum to be cleaner
Fix gradle checks
2021-12-23 21:09:30 +10:00
Madeline Miller
6c20cf21c1
Add a //pos command to set multiple positions at once
pre-emptively fix what octy is definitely going to pull me up on in the review

Rename pos2Extra to pos2

Fixex extra line

Apply suggestions from code review

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

Directly use pos2 as a list

Add an -s arg to set the selector type

Update pos1 text
2021-12-23 21:09:27 +10:00
Madeline Miller
98c93d011b
Merge remote-tracking branch 'origin/version/7.2.x' into chore/merging-to-master 2021-12-21 20:16:52 +10:00
Madeline Miller
d0ecd8da78
Merge 1.18.1 to master 2021-12-21 20:09:55 +10:00
Brokkonaut
9843a4feb3
Fix snapshots in 1.18 (#1959)
* Fix snapshots in 1.18

* use Int2ObjectOpenHashMap

* Fix loading zipped snapshots that contain an entities folder

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2021-12-14 17:32:39 +00:00
Octavia Togami
6df194e569
Remove finalize, use a Cleaner instead (#1943)
* Remove finalize, use a Cleaner instead

* Enable tracing by default

* License fix

* Use the more correct extent
2021-12-14 04:08:45 +00:00
wizjany
20c42b51c8
Extract log4j version to Versions.kt.
Also bump to match underlying platform versions to resolve runtime
version mismatches.
2021-12-12 18:49:32 -05:00
wizjany
5ce37d7ab2
Merge branch 'version/7.2.x' into snapshot-testing/1.18 2021-12-02 15:15:05 -05:00
wizjany
f53282715e Remove height from //expand vert.
With new world height limits, this will cause more confusion than good.
`//outset -v` or `//expand u,d` can replicate the previous behavior.
2021-11-30 22:19:14 -05:00
wizjany
f534b61f30 Theoretically works on forge. 2021-11-30 16:01:06 -05:00
Octavia Togami
29f1c66157
If a trace hits the world limit, cancel it (#1942) 2021-11-21 02:13:45 +00:00
Lilly Tempest
de6fa17b01
Add getBrush helper for use with instanceof pattern matching (#1926)
Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2021-11-21 02:02:59 +00:00
Octavia Togami
09bdf0a629
Merge branch 'version/7.2.x'
Oh god this was so awful
2021-11-20 17:23:24 -08:00
wizjany
c4074717b3
Re-add class shutter with tweaks. (#1947)
We want to hide default-package classes, such as "com", "io", etc. which are common names
in Mojang obf classes but also common package names, without hiding generated default-package
classes such as described in #1895.

This reverts commit 6008fe73
2021-11-19 19:47:21 +00:00
Octavia Togami
21e65e3958
Update Kotlin version so it builds 2021-11-18 22:12:45 -08:00
Octavia Togami
53559192b4
Fix the build a bit
Improved checkstyling
2021-11-14 00:15:22 -08:00
wizjany
d48530cb67
Don't allow editing without a Bukkit Impl Adapter. (#1920)
* Don't allow editing without a Bukkit Impl Adapter.

Also fix up some failed adapter checks.

* Make config a string, log warning message.

* checkstyle
2021-10-23 16:42:14 -07:00
Octavia Togami
6008fe7333
Remove class shutter
Runtime classes are no longer conflicting. Fixes #1895.
2021-09-12 16:01:25 -07:00
Maddy Miller
fbf61ef9e8
Fix raise and lower deform brushes (#1889) 2021-09-10 23:10:09 -07:00
Madeline Miller
f1350111ca Merge remote-tracking branch 'origin/version/7.2.x' 2021-09-05 20:16:54 +10:00
Maddy Miller
b1c230d36a
Add conditional checking in help command (#1888) 2021-09-04 12:06:15 +10:00
Madeline Miller
81f98b7b96 Merge branch 'version/7.2.x' 2021-08-22 14:36:57 +10:00
Madeline Miller
f049d5613f Revert "Use a Guava Cache instead of a ThreadLocal (#1859)"
This reverts commit b9f0416624.
2021-08-22 13:45:33 +10:00
Octavia Togami
ed28089628
Don't crash if fields are null in ChunkDeleter (#1874)
Fixes #1873
2021-08-22 13:27:25 +10:00
Maddy Miller
c5a4450373
Internally use a negated mask class to prevent russian doll wrapping (#1877) 2021-08-21 15:45:57 +10:00
JOO200
1397ec769f
Add Snow Smooth Tools (#1580)
* Added Snow Smooth Tools

* Added missing javadocs

* Restore backwards compatibility

* Use isAir and isLiquid instead of checking exact types

* Changed message for smoothing snow

* Use IntegerProperty instead of Property<Object>

* Requested changes from review

* Added missing ":", consistent command description

* Drop unnecessary try-catch for snow layer property

* Removed configuration arguments for gaussian kernel

* Removed duplicated code fragments to calculate the heightmap

* Fixed switched x and y coordinates

* Added missing point for checkstyle

* Changed command usage as requested

* Reordered flag for //snowsmooth, nicer formatting

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2021-08-19 12:55:50 -07:00
Madeline Miller
9de6b87948 Bump language files 2021-08-16 17:30:32 +10:00
Madeline Miller
515863da1f Merge branch 'version/7.2.x' 2021-08-09 20:17:59 +10:00
Maddy Miller
4277cb5239
Use MethodHandle for faster event bus (#1865)
* Use MethodHandle for faster event bus

* Implement hashCode/equals

* Apply review comments

* Bind to the object directly
2021-08-09 19:06:00 +10:00
Maddy Miller
8ee45137aa
Fix Cycler tool not using full block data (#1868) 2021-08-08 08:23:44 -07:00
Octavia Togami
b9f0416624
Use a Guava Cache instead of a ThreadLocal (#1862)
This allows high performance without leaking memory, and works around
the JVM bug with ThreadLocals. See #1722.
2021-08-02 10:21:13 -07:00
Octavia Togami
2e45a20348
[Forge] Update to 1.17.1 (#1847)
* [Forge] Update to 1.17.1

Includes minor updates to Fabric as well.

water and water and water water

* Fix a few things

* Move to latest versions of FG/Forge

Also drops TrueZIP in dev
2021-07-28 23:01:35 -07:00
Matthew Miller
f414af50f6
Fix the offset mask forcing negation of itself (#1656) 2021-07-20 18:50:12 -07:00
Madeline Miller
a383d9164a Merge branch 'version/7.2.x' 2021-07-18 16:06:48 +10:00
Matt
fb1fb84965 Fixed typo and grammar 2021-07-16 11:31:35 -07:00
Maddy Miller
8b38f6fbc0
Support 48x48x48 drawsel on 1.16+ (#1826)
* Support 48x48x48 drawsel on 1.16+

* Also update the chat message on //drawsel

* Extract the code

* Split the x/y/z

* angry reacts only
2021-07-16 20:14:46 +10:00
Matt
27baceca85 Fixed typo 2021-07-15 21:33:17 -07:00
Octavia Togami
2f6b50a427
Update for final changes 2021-07-14 21:49:55 -07:00
Octavia Togami
e1892b7bd4
Fix imports 2021-07-14 21:49:55 -07:00
Octavia Togami
a5ce8a4765
Licenses lol 2021-07-14 21:49:55 -07:00
Octavia Togami
bd475b1d4a
Update to Sponge Schematic 3
Includes a major refactoring of how schematics are read.
2021-07-14 21:49:54 -07:00
Octavia Togami
76a30080c5
Merge branch 'version/7.2.x' into feature/117-for-master 2021-07-14 13:36:14 -07:00
wizjany
5a143b83b2
Fix setting biomes on negative-Y-enabled worlds. (#1833)
Also left a note for forge, again.

Closes #1819.
2021-07-14 13:34:50 -07:00
NotMyFault
9c7f4542a2
Fix a couple of typos (#1835)
* Fix typo in BukkitImplAdapter

* Yet another dangling typo
2021-07-14 08:08:34 -07:00
Octavia Togami
8a830814df
Merge branch 'version/7.2.x' 2021-07-13 14:38:26 -07:00
Maddy Miller
954210deb8
Fix //outline for non-cuboid regions (#1827) 2021-07-13 11:10:11 +10:00
Octavia Togami
40ded939ef
Fix loading legacy invalid blocks 2021-07-04 16:55:27 -07:00
Octavia Togami
0790e6e5d8
Fix CLI Mess (#1811)
* Fix CLI awfulness

* Fix indentation

* Licenses
2021-07-01 09:44:44 -07:00
Octavia Togami
fbb047a0c1
Optimize legacy schematic loading (#1808)
* Optimize legacy schematic loading

* Be more DRY
2021-06-30 17:02:10 -07:00
Matt
f91e8e4071
Fixed incorrect version numbers in javadocs (#1810) 2021-06-30 12:11:23 -07:00
Octavia Togami
728a152395
Skip notify if chunk section doesn't exist (#1794)
* Skip notify if chunk section doesn't exist

* Include forge in this change

* Pass chunk to mark/notify directly, update adapters.

Co-authored-by: wizjany <wizjany@gmail.com>
2021-06-26 14:59:21 -07:00
BloodEko
183ae4a140
Improve mask api (#1793)
* Improve mask api

* Revert javadocs change
2021-06-21 15:07:59 -07:00
Madeline Miller
b8a9c0070c Merge branch 'version/7.2.x' 2021-06-19 15:19:32 +10:00
Octavia Togami
043c3315aa
Fix Scuffed POMs (#1779)
* Repair fabric POM

* Fix-up a ton of publishing errors

* Remove shadow jar from publishing

* Remove shadow application from platform/core
2021-06-13 11:32:38 -07:00
Octavia Togami
e2ad0427ef
Update bundled language files 2021-06-12 00:45:38 -07:00
Octavia Togami
3393d2701c
Try require for snake yaml 2021-06-11 14:46:10 -07:00
Octavia Togami
4d6c1973f3
Parallelize tests properly 2021-06-11 14:12:09 -07:00
Octavia Togami
a0a3e0f5f1
De-parameterize vector tests 2021-06-11 13:58:58 -07:00
Octavia Togami
8cc6e7159b
Allow upgrading snakeyaml 2021-06-11 12:45:38 -07:00
Octavia Togami
c8e5f277c1
Update MCUtils for 1.17 (#1774)
* Update MCUtils for 1.17

* Re-add deprecated grass_path
2021-06-11 12:38:22 -07:00
Octavia Togami
7676a2d54c
[Fabric] Update to 1.17 (#1772) 2021-06-08 19:18:24 -07:00
Octavia Togami
95160027d9
Register platforms and commands in a more proper way (#1766)
* Register platforms and commands in a more proper way

Platforms are now register "on load"/initialize/etc., and preferreds are
chosen just prior to command registration events. This allows us to
properly hook in to reload. Additionally, we now have the capability to
reload data with /minecraft:reload, though this is not yet implemented.

* Correct javadocs on queryCapability

* Flatten BukkitImplAdapter Lifecycled
2021-06-04 17:12:23 -07:00
Octavia Togami
67c99bed36
Merge branch 'version/7.2.x' 2021-05-25 18:10:14 -07:00
wizjany
76147474d8
Fix author/name swap in //schem share. 2021-05-25 15:26:46 -04:00
Maddy Miller
8e5020fd8a
Add splatter brush (#1657)
* Add splatter brush

PR feedback - 3d splatter

Add splatter brush (#1547)

* Move the splatter brush into a mask

* Fix PR notes

Co-authored-by: Lewis B <lbobbermen@bigpond.com>
2021-05-25 18:46:05 +10:00
Octavia Togami
5a7cbfd6ef
Fix selecting at 0,0,0 or radius 0 cyl/ellipse (#1734) 2021-05-23 23:37:24 -07:00
Maddy Miller
6e2b0a1df8
Allow plugins to register new clipboard share destinations (#1707)
* Allow plugins to register new clipboard share destinations

* Rename file, as per request

* Don't use the base enginehub name for EH_pastebin

* Address review comments

* Fixed wrong usage

* Use a second metadata class for clipboard shares

* Newline

* Address comments

* Improve docs

* Apply suggestions from code review

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

* Use a consumer so that we handle serialization

* Update worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

* Update worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/share/ClipboardShareDestination.java

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

* Update worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/share/ShareOutputConsumer.java

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

* Update worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/share/ShareOutputConsumer.java

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

* Fixed a lot of random comments

* Return a consumer from share rather than a URL, allows the share destination to control output

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2021-05-24 16:00:55 +10:00
Octavia Togami
876108fdb3
Prepare for Gradle 7, but due to FG only get to 6.9
Gradle 7 stuff requires FG 5. Phooey.
2021-05-13 22:01:45 -07:00
Octavia Togami
10c8a11d7d
Merge branch 'version/7.2.x' 2021-04-22 11:18:28 -07:00
Octavia Togami
98adde2c88
Allow toggleplace to work on any Actor + Locatable (#1723) 2021-04-09 20:07:11 -07:00
Octavia Togami
504b8bb249
Merge branch 'version/7.2.x' 2021-04-06 13:56:47 -07:00
Octavia Togami
c7da4c0ade
Swap out logback for log4j2 2021-04-05 10:50:39 -07:00
wizjany
acf9c3b2e1
Change oak stair shape to straight in legacy.json. 2021-04-05 09:22:51 -04:00
Matthew Miller
97a4df96c3 Merge branch 'version/7.2.x' 2021-04-05 13:14:38 +10:00
Octavia Togami
609c7b8cc4
Scrapped Logging Framework 4 Java (#1715)
* The scramble is complete

* Fix version decl for Bukkit Log4J

* Swap out to a compatibility layer for LogManager

Slightly slower, but compatible across all Java versions

* Piston released with SL4JF removal

* Clean up declarations a bit
2021-03-28 20:35:48 -07:00
wizjany
acd63daddf
Slightly improve usability of LocalSession#getSelection. (#1714)
Allow the World param to be null, throwing IncompleteRegionException.

This allows calling `getSelection(getSelectionWorld())` without having
to separately null-check the World.
Also, add a convenience overload which does so: `getSelection()`.
2021-03-25 00:06:05 -04:00
Matthew Miller
4cd7dc4bcd
Ignore suggestions when uppercase characters are used in props (#1705) 2021-03-13 15:57:03 +10:00
Matthew Miller
9a5ef70858
Attempted fix for NBT Data Fixer error (#1689) 2021-03-11 10:04:00 +10:00
Octavia Togami
79fe1deca9
Merge branch 'version/7.2.x' 2021-03-10 13:08:47 -08:00
Octavia Togami
7d06279249
Attempt to fix FSSD test with weird win paths (#1699) 2021-03-10 12:35:35 -08:00
Octavia Togami
3194af3aa7
Merge branch 'version/7.2.x' 2021-03-10 01:59:36 -08:00
Matthew Miller
d3810865c8
Show a message with install instructions when running the jar file (#1682)
* Show a message with install instructions when running the jar file

* Typo

* Fixed checkstyle issue

* Slightly modify message to adapt to the type of install

* Clean up the display code a lot

* Allow line breaks before semi

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2021-02-22 22:05:23 -08:00
Matthew Miller
913d4d67aa Fix erroneous deprecation check 2021-02-18 21:39:43 +10:00
Octavia Togami
e94f082b07
Improve speed of BlockState init, tick watchdog (#1680) 2021-02-17 11:22:35 -08:00
Matthew Miller
2c7ac3d21f
Merge pull request #1611 from EngineHub/feature/nbt-parsing
Add NBT Parsing for items
2021-02-15 20:42:52 +10:00
Octavia Togami
b7880c2f4a
Lazify some more conversions 2021-02-15 02:02:14 -08:00
Octavia Togami
b67fff6662
Use the convience methods for assembly 2021-02-15 01:56:06 -08:00
Octavia Togami
fb5d7f8af5
Revert to old behavior of coercing 2021-02-15 01:53:45 -08:00
Octavia Togami
23a4e2d6fd
Lazily compute NBT 2021-02-15 01:51:24 -08:00
Octavia Togami
e1cc6bc948
Revert changes to legacy files, deprecate 2021-02-14 22:32:51 -08:00
Octavia Togami
3b25230f19
Finish reimplementing everything in adventure-nbt 2021-02-14 21:40:05 -08:00
Octavia Togami
0cabb82f9e
Merge branch 'version/7.2.x' 2021-02-11 00:42:34 -08:00
Matthew Miller
628c3f2ca1 Fix a few issues (and pretend 4.5.0 exists) 2021-02-09 20:41:47 +10:00
Matthew Miller
4ac2bb3e25 Further work on migrating to Adventure NBT 2021-02-08 22:07:52 +10:00
Octavia Togami
85c150e017
assorted changes™ 2021-02-06 02:51:44 -08:00
Matthew Miller
137c266e3a Migrate to adventure-nbt 2021-02-06 20:23:29 +10:00
Matthew Miller
476342a665
Fix the offset mask forcing negation of itself (#1656) 2021-01-31 13:01:31 +10:00
Matthew Miller
5aa81ff96e
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
2021-01-26 15:57:56 +10:00
Matthew Miller
69b1b5ebd5 Merge branch 'version/7.2.x' 2021-01-25 20:55:59 +10:00
Octavia Togami
9534a9cfce
Update so many dependencies, merge Forge/Fabric for final jar (#1651)
* Update so many dependencies, merge Forge/Fabric for final

* Clean up contrib docs for Gradle change

* Fix setting compat flags while using toolchain

* Fix deprecation in doc printer

* Restore proper forge JAR name

* Add dist classifier for mod jar

* Properly relocate new bStats

* Fix jar used from fabric

* Fix fabric bom

* Dup the shaded classes for consistency

* Sync Forge/Fabric log4j versions, de-dup

* Downgrade both log4j. This will work

* Update some plugins as well

* Drop the fabric force stuff

* Use duplicate strategy to directly merge jar
2021-01-25 02:14:09 -08:00
Matthew Miller
c4efc8be1b
Add a way to clear a registry's contents (#1645)
* Add a way to clear a registrys contents

* Delete latest.log
2021-01-17 16:50:00 +10:00
zml
0036e06f89
Alter the CUI lifecycle to be more consistent and reliable (#1633)
* Alter the CUI lifecycle to be more consistent

This handling reduces the platform-specific behaviour of CUI handshakes,
and ensures that the appropriate state is maintained when a client
connection ends but a LocalSession remains cached.

* Apply review suggestions

* fabric: Update to new networking API

* session: Correct field grouping for cui attempts
2021-01-16 13:07:29 +10:00
zml
f04ae2f1ec
Correct ellipsoidal selector initialization (#1632)
When the previous selection was a non-ellipsoidal region, the
started flag would not be appropriately set until a new selection
had been started.
2021-01-09 20:01:36 -08:00
Matthew Miller
303f5a76b2
Schematic Share system (#1591)
* Very WIP in-game schematic sharing system

* Add support for paste meta, and send that data when possible

* Add ability to specify the name of the shared schematic
2021-01-05 16:48:33 +10:00
Matthew Miller
df71f3ae7d
Add a command to apply side effects (#1623)
* [WIP] Add a command to apply side effects

* Fix checkstyle

* Switch to the //update command, and add messages

* The update command won't change in the future, remove that warning

* Create a Function that applies side effects for easier API usage, and make gmasks apply to `//update`

* Fixed `//update` not using the current side effect set

* Fixed PR review notes

* Fixed regression in last commit

* smh why is it null

* Update GeneralCommands.java

* PR review

* PR review

* :(

* :(
2021-01-05 16:19:45 +10:00
Matthew Miller
7a268b0b5d
Add WorldEdit version and platform to schematics (#1635)
* Add WorldEdit version and platform to schematics

* Use an actual platform ID rather than name, for more accurate info.

* Put the platform data within another nested tag

* Use a best-effort legacy platform ID

* Review changes

* Move the getId impl to Platform

* Review notes

* Review notes

* 😓
2021-01-02 21:01:40 +10:00
Matthew Miller
98c4580db9
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
2020-12-22 14:48:22 +10:00
Hannes Greule
544793d541 Properly repeat extents for negative coordinates
An extent's content was returned flipped when applied for negative positions, as e.g. `Math.abs(-2) % 3` returns 2 instead of 1 (as 1 + -1 * 3 = -2)

(cherry picked from commit b0cf5dd2bf1b9bcbf1c7efff0fe25de7ee9a2090)
2020-12-11 12:48:33 -08:00
Matthew Miller
15cba009f4
Persist default state of selwand and navwand in session (#1600)
* Persist default state of selwand and navwand in session

* Fixed some issues with the way it retained info

* Fixed it setting the wrong item

* A little cleaner

* I somewhat misunderstood the way this system worked - This is cleaner and works a lot better

* Replace with octy-approved UX

* Improve logic for default wand loading

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2020-12-09 15:03:42 +10:00
Octavia Togami
d0e6f9f33b Always load internal strings.json for default locale 2020-11-29 17:20:32 -08:00
Octavia Togami
be4d8a0839
Update language bundle 2020-11-28 15:08:43 -08:00
wizjany
d6b42a4816
Add instructions for unbinding tools/brushes on equip. (#1595)
* Add unbind instructions to tool/brush commands.

* Switch to suggest.

* Make component final.

* Start suggesting the unbind alias instead.
2020-11-28 09:13:03 -05:00
Octavia Togami
cc1f530aa4 Add the missing y variable to generate biome 2020-11-18 16:14:35 -08:00
Octavia Togami
4999018f36
Lower-case wand items on retrival from the config 2020-11-09 18:57:54 -08:00
Octavia Togami
0f6d52e07f
Fix javadoc for OffsetsMask 2020-11-02 15:08:14 -08:00
Octavia Togami
d742c0fe0c Move archive unpack into WE working dir 2020-10-31 02:02:09 -07:00
Octavia Togami
a615e01181
Use the new lang version format 2020-10-20 14:38:08 -07:00
Octavia Togami
367d95c6c3
Ensure that the wand can be used before giving it (#1566)
* Ensure that the wand can be used before giving it

* Add a note to //wand about new perm requirements

* It's an item, not an "object"

* Fix checkstyle
2020-10-18 12:28:28 -07:00
Octavia Togami
5876f18422
Fix licenses in doc files 2020-10-18 11:58:47 -07:00
Octavia Togami
a2243be3dc
Actually overwrite existing files in archiveunpack
Fixes #1567
2020-10-18 11:44:04 -07:00
Octavia Togami
f449e55f98
Update doc printer for lang changes 2020-10-17 22:32:27 -07:00
Octavia Togami
83e744bae2 Fix loading dev i18n files
This forces the repo file to FULLY OVERRIDE the default locale. Nothing
will be loaded from the default locale in either the config folder, or
the i18n dependency.
2020-10-17 14:55:10 -07:00
Octavia Togami
56182ad079 Make /toggleeditwand translatable 2020-10-17 14:00:10 -07:00
Octavia Togami
e320833961 Use /tool in /toggleeditwand description 2020-10-17 14:00:10 -07:00
Matthew Miller
28bdf7ff92
Add ^x,y,z relative offset support to the offset parser (#1545)
* Add ^x,y,z relative offset support to the offset parser

* Wrap in a try-catch
2020-10-10 15:49:13 +10:00
Octavia Togami
6073f6564d
Fix license/checkstyle 2020-10-09 12:11:58 -07:00
Octavia Togami
c2d818245e
Only use POSIX perms if supported 2020-10-09 12:01:04 -07:00
Octavia Togami
bc64990e7e
Move to packaged translations (#1555)
* Move to packaged translations

* License that file

* Fix some checkstyle too

* Support reloading translation files

* Add missing dash for unpack directory

* Mark unpacked zips as owner-only
2020-10-08 17:42:23 -07:00
Lewis B
beb784e0ff
Add -w flag to butcher for water mobs (#1548)
* Add -w flag to butcher for water mobs

* PR feedback
2020-10-05 13:50:20 +10:00
Lewis B
6925d3715a
Make block positions copy on click for //size (#1546)
* Make block positions copy on click for //size

* PR feedback
2020-10-04 16:08:21 +10:00
Matthew Miller
26d8306833
Fixed snow being placed through slabs (#1541)
* Added a method to check whether a block can be placed at a location

* Make the snow system only place at locations that it can by game logic

* Make canPlaceAt a default method

* Fixed PR comments

* Use a World field

* Just throw directly

* IAE makes more sense

* Remove unused import

* Check for editsession without a world
2020-10-02 16:53:05 +10:00
Matthew Miller
ec306ccaf1
Create an asset system, and add an image brush that uses it (#1514)
* Asset/Image brush management

* Create a beta assets system and make it a heightmap brush

Co-authored-by: KennyTV <jahnke.nassim@gmail.com>
2020-10-02 10:29:07 +10:00
Octavia Togami
8377a6bdac
Lower-case registry arguments in converter
Fixes #1542
2020-09-29 17:37:56 -07:00
Matthew Miller
a1313a0edd
Allow stacking by block units with //stack (#1539)
* Allow stacking by block units with //stack

* Delegate out the old method

* Use CuboidRegion as the type of the new region

* Fixed up PR notes

* Add docs

* No indent

* Formatting

* Use the bounding box rather than limiting it

* Don't limit to cuboid

* Make the old one use the block unit method

* Update the selection movement too

* Fixed affected being missed

* Use an assertion erorr
2020-09-29 19:38:26 +10:00
wizjany
25957c4498 Check limit == -1 in the copy/cut code.
Fixes #1540.
2020-09-27 13:30:52 -04:00
Matthew Miller
fd8dbdd7b7
Use block change limit for //copy and //cut (#1536)
* Use block change limit for //copy

* Use a cuboid region for accuracy

* Add a bounding box method to Region and use that

* Update worldedit-core/src/main/java/com/sk89q/worldedit/regions/Region.java

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2020-09-27 15:40:50 +10:00
Matthew Miller
eca310cf8f
Deprecate the non-Pattern methods in EditSession and fix a recursion loop (#1535) 2020-09-21 20:50:20 +10:00
Octavia Togami
204ef7a708 Fix variable argument functions in expressions
Fixes #1531
2020-09-19 19:18:39 -07:00
Octavia Togami
3094e7a6fc Store a set of offsets, not a list 2020-09-19 18:03:37 -07:00
Octavia Togami
534e7d3e40 Add a builder for OffsetsMask(2D) 2020-09-19 18:03:37 -07:00
Matthew Miller
46bcbe46bc Added an OffsetsMask, with a parser for an Exposed/Surface mask 2020-09-19 18:03:37 -07:00
Matthew Miller
d47f59e051 Removed redundant calculation in schematic commands 2020-09-19 19:43:39 +10:00
Matthew Miller
2056218b4a
Remove data versions from the Bukkit adapters (#1507)
* Remove data versions from the Bukkit adapters

* Don't allow saving schematics without an adapter in place on Bukkit.

* Removed confusing line
2020-09-19 18:00:43 +10:00
Octavia Togami
e575ffef2c
Move connections to neighbors update 2020-09-17 19:20:53 -07:00
Matthew Miller
ea1a512259 Fixed broken javadoc in RegenOptions 2020-09-14 17:32:52 +10:00
wizjany
e0b8b4856d Fix //chunk text and clarify the y-index in the help text.
Closes #1447.
2020-09-13 21:24:40 -04:00
wizjany
beca3a707d Workaround for snapshot files with not-to-spec slashes. 2020-09-11 21:12:12 -04:00
Octavia Togami
493bc2d1e1
Reject empty split array in block parser
Fixes #1521.
2020-09-07 11:09:26 -07:00
Octavia Togami
e15d7993ad
Improve requireTag exception messages
Closes #1519
2020-09-06 11:50:08 -07:00
Matthew Miller
65fbe09c35
Fixed undo/redo not working from console/commandblock (#1518) 2020-09-06 12:56:06 +10:00
Octavia Togami
0cb1eea55b Remove Y limits if a region has no world 2020-09-04 10:09:29 -07:00
Matthew Miller
84fa2bbbc6
Add a #air mask, the opposite of #existing (#1511) 2020-09-03 17:14:09 +10:00
Octavia Togami
3996998c5f Deprecate BlockQuirkExtent, handle lower down
Ice is no longer turning into water since before 1.7.10, so that part has been
removed entirely.
2020-08-28 20:57:10 -07:00
Matthew Miller
1a6fe32da6
Fixed non-Exception throwables being ignored in async tasks, and added a timed message (#1503)
* Fixed throwables being ignored and show a message while waiting for long running tasks

* Fixed checkstyle issue

* Use a better system that's more versatile

* Require a delay message for delayed repeating messages

* Few changes for PR review

* Changes based on feedback

* Fixed weird missed diffs

* Rename fields

* 😟😟😟😟

* 😠
2020-08-29 13:31:51 +10:00
Octavia Togami
7f82a7d666
Fix issue introduced by 4123eddff
lastValue may be null at this point, old is not
2020-08-28 18:10:08 -07:00
Matthew Miller
232ced85c0
Tick watchdog on get* calls (#1504) 2020-08-25 22:50:18 +10:00
Matthew Miller
61a5d7d648 Fixed undo/redo editsessions not retaining settings 2020-08-24 22:39:58 +10:00
Matthew Miller
4123eddff1 Few minor tweaks to WNA that don't modify behaviour but bring it more inline with how MC works 2020-08-24 22:15:46 +10:00
Octavia Togami
8205243ee8 Clean up code to format forms 2020-08-22 14:20:54 +10:00
Matthew Miller
254fe1296a Fixed review notes 2020-08-22 14:20:54 +10:00
Matthew Miller
49023a352c Use a multipart upload to improve size limits on pastebin uploads 2020-08-22 14:20:54 +10:00
Octavia Togami
5f868d58e2 Patch skull owner on 1.16+ 2020-08-21 14:00:37 -07:00
Matthew Miller
46c3fccae1 Updated MCUtils data for 1.16.2 2020-08-17 18:13:01 +10:00
Matthew Miller
8d33672b23
Added a brush for biomes (#1491)
* Added a brush for biomes

* IntelliJ reformat

* Move the warning

* Update worldedit-core/src/main/resources/lang/strings.json

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

* Use BiomeFactory instead

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2020-08-16 16:16:32 +10:00
wizjany
4a4c01cb18 Don't spew warnings/stacks when people symlink their schematics folder. 2020-08-15 09:50:34 -04:00
wizjany
365ca1c6ad Add -c to deform and make -o act like it does in //gen.
Should restore parity between the commands.
2020-08-14 13:59:48 -04:00
Octavia Togami
3bf5d0cd1e Create schematics folder on startup 2020-08-13 21:42:20 -07:00
Octavia Togami
f2ce020da0 Officially propagate GPL downwards to all files 2020-08-13 21:06:39 -07:00
Matthew Miller
0a9fa869c9
Fixed an issue where upwards resolved schematics would break schem list (#1481)
* Fixed an issue where upwards resolved schematics would break schem list

* Missed diff

* PR changes

* Further fixes

* Improve sorting logic

* Pass in comparator rather than using sort type

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2020-08-13 18:01:37 +10:00
Matthew Miller
55de7cb71e Fixed snapshot database under symlinks on windows 2020-08-11 01:30:57 -07:00
Octavia Togami
ffaf8e00be
Add tracing feature to EditSessions (#1301)
* Add tracing feature to EditSessions

This helps track down what plugin (or more specifically, extent) is
blocking actions from happening.

* Set a trace hook instead of a one-off command

* Correct the logic for determining tracing active

* Fix extra newline in AbstractPlayerActor

* Fix checkstyle

* Improve messaging of trace mode
2020-08-10 22:43:51 -07:00
Matthew Miller
94ce464f34 Fixed the Forge platform not exposing events, and added a comment about PoI 2020-08-09 22:44:44 +10:00
Matthew Miller
05014b1fc9 Add an update side effect. Only for Bukkit for now 2020-08-09 22:44:44 +10:00
Matthew Miller
5e5f1c21e0
Added a snow brush (#1462)
* Added a snow brush

* Re-add the Apply class for deprecation reasons

* Use the context extent rather than an EditSession

* Only freeze water source blocks.

* Fixed the bind message for snow stacker

* Fixed PR issues
2020-08-09 14:26:26 +10:00
Octavia Togami
f2e5c52f36
Fail if any mask fails to parse (#1465) 2020-08-03 20:23:02 -07:00
Octavia Togami
b0d5100e4e
Merge pull request #1460 from EngineHub/bugfix/default-wand-on-session-create
Do not check permissions for initial wand bind
2020-07-30 10:28:02 -07:00
Octavia Togami
1083a36df5 Determine if a player has an item bound for unbind 2020-07-30 10:27:54 -07:00
Octavia Togami
63ab406caf
Do not check permissions for initial wand bind
Also: report both errors if needed for sel/nav wands.
2020-07-27 18:41:21 -07:00
Octavia Togami
288ed7fa9f Re-shuffle regen methods to fix deprecation order
Everything delegates to the original EditSession signature. The new
RegenOptions + EditSession variant is removed, as it was never
officially published. A delegation check was installed in the
NAFC-marked method.
2020-07-26 13:22:26 +10:00
dordsor21
c4abc9a247 Allow regeneration to accept Extents instead of EditSessions.
Allows for custom Extents to be parsed to regen, and for clipboard regeneration, etc whilst still allowing EditSessions
2020-07-26 13:22:26 +10:00
Octavia Togami
36ef78779d
Drop requirement for root tag to be named
Sponge does not name the root tag, this allows us to almost load their
schematics (except for a bug
https://github.com/SpongePowered/SpongeCommon/pull/3085)
2020-07-21 19:04:49 -07:00
Octavia Togami
da4d70fab5 Regenerate list classes from MCUtils 2020-07-20 13:35:39 -07:00
Octavia Togami
5f9f10599e Change //stack and //move to take a full offset 2020-07-17 11:09:03 -07:00
Matthew Miller
043faaf55f
Add a stacker mode to the snow command (#1429)
* Convert simulateSnow to an Operation and add stacking support

* Fixed height calculations

* Use a LayerVisitor for SnowSimulator

* Fixed few issues

* Update the 1.16 block mappings, and use isSolid rather than !isTranslucent due to translucent no longer existing. A better solution should come later.

* I feel this is a better temporary check
2020-07-17 11:29:07 +10:00
Octavia Togami
9c81135b79
Fix bug with short-circuiting on || 2020-07-15 20:12:33 -07:00
Octavia Togami
1b568ded67 Use BiomeQuirkExtent instead of spotty handling 2020-07-15 20:10:25 -07:00
Octavia Togami
5803cb10b5 Fix 3D biome support testing
3D biomes always work on dedicated servers, at least as far as the
client knows. This is so terrible though. Mojang why.
2020-07-15 20:10:25 -07:00
Octavia Togami
7134ff4494
Remove all compile deps, use api/impl as appropriate 2020-07-15 18:48:47 -07:00
Octavia Togami
38b9ac9b03
Handle schematics with an invalid DataVersion 2020-07-13 12:19:26 -07:00
Octavia Togami
69b5cf541a
Validate number of format placeholders as well 2020-07-12 13:44:55 -07:00
Octavia Togami
3a3686289f
Add incremental translation checker
Only validates basic formatting, not number of arguments.
2020-07-12 12:57:07 -07:00
Octavia Togami
6845e86fdf
Fix leaking piston codes via update
Fixes #1436
2020-07-12 11:57:16 -07:00
wizjany
9d9aaac15a Add fungi and chorus plant tree types.
Closes #1411.
2020-07-12 14:34:48 -04:00
Octavia Togami
93e386a5c1
Remove ShutdownHook / onExit handling
This didn't work right, and if we fail to cleanup, it's unlikely it
would succeed at exit.
2020-07-09 20:16:48 -07:00
Octavia Togami
50a744f434 Cleanup asserts, condition in extending selector 2020-07-07 20:38:57 -07:00
Octavia Togami
21adeae496 Add TODO for JSON in BaseBlock back 2020-07-07 20:38:57 -07:00
Octavia Togami
81f6e3e7cf Cleanup some javac warnings 2020-07-07 20:38:57 -07:00
Octavia Togami
eb52afa296 Create a brand new checkstyle config
And also apply it!
2020-07-07 20:38:57 -07:00
Octavia Togami
59ccc0a5af CRLF -> LF
Except `.\gradlew.bat`, because Windows is special.
2020-07-07 20:38:57 -07:00
Octavia Togami
781abd511d Add final to many fields 2020-07-07 20:38:57 -07:00
Octavia Togami
c50170a361
Add license to ShutdownHook 2020-07-07 19:12:46 -07:00
Octavia Togami
176418bad1
Add force-deletion utilities for cleaning up dirs
Windows sucks.
2020-07-07 14:46:29 -07:00
Matthew Miller
d10d7d699c Release 7.2.0 Beta 2 2020-07-06 20:42:24 +10:00
Matthew Miller
9b4bfbed2d
Localise WorldEditException and error handling (#1393)
* Localise the ExceptionConverter

* Further work on localising exceptions

* Everything but input parsing is now localised

* Finish making errors localisable

* Fixed a few notes from review

* Fixed another spot

* More changes

* Specialise parser errors
2020-07-05 14:57:13 +10:00
Octavia Togami
bf6cd1ea08
Regeneration Options (#1415)
* Add RegenOptions to the API

* Integerate regen options into //regen

* Rename isRegenBiomes to shouldRegenBiomes

* Go through the EditSession for setting biomes

* Respect 3D biome support in regen

* Add RegenOptions implementation for 1.16 Bukkit adapter.

Co-authored-by: wizjany <wizjany@gmail.com>
2020-07-03 22:17:34 -07:00
Octavia Togami
cc46de951b
Cleanup/fix ascend logic
Fixes #1419
2020-07-03 20:17:30 -07:00
Octavia Togami
8c171f0929
Replace BlockStates reading with new 1.16 logic (#1413)
* Replace BlockStates reading with new 1.16 logic

* Account for running on older platforms

Splits out the new reading to AnvilChunk16, uses data version to detect
the appropriate version.

* Move data versions to Constants

Also fixes some logic hiccups that become obvious with the new names.

* Fix LegacyMapper DFU handling

* Fix factor indexing
2020-07-03 18:44:19 -07:00
Octavia Togami
41162e423e
Fix i18n key for superpick max range 2020-07-01 12:15:15 -07:00
Octavia Togami
71e104bcb1
Replace setPosition with trySetPosition (#1403)
Allows cancellation information to be fed back into the ascend/descend
algorithms.
2020-07-01 08:24:58 -07:00
Octavia Togami
8aa034c78f
Fix or suppress deprecation warnings in most code (#1404)
Didn't touch commands or some of Sponge
2020-07-01 08:24:42 -07:00
wizjany
042d0f1c91 Add new netherite pickaxe.
Fixes #1407.
2020-06-30 11:19:29 -04:00
Octavia Togami
a6236b6796
Propagate 3D biome support up extent stack
Fixes #1399

Also improved Fabric gradle b/c why not
2020-06-28 15:51:50 -07:00
Octavia Togami
7ee60060c3
Fix click command for perf box 2020-06-27 17:31:55 -07:00
Octavia Togami
bf4dc8e2cf
Default VALIDATION to off
People have issues copy/pasting with this on, so I think for now it's
better to leave it off. If someone needs the special behavior for
setting panes or fences, they can turn it back on.

We do need to investigate the reason why it's not working, and
potentially save validation for post-edit, rather than prior to
placement.
2020-06-27 15:09:41 -07:00
Matthew Miller
89b3d910e2 Update Forge version for language fix 2020-06-27 13:19:49 +10:00
Matthew Miller
efec53b186 Bump data to 1.16.1 with MCUtils 2020-06-25 18:20:46 +10:00
Matthew Miller
984e944815 Add 1.16 UUID tag to NO_COPY_ENTITY_NBT_FIELDS 2020-06-25 17:08:35 +10:00
Octavia Togami
6dbcbd4a85
Perform part of the move of //fast to //perf (#1377)
This re-adds a deprecated `//fast` and moves the current logic to
`//perf`. Later `//perf` will have its syntax reworked, when Piston
finally supports sub-commands properly!
2020-06-24 20:51:18 -07:00
Matthew Miller
1ced57c301
fix: require extent for mask parsing (#1373) 2020-06-24 17:50:32 +10:00
Octavia Togami
6513513b3e
Mojang AB and the Column Biome Fuzzer (#1376)
* Allow API detection of the biome fuzzer in use

This allows us to warn, fix, or optimize biome edits to the overworld.

* Drop edits to Y = 0 for biomes in overworld

* Re-work ArbitraryBiomeShape to simplify logic

Also fixes not being able to use THE_VOID with it
2020-06-23 23:33:20 -07:00
Octavia Togami
df3937256e
Reduce number of tests executed
It's honestly too many for the CI to handle right now, and this should
provide sufficient coverage for now.
2020-06-23 12:03:09 -07:00
Octavia Togami
6412383636
Fabric 1.16 (#1362)
* [Fabric] Test port to 1.16-pre5

* [Fabric] Fix/improve regen implementation

* Cleanup properly in regen

* Cleanup unused interfaces/methods from porting

* Add licenses to new classes

* Allow packages from refactor in checkstyle

* Remove unused imports from WorldGenListener

* Remap the access widener in the dist jar

* [Fabric] Update to 1.16-pre6 (recursion limit)

Requires an update in the Bukkit Adapters later.

* [Fabric] Update to 1.16

May or may not build, depending on how cached everything is.
2020-06-23 11:55:49 -07:00
Octavia Togami
849a515d4a
Set ES6 compat flag for Rhino 2020-06-21 18:55:29 -07:00
Matthew Miller
f5e36ed8a8
Add 3D biomes support (Adds #1358) (#1361)
* Initial work on 3D biomes. Not implemented for Bukkit, and history is unfinished

* Further implement 3D Biomes. It's now usable on Forge/Fabric

* Fix a few cases of apply. Gotta fix the deprecated methods at some point

* Add Bukkit support

* Add clipboard support. Schematics are still not great, but the Sponge schem format doesn't support this yet.

* Fix the last of the issues

* Fixed up review comments

* Fixed review notes

* Simplify

* max is inclusive

* Standardize non-abstract compatibility handling

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2020-06-22 09:25:49 +10:00
Matthew Miller
495ac44f5c
feat(tool): added stack tool (#1338)
* feat(tool): added stack tool

* Implement review comments

* Don't register an alias for stacker

* Apply suggestions

* Fixed /stacker alias

* Indent

* Update worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

* Update worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

* Remove unused imports

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2020-06-13 14:25:37 +10:00
Octavia Togami
2f4140349e
Register /tool with sub-command permission gen 2020-06-11 16:14:11 -07:00
Matthew Miller
328030fd62
Use a long to refer to the volume of a region to prevent overflow (#1350)
* Use a long to refer to the volume of a region, and rename the method to getVolume

* Fixed issues noted in review

* Forgot to floor

* Fixed review notes

* Can use a long here rather than BigDecimal

* Improve javadocs

* style
2020-06-08 19:50:17 +10:00
Octavia Togami
1e2496af55 Fix vector gen, always enable BlockMap tests
The BlockMap tests got much faster, so there's no need to hide them
behind a flag.
2020-06-03 18:32:49 -07:00
Octavia Togami
300aad3530 Add licenses for test files 2020-06-03 17:46:15 -07:00
Octavia Togami
e0346ff53b
Test more of the math/collections, fix VectorPList
Fixes #1291
2020-06-03 14:52:01 -07:00
Octavia Togami
637da62e34
Implement remove on set/iter views of BlockMap
Fixes #1354.
2020-06-02 15:37:05 -07:00
wizjany
4ac6f1ed24
Add transform for vertical flip of stair half. (#1341) 2020-05-30 23:55:57 +10:00
Matthew Miller
68f2f73367 Don't fail when enabling standard mode for an extent without a world. 2020-05-30 23:04:54 +10:00
Octavia Togami
6b918e671e Fix Biome math on Forge and Fabric 2020-05-18 16:19:11 -07:00
Matthew Miller
a2c541bdac Handle non-country locales better. Fixes #1345 2020-05-14 23:48:20 +10:00