Commit Graph

238 Commits

Author SHA1 Message Date
Matthew Miller
8e55131a2f Bump bStats version and update 7.1.0 changelog 2020-01-24 22:38:52 +10:00
wizjany
a27ade54fc Add adapters for 1.15.2. 2020-01-21 18:13:37 -05:00
wizjany
05cc7aa021 Don't send bad packets to the client.
The adapter only can send a structure block change ID, so we shouldn't
attempt to send nbt for other block entities.
2020-01-09 21:16:30 -05: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
Matthew Miller
e198718a1e Fixed the adapt function for Actor -> Bukkit not working for players or command blocks 2020-01-04 16:29:32 +10:00
JOO200
3ed02aa1a8 BukkitAdapter: Add Bukkit CommandSender --> WorldEdit Actor (#539)
* BukkitAdapter: Added Bukkit CommandSender --> WorldEdit Actor

* Add a reverse adapter

Co-authored-by: Matthew Miller <mnmiller1@me.com>
2020-01-04 16:23:59 +10:00
wizjany
79c11c5ee9 Fix GC shenanigans in regen. 2019-12-21 00:20:48 -05:00
wizjany
2ce345b473 Update Bukkit adapter jar.
Fixes world-name shenanigans.
2019-12-20 20:04:05 -05:00
wizjany
07dc63eed3 Finalize adapters for 1.15.1.
No actual mapping changes, just setting the data versions.
2019-12-17 17:36:07 -05:00
Octavia Togami
18a55bc14e Add new experimental snapshot API (#524)
* Add new experimental snapshot API

This API intends to replace the existing snapshot API in WorldEdit 8.

It is currently experimental, and the old API is soft-deprecated. Once
it is determined to be stable, the old API will be removed and replaced
with this new one.

It uses TrueVFS instead of TrueZIP, due to the latter's status as
matinence-only, and the face that TrueVFS is NIO-FileSystem compatible,
allowing us to integrate it with NIO's native zipfs. The TrueVFS system
does encompass multiple modules, but users and download + install
truevfs-profile-default as a fatjar. We depend on that profile to show
this as the intended solution.

* Port commands to experimental snapshots. Legacy ones are in sibling classes.

* Add many tests, fix bugs

* Clean up imports

* Verify sorting behaviors, fix bugs

* Add license to test

* Add support for DIM region folders

* Fix tests for Windows paths

* Rewrite tests for even more coverage, fix bugs

* Clean up naming on tests

* Add test for legacy format

* Stop trying to abuse `file://`, use `snapfs:` instead

* Simplify iterPaths

* Use File.separator in FS snap tests

* Fix some bugs from T9N PR (#538)

* Use printInfo/printError to keep colors right

* Escape quotes before they go in the map

* I18N-ify new snapshot code
2019-12-16 21:00:12 +10:00
wizjany
47736abbdf Add Bukkit 1.15 adapters. 2019-12-10 20:20:11 -05:00
wizjany
28dbf19182 Bypass bukkit api for regeneration.
Done in impl adapter now.
2019-12-10 18:21:27 -05:00
Matthew Miller
679b00bde6
feat(i18n): add support for translatable text replacement (#478)
* Rebase translation work for easier rebasing

* Fixed gradle setup

* Further translations

* Add a few more strings

* Remove support for pluralisation to match Minecraft and alleviate issues with over-complexity

* Further translations

* Added a tonne more translations

* Added the remaining translation nodes

* When custom files are found, use the base files for default values.

* Only download translations if a key is provided

* Fixed typo in brush radius too large

* Allow translation files to be missing entries, and use the english version in place.

* Fixed issues brought up in review

* Reverse translation order (#533)

* Fix a lot of PR comments

* Add JD to the Operation warned field due to no private fields in J8

* Only warn when there are messages
2019-12-09 12:46:18 +10:00
wizjany
da2ab0293f Fix commands.
*cough*
2019-12-07 14:36:51 -05:00
wizjany
fcc048f8e1 Fix command labels, extra slashes. 2019-12-07 04:40:17 -05:00
wizjany
dd5b8b1a37 Fix /worldedit:xyz commands on Bukkit. (execution and completions) 2019-12-07 02:47:23 -05:00
wizjany
d81fd99340 Ensure we own commands before completing them. 2019-12-07 02:47:23 -05:00
Matthew Miller
0354edc145
Use commandblock name as session key (#535)
* Use commandblock name as session key

* Use a UUIDv3 with a given session prefix

* Use a UUIDv3

* Prefix the UUID and use a charset

* Fixed a few issues with using CommandBlocks

* Remove /worldedit:/ workaround
2019-12-07 16:27:04 +10:00
Matthew Miller
77ef0ae417
Bypass Bukkit in more situations (#532)
* Bypass Bukkit in more situations

* Use orElseGet

* Apply the same optimisation in the reverse BlockData adapter, and use lambdas instead of AIC

* Remove bukkit type checks

* Improve reliability of fallbacks
2019-11-15 12:02:46 +10:00
Kenzie Togami
91a78f725a
Some shading fixes 2019-10-19 00:48:49 -07:00
Kenzie Togami
03c0cce53e Update to Piston 0.5.2 + Doctools/Deprecation improvements (#523)
* Update to Piston 0.5.2

* [Doctools] Fix output, be verbose about deprecations

* Improve deprecation system, doctools output
2019-10-05 19:06:18 +10:00
wizjany
da0ef12239 Add Bukkit watchdog implementation. 2019-09-30 16:47:24 -04:00
Kenzie Togami
8af68fc884
Initial watchdog setup. Bukkit needs adapters, everything needs testing. 2019-09-29 22:09:55 -07:00
Matthew Miller
0620478763
feature(cli): Added a CLI version of WorldEdit, and allowed most commands to be run from console (#508)
* Re-do commits to avoid awful rebase

* You can load and save a schematic file now. Still gotta setup ability to use commands as a console actor.

* Add a world override concept to LocalSession, and allow a lot more commands to be performed by actors.

* Fixed commands, and set the loaded schematic as the world override in CLI

* Properly load tags

* Added 1.14.4 data values

* Allow a majority of commands to be performed by the console.

* Fixed a lot of PR requested changes

* Added a Locatable interface and use that for getting the location of the player in commands.

* Added script support. Currently requires a newline at the end of the script.

* Shade everything to allow this to run locally - should probably minimize this to an extent later.

* Actually hook up the version

* Added a //world command to set the override

* Fixed a missed checkstyle issue

* Added CommandBlock support to Bukkit

* Make command block support configurable

* Minor cleanup and implementing a few of the final functions

* Fixed most issues from PR

* Improve UX, saving is now automatic and unknown command messages show

* Better save docs and support any clipboard format

* Include the entire formats list

* Arrays.copyOf

* Clear the world override if the selector is called on another world.

* Update logging extent to allow basic logging with non-player actors
2019-08-25 19:58:28 +10:00
Kenzie Togami
f472c20bfb Memory optimizations (#505)
* Remove LocatedBlock overhead in LBL map

* Add new space-efficient block map, with thourough testing

* Drop ordering property, add full insertion test

* Add licenses

* Fix mocked platform conflicts

* Disable full block map testing for faster builds

* Re-implement BlockMap with fastutil maps

* Re-write chunk batching to be memory efficient

* Make MultiStageReorder use BlockMap

* Increase LBL load factor, fix long-pack limit detection

* Fix infinite loop in chunk batching

* Save memory in history by cleaning up MSR

* Re-implement LocatedBlockList in BlockMap

* Fix data race with BlockType lazy fields

* Make IDs ALWAYS present, only runtime-consistent. Use for memory efficiency in BlockMap

* Remap inner structure of BlockMap for smaller maps

* Remove containedBlocks fields, not very efficient

* Fix minor de-optimizing bug in stage reorder

* Make long packed y signed

* Add extended Y limit configuration option

* Add licenses

* Store 3 ints for unoptimized BV list

* Add final to BitMath

* Correct int-cast for long-packing
2019-08-12 22:06:40 +10:00
wizjany
17cfdee347 Update/remove more dead links. 2019-08-06 23:07:26 -04:00
wizjany
95d5adb30c Update docs links to point to enginehub. 2019-08-06 21:49:43 -04:00
Kenzie Togami
76b608f90b
Fix suggestions on Bukkit for good 2019-07-27 23:31:38 -07:00
wizjany
0f420f02ff Fix some load-order issues probably.
Edge cases might still exist around plugins which use WE for initial
world-gen, or in general plugins that try to access the platform
before it's ready.
2019-07-27 11:45:21 -04:00
wizjany
2cc6a367c6 Move floatAt logic to AbstractPlayer, add isAllowedToFly and setFlying. 2019-07-23 22:16:26 -04:00
wizjany
e504c29df6 Fix potential race condition.
I guess.
2019-07-23 21:41:39 -04:00
wizjany
a65351e43e Don't load old adapters. 2019-07-19 21:19:09 -04:00
wizjany
7c41949f40 Update bukkit adapters for 1.14.4. 2019-07-19 20:44:39 -04:00
Kenzie Togami
3b157b67c3
Move Bukkit to JUnit 5 2019-07-15 16:38:33 -07:00
Kenzie Togami
429d022752
Move Core to JUnit 5 2019-07-15 16:38:33 -07:00
Kenzie Togami
ab8397e517
Migrate Bukkit to Kotlin DSL 2019-07-12 13:49:45 -07:00
Kenzie Togami
19802e478c
Re-write root and libs to Kotlin DSL 2019-07-12 13:49:45 -07:00
wizjany
a18f26f8af Play nicer with naughty plugins. 2019-07-06 09:44:53 -04:00
wizjany
625cbe5e3d Make //count take a mask. Also doc updates, perm fixes. 2019-06-30 00:38:17 -04:00
wizjany
d763ab374c
Re-add delchunks command (#481)
The new command now writes a json file to WorldEdit's working directory with instructions on which chunks to delete, which is read by the plugin/mod at startup and calls the ChunkDeleter.
The chunk deleter parses the json and iterates the instructions, backing up .mca files as it goes and overwriting the offset headers with 0 wherever a chunk needs to be deleted.
This allows Minecraft to reclaim the space used for that chunk, as well as forcing it to be generated from scratch next time the area is loaded.
2019-06-22 14:20:14 -04:00
wizjany
0088fe79b3 Cleanup Bukkit internal id usage. 2019-06-15 17:33:17 +10:00
Kenzie Togami
27c7d488a2 Add perf. improvments for Forge 2019-06-15 17:33:17 +10:00
Kenzie Togami
8c17aab9c5 Clean-up some misc. parts of the code 2019-06-15 17:33:17 +10:00
wizjany
dc21b4df58 This does something idk. 2019-06-15 17:33:17 +10:00
Kenzie Togami
a3a175ab8c Initial attempt at binding state IDs 2019-06-15 17:33:17 +10:00
wizjany
e1c191599c Implement item brushes and item NBT for bukkit.
This allows usage of `/br <apply|paint> <shape> item` and the `offhand`
syntax for item parser to use NBT.
2019-06-14 16:37:23 -04:00
wizjany
213cadf093 Import cleanup, ensure gradle uses https for deps, bump deps. 2019-06-13 09:17:00 -04:00
wizjany
efb7650d6f Fix some reload issues.
And some unload issues.
2019-06-11 18:02:24 -04:00
wizjany
3fd661c513 Don't attempt to check unloaded world refs. 2019-06-08 11:25:36 -04:00
wizjany
e3097dd0fc Use java-library to exclude some deps. 2019-06-03 23:56:34 -04:00