Commit Graph

89 Commits

Author SHA1 Message Date
44dc926c49 Fix console command usage. 2019-09-19 20:53:47 -04:00
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
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
61bc012f6f Fix source masks using EditSession instead of clipboard. (#515) 2019-08-10 11:54:22 -04:00
f83de2a703 Fix bug with spaces at end of suggestions. 2019-08-08 16:28:00 -07:00
f848d3114f Re-load internal state IDs when WORLD_EDITING cap is re-loaded 2019-08-02 15:47:29 -07:00
76b608f90b Fix suggestions on Bukkit for good 2019-07-27 23:31:38 -07:00
3a5170a0e8 Potenially fix quoted string completion 2019-07-27 18:12:18 -07:00
d134820bcb Merge branch 'master' into fix/quoted 2019-07-27 17:41:44 -07:00
8545417b3a Fix error in /up when used out of bounds.
Also reduce calls to Entity#getLocation() all over since it's
more expensive than it needs to be (adapts world/vector every time).
2019-07-23 22:16:26 -04:00
96e2b6c5af First attempt at fixing quoted string oddities. 2019-07-04 22:01:55 -04:00
096a9e4f9f Paintings are very special (#492)
Fixes WORLDEDIT-3429
2019-06-28 16:11:24 -04:00
542f87b8f7 Fix infinite loop re-sizing block state internal ID array. 2019-06-28 15:18:53 -04:00
8fcc22c21d Cleanup multiple batch usage for chunk deletion. 2019-06-22 15:01:00 -04:00
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
61fd44fa8c Save some RAM.
Vanilla only needs 12k~ states right now, 32k is unnecessary.
2019-06-15 20:24:47 -04:00
0088fe79b3 Cleanup Bukkit internal id usage. 2019-06-15 17:33:17 +10:00
27c7d488a2 Add perf. improvments for Forge 2019-06-15 17:33:17 +10:00
2571efb5c3 Few fixes for worldedit changes 2019-06-15 17:33:17 +10:00
a3a175ab8c Initial attempt at binding state IDs 2019-06-15 17:33:17 +10:00
d46cd78e14 Port doc printer to Kotlin, heavily improve 2019-06-05 23:26:57 -07:00
e69aedf059 Allow clean shutdown.
Rearrange command tables.
2019-06-05 14:57:44 -04:00
e767dd9888 Missing perm. 2019-06-05 12:31:12 -04:00
22157f0864 Write entire perms file for easier gen.
Also fix some format issues.
2019-06-05 11:27:16 -04:00
b7e329bc1b Better spacing for section headers. 2019-06-05 10:39:10 -04:00
34020f7bd2 Less ugly. Makes tables for all commands and subcommands. 2019-06-05 10:23:41 -04:00
dc380b1fb3 Ugly but working generator for rst commands. 2019-06-05 10:21:35 -04:00
9099a17fe5 Some command refactoring. Switch usages of page args to -p flag. 2019-06-01 07:04:07 -04:00
ec3648e521 Wrap and unwrap.
Exceptions are fun.
2019-05-29 23:15:05 -04:00
ab1e09fdaf Give factories a default parser.
Later registered parsers will always come before the default, ensuring
that the default parser is used when no other parser can match the input,
and that errors may be thrown by it to signify the end of the line.
2019-05-28 22:55:20 -04:00
6962b2e7b6 Add comprehensive suggestions to many commands.
All patterns now have suggestions, including recursive patterns.
Suggestions will suggest blocks and block states.
All masks now have suggestions, though mask intersections are not
yet supported due to issues with quotes strings.
EntityRemover and ItemFactory now also have completions, as well
as all RegistryConverters (though I am unsure how many are actually
used).

Also use paper's AsyncTabComplete event, if available.
2019-05-28 22:55:20 -04:00
4804fe64e3 Don't use a no-op suggester 2019-05-24 21:31:29 +10:00
a3ffb91917 Added suggestions to a lot of factory-related commands 2019-05-24 21:31:29 +10:00
3173e26109 Fix //expand, improve //help 2019-05-17 22:24:31 -07:00
e7613dd879 Stop using IAE to communicate parameter mis-use 2019-05-14 17:57:05 -07:00
a2b67f8ddb Re-write EventBus to be faster 2019-05-10 05:01:01 -07:00
8a3e6a12b9 Implement suggestions for Bukkit + Sponge 2019-05-05 23:06:20 -07:00
ceff17c4f7 Misc fixes.
Closes a few old youtrack issues which I don't remember because I had
like 30 tabs open, and a few other issues which I found while testing
some of those.
2019-05-05 15:15:03 -04:00
fb4fb980e0 Condense some command packages 2019-04-30 15:03:18 -07:00
743d7f08ab Purge intake-like command system 2019-04-30 14:59:45 -07:00
6255ccce38 Minor bug fixes 2019-04-28 17:27:33 -07:00
0960f70e6b Update to latest Piston changes 2019-04-27 03:35:44 -07:00
7ff537138a Merge master again 2019-04-26 01:25:42 -07:00
526b3366b5 Add more schematic compat, cleanup. 2019-04-26 16:41:39 +10:00
efc4ebe309 Fix 1.13 entity direction code, port old schematics 2019-04-26 16:41:39 +10:00
853bfab022 Merge master, update to texts 2019-04-25 22:11:46 -07:00
e07e0d10b0 Port selection commands 2019-04-23 22:58:30 -07:00
f81ffdde0c Port region commands 2019-04-23 18:46:46 -07:00
31486cd473 Port generation commands 2019-04-23 10:11:54 -07:00
ac03de89cc Work on adding converters for some arguments 2019-04-18 19:11:57 -07:00