Commit Graph

881 Commits

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