Commit Graph

120 Commits

Author SHA1 Message Date
wizjany
af1af43ac1 Allow copy/pasting biomes.
Copy takes a -b flag to copy biomes.
Paste takes a -b flag to paste biomes (if available).
This allows flexibility to create/load schematics with/without biomes
(when schematic biome support is added).

Also added a -m mask flag to paste to set a source mask, and a -e flag
to skip pasting entities if they are loaded.
2019-04-26 16:41:39 +10:00
Matthew Miller
db4871f022
Merge pull request #462 from EngineHub/feature/expanded-styleset
feat(text): added modern text formatting to worldedit, and switch a few things over to it
2019-04-25 19:39:26 +10:00
Matthew Miller
5606e752c2 Use wrappers for the Format-type components 2019-04-25 19:11:58 +10:00
Matthew Miller
c52eb59d7f Get it all working 2019-04-22 22:05:20 +10:00
Kenzie Togami
1e7b4fc835
Move shaded libraries to their own artifacts 2019-04-20 23:11:39 -07:00
wizjany
a9926328f1 Stop trying to redo when history runs out. 2019-04-20 12:14:11 -04:00
Matthew Miller
5b1573a24e Replace the message system 2019-04-19 23:06:00 +10: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
Kenzie Togami
a3f1c71d97
Make EditSession closeable for easy flushing 2018-10-20 19:50:35 -07:00
Kenzie Togami
1fa1ff895b
Flush or disable buffers in tools 2018-10-20 19:47:17 -07:00
Matthew Miller
dd2fcbac23
Merge pull request #430 from sk89q/feature/chunk-batching-mode
Chunk Batching
2018-10-15 13:50:10 +10:00
Matthew Miller
0a149a796f Make distr operation based 2018-10-12 15:28:40 +10:00
Kenzie Togami
7d4906cfe9
Add chunk batching flag, enable by default 2018-10-10 11:38:23 -07:00
Matthew Miller
1a2cd3a948 Fixes WORLDEDIT-3609, Message should say cut when //cut is used. 2018-09-20 17:09:50 +10:00
Matthew Miller
8bfbc55c71 Enable experimental //walls for non-cuboid regions. 2018-08-30 16:42:50 +10:00
Matthew Miller
c931095736 Little bit of formatting 2018-08-27 17:24:18 +10:00
Matthew Miller
69ab1781c6 Replace FuzzyBlockMask with BlockMask, and added BlockTypeMask as a more performant mask for just block types. 2018-08-20 15:57:42 +10:00
Matthew Miller
eba91cac5f Added a config option to entirely disable server side cui. 2018-08-18 19:42:45 +10:00
Matthew Miller
20b67db48d Added a command to turn it on/off 2018-08-18 16:34:32 +10:00