Commit Graph

2457 Commits

Author SHA1 Message Date
3236bdd78e Changes to NBT-handling in operations and extents, changes to match the widely supported setBlock functionality, minor code cleanup 2019-03-25 13:42:11 -04:00
4c3b09895d Merge pull request #76 from IntellectualSites/new-vector-system2
Revert "Make end tag singleton"
2019-03-25 06:09:13 -04:00
68c8950cdc Add IncendoPaster
Co-Authored-By: Alexander Söderberg <citymonstret@hotmail.com>
2019-03-24 23:02:32 +01:00
a64ff8f299 Make master build (probably) 2019-03-24 20:58:05 +01:00
692ba6fda3 Checkstyle. 2019-03-22 14:03:43 -04:00
456f821ce0 Revert "Make end tag singleton"
This reverts commit 13d2ae20
Why was this changed. I doubt it did much in terms of performance. It's better to stay as close as we can to the worldedit repo.
2019-03-22 12:51:44 -04:00
44bfc2f753 Fixes #17, and an annoying typo in SnipeData :) 2019-03-21 07:20:47 +01:00
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
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
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
83bdb3c8e8 Merge pull request #11 from IntellectualSites/incendo-paste
Make debugpaste use Incendo Paste Viewer, rather than Hastebin.
2019-03-19 10:36:21 -04:00
d186cce393 Merge remote-tracking branch 'origin/feature/slf4j-logging' 2019-03-19 20:32:21 +10:00
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
18414fe3b5 Fix symlink detection. 2019-03-15 09:10:51 -04:00
d6804737cf Switch to SLF4J logging. 2019-03-13 19:51:48 -07:00
1c5d3368a0 Defer permissions check when making LocalSession.
Also use Java7 Paths to get rid of some funky logic.
2019-03-11 21:31:43 -04:00
a5cec7728d Merge pull request #452 from EngineHub/forge-1.13
Added support for Forge 1.13
2019-03-11 22:52:30 +10:00
a59d994d84 Hook up the biome registry. 2019-03-11 00:15:21 -04:00
a22b5535fe Shh checkstyle, I'm a C# dev now. 2019-03-08 16:14:16 -05:00
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
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
8a528b26b6 Update P2 repo and minors 2019-03-06 17:35:42 +01:00
c98a311146 Update to working PlotSquared repo; Update to PlotSquared C>Captions class rename; Cleaning and minor modifications to SpongeSchematicReader 2019-03-06 03:06:47 -05:00
4878f38250 Fix platform registration, config setup 2019-03-04 19:36:06 -08:00
f84f3c6f85 Fix error when parsing hand/offhand/pos1 as blocks. 2019-03-03 19:51:49 -05:00
aafb854e4f More useful names for block ItemTypes. 2019-03-02 12:26:26 -05:00
c3ee926a2e Correctness improvement for legacy data in expression generation. 2019-03-02 11:55:03 -05:00
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
f46c70093c Fix the long-range build tool's ability to build mid-air. 2019-03-01 20:10:46 -05:00
0656ef1920 Fix LayerVisitor stopping early instead of skipping covered columns. 2019-03-01 19:25:10 -05:00
4bd6d73085 Fix some bad copy-pasta in expression environment queries. 2019-02-28 01:03:02 -05:00
0fa9d7a4a7 Changes to EditSession to improve upstream compatibility 2019-02-27 09:01:07 -05:00
3ffb5ff00d Changes to fix some PlotSquared compatibility issues, plus fix block Mask parsing 2019-02-27 08:09:04 -05:00
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
9eeb0acffe Add radius checks to a few more utility commands. 2019-02-25 18:41:20 -05:00
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
5de8e0852c Treat categories as empty when missing 2019-02-18 21:17:36 +10:00
24fbc86cdd INDEV -- Pushed for in-house testing and development 2019-02-17 03:47:32 -05:00
50a286b070 Update the block/item category registries - this won't build until a Spigot PR is merged though. 2019-02-17 13:30:40 +10:00
3683a0438a Use nonNull rather than !isNull 2019-02-16 19:58:06 +10:00
db1315e043 Refactor registries to entirely use the platform 2019-02-16 19:35:13 +10:00
1b101740fe Use a proper registry for biomes 2019-02-16 17:27:00 +10:00
d6bc85ccbe Speed up the BlockState hashCode method by caching (As it's Immutable). Allows some better optimisations in the future by using them as map keys 2019-02-16 12:46:10 +10:00
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
313cd20b14 Make legacy compat layer return straight stairs. 2019-02-14 17:53:30 -05:00
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
287be0209c Slight readability and usability improvements.
Also no longer allows trailing strings (e.g. //set #clipboardasdf).
2019-02-12 17:11:57 -05:00
19796aa3be Added offset to ClipboardPattern.
Takes input like '//set #clipboard@-1,0,1' which shifts the pattern over.
It also now extends RepeatingExtentPattern, which was previously unused.
2019-02-12 17:11:57 -05:00
76400e533d Add missing flags to clipboard brush usage. 2019-02-11 12:50:51 -05:00
3e988e7ffe Fixed parsing fuzzy blocks failing. 2019-02-11 20:30:42 +10:00