Commit Graph

131 Commits

Author SHA1 Message Date
Kenzie Togami
c95fc06b82
Port scripting commands 2019-04-23 19:32:27 -07:00
Kenzie Togami
f81ffdde0c
Port region commands 2019-04-23 18:46:46 -07:00
Kenzie Togami
f2283e8ad0
Port navigation commands 2019-04-23 16:14:21 -07:00
Kenzie Togami
6d4982f23a
Fix checkstyle/license/gen code 2019-04-23 15:44:33 -07:00
Kenzie Togami
20da6227d4
Port history commands 2019-04-23 15:35:05 -07:00
Kenzie Togami
31486cd473
Port generation commands 2019-04-23 10:11:54 -07:00
Kenzie Togami
51be16ad81
Port GeneralCommands 2019-04-21 13:10:20 -07:00
Kenzie Togami
48fcfeed35
Fix licenses 2019-04-18 19:12:09 -07:00
Kenzie Togami
ac03de89cc
Work on adding converters for some arguments 2019-04-18 19:11:57 -07:00
Kenzie Togami
37c993be16
Port ClipboardCommands, update to new Key 2019-04-18 12:34:57 -07:00
Kenzie Togami
f33140b327
Port ChunkCommands, fix up injection, simplify registration 2019-04-16 23:02:23 -07:00
Kenzie Togami
e127bb89e5
Align annotation formatting with brush command methods 2019-04-15 02:03:05 -07:00
Kenzie Togami
e4d8091432
Convert part of the brush commands 2019-04-15 02:01:25 -07:00
Kenzie Togami
2b10128720
Restore Logging for setbiome 2019-04-15 01:25:19 -07:00
Kenzie Togami
267ccf2298
First attempt at integrating Piston as the only command system 2019-04-15 01:21:15 -07:00
Kenzie Togami
f8c4f23658
Partial work on biome commands, need logging replacement 2019-04-14 01:30:40 -07:00
Kenzie Togami
8ab6585815
Patch new cmds system into old system 2019-04-04 16:16:04 -07:00
Kenzie Togami
1966e5a8a2
Initial Piston conversion test. Non-functional. 2019-04-04 15:50:45 -07:00
Jesse Boyd
4de5487c51 Change Vector hash codes (#456)
And add additional unit vectors where needed.
2019-04-04 08:36:19 -04:00
Jesse Boyd
3d2054aa0a WorldEdit accepts a pattern for these commands
update the message to reflect that.
2019-04-03 19:39:12 -04:00
wizjany
8eccdc7444 Add -f flag to //count to allow fuzzy inputs.
Also re-implement //distr -c. And remove outdated help text on //copy.
2019-03-25 22:38:51 -04:00
wizjany
9b473cecbd Fixes and changes to forest/forestgen.
* Sync up implementations of the two commands.
* Fix generating trees in spots with replaceable blocks.
* Make message when you mistype tree-type arg more correct.

Fixes WORLDEDIT-3869.
2019-03-20 21:05:11 -04:00
wizjany
1934006d14 Better enforce the Request lifetime.
Previously, the current request would just get a new EditSession when
one was created. Now, a Request is reset before and after:
 - a command is used and
 - an interact is fired with the platform
This means each action taken will get a single, non-reusable Request.

Note that this only applies to actions taken through the platform.
API users will not be using requests anyway, since things like Masks,
etc. will be constructed directly instead of being passed through the
platform's parsers and so on. (e.g. if a plugin loads a schematic into
the world with a mask, they should create the EditSession and mask it
directly, and not use that Mask again for another EditSession in another
World).

Also, get rid of a bunch of (some now-)unnecessary EditSession creation
during command dispatching.

Note that this also fixed the dynamic selection mask, which apparently
has been broken for some unknown amount of time.
2019-03-20 19:13:54 -04:00
wizjany
25631af31c Add RequestExtent to be used when a delayed EditSession is needed.
For example, if you set a mask that takes an extent (many of them),
and then move to another world, the mask will test blocks in the old
world and return bad results.
2019-03-20 19:13:54 -04:00
Matthew Miller
d186cce393 Merge remote-tracking branch 'origin/feature/slf4j-logging' 2019-03-19 20:32:21 +10:00
wizjany
9d2d43f0db Add -f to //schem save to confirm overwriting.
Overwriting existing schematics now checks delete perm.
Also allow delete to be run from console.

Fixes WORLDEDIT-3868.
2019-03-15 17:08:11 -04:00
Kenzie Togami
d6804737cf
Switch to SLF4J logging. 2019-03-13 19:51:48 -07:00
wizjany
7c89ece96e Few tweaks to schematic loading and error fixes.
* Not all EntityTypes in Bukkit have the correct enum name.
* Don't read entire schematic files to list. Go off file extension only.
   (Reading in files is more accurate, but slow.)
* Enforce extensions. (Due to the above, while you can technically make a
   schematic called 'test.txt', it's better that we save it as
   'test.txt.schem'.)
