Commit Graph

801 Commits

Author SHA1 Message Date
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
Matthew Miller
267fe1ffe0
feat(i18n): use a translation loader to allow CB/WG to use WorldEdit's TranslationManager (#1327)
* feat(i18n): use a translation loader to allow CB/WG to use WorldEdit's TranslationManager

* Replace the old ResourceLoader with the new one

* Make ResourceLoader per-platform

* Update worldedit-core/src/main/java/com/sk89q/worldedit/util/io/WorldEditResourceLoader.java

* Improve the impl to allow a default

* Update based on review suggestions

* Local resource should be pathName too

* Delegate to getRootResource, and prevent pathName from starting with /

* HTML

* Format javadoc a little better

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2020-05-14 17:40:11 +10:00
NotMyFault
81b6276753
Fix whitespace (#1339) 2020-05-11 18:58:22 -07:00
wizjany
da3fd6c9fa Fix RandomPatternParser suggestions.
"x%" was being dropped.

Closes #1302.
2020-05-04 11:47:02 -04:00
wizjany
e0814cfe3c Reinstate localized name lookup on BlockType. 2020-05-02 13:26:55 -04:00
Octavia Togami
ba91dff134
Update to use the new runtime rhino JAR 2020-04-24 18:49:11 -07:00
Octavia Togami
9a11c57846
Correct typo in region selector docs 2020-04-24 14:55:07 -07:00
chickeneer
53ac21aa87
Add compatibility handlers for beds and banners for MCEdit Schematics (#561)
* Add compatibility handlers for beds and banners

* IntTag#getValue does not return null so do not check that
2020-04-23 18:08:59 -07:00
Octavia Togami
a02458b757
Allow craftscripts to exit early + cleanly (#1308)
* Allow craftscripts to exit early + cleanly

* Add de-facto standard javadoc tags
2020-04-20 18:15:51 -07:00
wizjany
df3b37363f Move expression source string to the expression class. 2020-04-19 16:12:17 -04:00
wizjany
fa0618d9e3 Add makeShape Expression overload for consistency. 2020-04-19 16:12:17 -04:00
wizjany
cd9a45bd6b Pre-compile the expression used in the deform brush.
This lets the command fail early, rather than throwing wrapped runtime
exceptions on every brush usage.
2020-04-19 16:12:17 -04:00
Octavia Togami
83438644dc
Make the null-result case visible to the user
Fixes #1303.
2020-04-18 13:04:03 -07:00
wizjany
d260185183 Don't suggest default namespaces.
This just ends adding a lot of `minecraft:` to otherwise short commands.
2020-04-16 09:51:29 -04:00
Octavia Togami
8c83fd6223
Limit direction names (#1293)
* Limit direction names

This reduces interference with block arguments, since none of these are
block names now.

* Drop other dir comments
2020-04-11 23:38:44 -07:00
Octavia Togami
dc56b602c0
Update Piston to fix bugs
Closes #1292 via Piston fixes.
2020-04-11 19:38:47 -07:00
Octavia Togami
56d0c6e7fd
Optimize poly region vertex add, fix Edge 2020-04-05 12:53:44 -07:00
Octavia Togami
a600266d41
Properly close all files when dealing with archives (#1274)
* Properly close all files when dealing with archives

* Move file utils to SafeFiles class

* Licenses
2020-04-05 09:17:26 -07:00
wizjany
439d6c811b Re-add block/item localized name methods to registries.
WorldGuard uses these still.
2020-04-01 10:14:57 -04:00
Octavia Togami
bb013aa89b
Use custom radix sort for ordering blocks (#1277)
* Use custom radix sort for ordering blocks

* Licenses :P

* Fix ordering, add test for it

* Grant Gradle more memory (thx Fabric)

* Increase (?) / Specify memory for core tests

* Many attempts at fixing OOM
2020-03-31 18:13:32 -07:00
Octavia Togami
404feef52e
Add height part to expand vert command
Fixes #1275
2020-03-25 16:51:00 -07:00
wizjany
4bbdc059ed Disable snapshot-fs test for now. 2020-03-24 14:08:40 -04:00
wizjany
eb8fcdcd5b Make //size text color consistent. 2020-03-23 18:54:38 -04:00
Octavia Togami
cfd26253b6
Names via Translation (#1268)
* Deprecate BiomeRegistry, etc.

* Update some libraries, e.g. text

* Move to new translation renderer

* Revert "Deprecate BiomeRegistry, etc."

This reverts commit 59a5d6c92aec52739a8dc68ac3d23898af7593dd.

This was not a good idea for potential mod shenanigans.

* Move BiomeData#getName to BiomeRegistry, use i18n

* Use getRichName instead of getName

* Implement getRichName for NullBiomeRegistry

* Add getRichName for blocks

* Relocate net.kyori.minecraft

* Update adapters for getRichBlockName

* Add getRichName for items

* Update adapters for getRichItemName

* Update adapters JAR for merge
2020-03-23 15:47:27 -07:00
Octavia Togami
2f4c44f80c
Validate placed blocks / WNA (#1263)
* Optionally validate placed blocks

This allows re-connection of fences, chests, panes, etc.; removal of
blocks in invalid states; and more!

The Connections side-effect already did this for neighbors, so this is
now renamed to Validation for accuracy, and left on by default.

This also fixes some inconsistencies between the Fabric & Forge
markAndNotifyBlock function.

* Add forge comment to fabric world

* Add WorldNativeAccess common logic

* Add Fabric WNA

* Add Bukkit WNA for adapters

* Fix imports for new Fabric mappings

* Pass raw world ref to Bukkit adapters

* Remove client-only block update call

We always assume a server world.

* Allow WNA impls to inspect side-effects

* Update adapters for WNA

* Licenses

* Fix adapter JAR

* Generify EVENTS side effect

* Update adapters for EVENTS change
2020-03-22 21:02:04 -07:00
Octavia Togami
1c6b1b3848
Merge master 2020-03-22 20:41:03 -07:00
Octavia Togami
e6d5950b59
Nest snapshot test dbs in a root temp folder
Allows us to clean it all up easily.

Closes #558.
2020-03-22 01:12:20 -07:00
wizjany
b4d2db3dee
Allow expand to be used by console. (#1264)
* Allow expand to be used by console.

Also fix direction converter requiring a player.

* Revert exception.
2020-03-20 11:36:54 +10:00
Octavia Togami
1ca94fa244
Correct capitalization on nav wand i18n 2020-03-18 01:42:06 -07:00
Matthew Miller
865c3a24d2
Replace fast mode with a side effect system, with fine-grained control (#547)
* Speed up initial change buffering by removing streams and optional wrapping

* Bump the adapters for an experimental performance boost (Purely Bukkit 1.15.2)

* Bump adapters for fixes

* Bump adapters for further performance boosts

* Migrate fast mode to a BlockUpdates section, allowing fine-grained control

* Rename to SideEffect and clean up usage of the set

* Implement a 'usable' state

* Add a test command to demonstrate SideEffects. This is non-final

* Move //sideeffect into //fast

* Improve the box for //fast

* Switch to a system that includes "delayed" as a mode

* Remove the concept of configurable side effects, all are configurable. And each platform specifies what it supports.

* Implement side effects on other platforms (and spigot versions)

* Only use the side effects from the world editing platform

* Update from review

* Rename WorldApplyingExtent to SideEffectExtent

* More review fixes

* Update the World#applySideEffects return type to return the applied side effects

* Fixed requested changes

* Fixed checkstyle

* Improve setBlock javadocs

* Further improve

* Switch parameter name

* Fixed typo in translation key

* Temporarily remove DELAYED

* static final

* Side Effects = 7.2.0 snapshot
2020-03-08 16:09:36 +10:00
Octavia Togami
02da42f90b
Fix exponent parsing, remove impossible (?) case 2020-02-25 17:16:00 -08:00
Octavia Togami
b8130eb5dd
Cover even more cases 2020-02-25 17:11:06 -08:00
Octavia Togami
3dbaae79cd
Cover many more ops 2020-02-25 16:35:43 -08:00
Octavia Togami
00c7d3a157
Fix not operator 2020-02-25 16:22:55 -08:00
Octavia Togami
0f787a89b8
Fix pre- and post- ops 2020-02-25 16:20:21 -08:00
Octavia Togami
42e515f435
Remove non-valued return 2020-02-25 16:13:44 -08:00
Octavia Togami
910c89be65
Extract common simple test case method 2020-02-24 00:45:57 -08:00
Octavia Togami
f8be17d362
Fix bug introduced in return-handling refactor 2020-02-24 00:39:22 -08:00
Octavia Togami
cbd686548f
Add more expression test cases, fix bugs
Also added a few more comments + reorganized exceptions that are
invoke-internal.
2020-02-24 00:33:49 -08:00
Octavia Togami
b9ba337f38
Make testEvaluate more compact 2020-02-23 17:40:11 -08:00
Octavia Togami
ae1e68e10f
Do not try crowdin if using offline mode 2020-02-23 17:39:30 -08:00
Matthew Miller
e476be1186
Tick watchdog by default (#555) 2020-02-21 18:18:08 +10:00
Octavia Togami
6bc1d4647c
Expression Goodie Bag (#553)
* Remove async expression eval. Implement timeout inline

* Remove static state from expr functions

* Remove now-unused TL stack

* Rework some expr handles
2020-02-21 18:17:49 +10:00
Matthew Miller
be30a94be5 Replaced the "please report this" message in the legacy schematic loader 2020-02-16 17:49:04 +10:00
Octavia Togami
947775b5e5
Read WE version from manifest ourselves 2020-02-10 17:11:08 -08:00
Octavia Togami
3ed190268c
Lower load factors in BlockMap
We can sacrifice these tiny amounts of memory for large CPU gains.
2020-02-09 15:25:43 -08:00
Matthew Miller
f111f6bfce
Significantly improve performance in ChunkBatchingExtent and other buffering extents (#550)
* Re-apply non-adapter performance boosts in separate PR

* Improved deprecation handling

* Move TODO
2020-02-07 20:28:14 +10:00
Octavia Togami
92eab931ea
[Forge] Include all -core resources, for all langs 2020-02-03 21:26:13 -08:00
Octavia Togami
0324196b5d
[Forge, Fabric] Update to latest 1.15.2
Some bits of the Fabric 1.15.2 update were moved into common code.

This is NOT ready yet, tree features still need to be updated. Mappings
are comitted, just waiting for them to come out.
2020-01-31 14:04:58 -08:00
Octavia Togami
202f98699b
Improve speed of BSIA, clean up Int2BaseBlockMap (#548)
* Improve speed of BSIA, clean up Int2BaseBlock

* Fix some compile errors / bugs
2020-01-30 20:36:49 +10:00
Octavia Togami
7384b69734
Generify BlockMap 2020-01-30 01:05:31 -08:00
Octavia Togami
624b3a449b
Always use UTF-8 for loading translations 2020-01-29 04:31:35 -08:00
Matthew Miller
d7089a65a7 Bump dataversion for WorldEdit CLI, and minify all of the JSON files 2020-01-24 21:10:04 +10:00
wizjany
a398c86d98 Make missing Bukkit impl adapter more user-friendly.
* 100s of "Unknown property" warnings in log aren't useful, only drown
  out the actual adapter warning
* Most people aren't looking at their console anyway, so hijack the old
  Actor#tellVersion to warn of missing adapters.
2020-01-07 18:05:52 -05:00