* Fix a few minor warnings.
2019-03-08 16:00:49 -05:00
wizjany
de08c8b8c7
Add better control over expression timeouts. (#451)
Add better control over expression timeouts.
* //timeout command can be used to change player's current timeout.
* Config now also has a max timeout, can be bypassed with permission
* Timeout of < 0 will let expressions run indefinitely.
* Said expressions won't run on a separate thread, slightly reducing the
  overhead from context switching. For large //gen commands, for example,
  this can actually increase speed.
2019-03-06 19:58:32 -05:00
wizjany
e53962dadd Apply source function after source mask in ForwardExtentCopy.
The source function should only get applied to actually copied blocks.
2019-03-01 21:15:21 -05:00
wizjany
243d6476ac Re-add smooth filtering via a mask.
Instead of trying to maintain a list of "natural terrain blocks", just
let the user specify a mask of blocks to use for the height map filter.

https://gfycat.com/severaljauntycondor
2019-02-26 23:54:53 -05:00
wizjany
9eeb0acffe Add radius checks to a few more utility commands. 2019-02-25 18:41:20 -05:00
wizjany
2f734d4570 Check radius instead of diameter for clipboard brush.
This brings it more in line with other brushes in terms of allowable size.
2019-02-25 18:41:19 -05:00
Matthew Miller
1b101740fe Use a proper registry for biomes 2019-02-16 17:27:00 +10:00
wizjany
de9d202681
Clear shaped brush material on command.
The initial material is held in the factory, but if a brush was previously bound, that pattern is used.
Now, using `//br set` will clear the previous material, allowing the OperationFactory's material to work.
This can be changed later with `/mat`, which will once again set the fill on the tool, overriding the factory's context.
2019-02-15 14:51:26 -05:00
wizjany
88014b18a3 Added a few new things using block states.
* `//set ##*tag` sets all states in the tag (not just default state per type)
* `//set ^type` is a pattern changing block type but copying all valid existing states
* `//set ^[prop=val,...]` sets the property `prop` to `val` wherever the existing block has that property
* `//set ^type[prop=val,...]` does both of the above
Those work anywhere a pattern is taken, of course.

* The mask syntax `^[prop=val]` matches blocks with the property `prop` set to `val`, or blocks that don't have the property at all.
* The mask syntax `^=[prop=val]` only matches blocks that have the property.
Those work anywhere a mask is taken, of course. (`//mask`, `//gmask`, `//replace`, etc)

The `//drain` command now takes `-w` flag that removes the waterlogged state from blocks (in addition to removing water, as before).
2019-02-14 17:21:01 -05:00
Wizjany
76400e533d
Add missing flags to clipboard brush usage. 2019-02-11 12:50:51 -05:00
wizjany
dddf2b963a Fix long-range build tool.
Blocks were always placed around 0,0,0 since the trace direction was being used as a position.
Also the message was backwards.
2019-02-03 19:27:30 -05:00
Kenzie Togami
3fefcbf971
Remove all raw usages of BSH, improve API generics 2018-12-26 16:39:10 -08:00
Matthew Miller
d6977aeae4 Allow a pattern for the leave-id of //move 2018-12-22 17:26:02 +10:00
Matthew Miller
8d07877463 Pass the exception converter through more. 2018-12-21 17:31:27 +10:00
Matthew Miller
5eb9b779d7 Move the pasting system over to WorldEdit, and add a /we report command. Currently only reports system status and the config. Need to add a platform reporter system. 2018-12-18 19:28:55 +10:00
Matthew Miller
700e41b706 Remove the final stage committer from the MultiStageReorder extent, as it caused issues and no longer appears to be entirely necessary. 2018-12-13 20:30:54 +10:00
Matthew Miller
5f2c77b719 Further work on this. Currently fast mode breaks doors, gotta work out why applying physics to doors breaks them. 2018-12-09 16:28:01 +10:00
Matthew Miller
7f11b2800d Added an option to switch reorder modes 2018-12-09 16:28:01 +10:00
Matthew Miller
24800a662a Finish removal of PlayerDirection, and partially added diagonal support back to commands. 2018-11-12 12:38:13 +10:00
Kenzie Togami
2c8b2fe089
Move vectors to static creators, for caching 2018-11-03 23:00:24 -07:00
Kenzie Togami
399e0ad5fa
Refactor vector system to be cleaner
- Move Vector, etc. into `.math` package
- Drop many methods that will be auto-promoted anyways, eg. with
`divide(int)` and `divide(double)` the first is now gone.
- Take Block vectors into their own class hierarchy
- Make it clear throughout the API what takes blockvectors
- many more improvements
2018-11-03 23:00:23 -07:00
Kenzie Togami
3b5972b7f2
Flush / unbuffer more tools 2018-10-30 18:06:00 -07:00
Matthew Miller
275a2fa887 Fixed a few bad javadoc imports 2018-10-24 16:33:04 +10:00