Commit Graph
100 Commits
Author SHA1 Message Date
wizjany 74bff83e38 Don't let items types be null.
Better fail-fast if registry doesn't load? or why-ever else this happens
2019-03-26 22:30:46 -04:00
wizjany 6b3426e1de BaseBlock is technically mutable so that technically shouldn't use it. 2019-03-26 18:14:35 -04:00
wizjany 2a194b0434 Add pattern that randomly chooses states.
Also works with fuzzy states.

Syntax is `*type`, e.g. `//set *stone_slab` or with states,
`//set *oak_fence[waterlogged=false]`
2019-03-26 18:11:32 -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 692ba6fda3 Checkstyle. 2019-03-22 14:03:43 -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
wizjany d1c2a029bf Move some platform stuff to load, put enable back to postworld. 2019-03-15 23:43:57 -04:00
wizjany 678a78a982 Update adapters.
Don't update unchanged blocks, do change NBT, no need to light.

Also clean up the forge side a bit.
2019-03-15 20:56:49 -04:00
wizjany c885f70c7b Load Bukkit plugin at startup.
This should allow plugins that use WorldEdit to do things on world load.
2019-03-15 18:38:06 -04: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
wizjany 18414fe3b5 Fix symlink detection. 2019-03-15 09:10:51 -04:00
wizjany 4f0506ec8b Fix versions in toml. Use internalversion (with git hash). 2019-03-12 17:30:45 -04:00
wizjany 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
wizjany a59d994d84 Hook up the biome registry. 2019-03-11 00:15:21 -04:00
wizjany 6192ba8dc1 Checkstyle fixes and warnings.
Should get 'working' builds now.
2019-03-11 00:02:51 -04:00
wizjany 6937cfc9a9 Need internal ID for EntityType here too. 2019-03-09 10:46:40 -05:00
wizjany a22b5535fe Shh checkstyle, I'm a C# dev now. 2019-03-08 16:14:16 -05: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 eebba8e324 Move vault to permscompat. 2019-03-07 23:55:58 -05:00
wizjanyandGitHub 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 f84f3c6f85 Fix error when parsing hand/offhand/pos1 as blocks. 2019-03-03 19:51:49 -05:00
wizjany aafb854e4f More useful names for block ItemTypes. 2019-03-02 12:26:26 -05:00
wizjany c3ee926a2e Correctness improvement for legacy data in expression generation. 2019-03-02 11:55:03 -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 f46c70093c Fix the long-range build tool's ability to build mid-air. 2019-03-01 20:10:46 -05:00
wizjany 0656ef1920 Fix LayerVisitor stopping early instead of skipping covered columns. 2019-03-01 19:25:10 -05:00
wizjany 4bd6d73085 Fix some bad copy-pasta in expression environment queries. 2019-02-28 01:03:02 -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 90797d12f4 Skip legacy materials when setting up registries.
Doesn't make a difference normally, but avoids errors in special envs.
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
wizjanyandGitHub 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 319f2efe43 Ignore synthetic classes when loading BukkitImplAdapter. 2019-02-14 18:07:07 -05:00
wizjany 39131eb1e5 Revert "Remove synthetic classes from adapters."
This reverts commit 1ae0e88b
2019-02-14 17:56:48 -05:00
wizjany 313cd20b14 Make legacy compat layer return straight stairs. 2019-02-14 17:53:30 -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
wizjanyandWizjany 287be0209c Slight readability and usability improvements.
Also no longer allows trailing strings (e.g. //set #clipboardasdf).
2019-02-12 17:11:57 -05:00
wizjanyandWizjany 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
wizjany 6708e8292f Restore generation of hollow shapes.
Unfortunately this is a bit slower than before since we can't cache block
id & data values. However, applying patterns generally isn't too expensive,
and hollow regions were entirely broken before.
2019-02-09 20:30:57 -05:00
wizjany cdd71178f5 Ensure BlockCategories are initialized.
We should probably have a way to initialize all these catalog classes ahead of time.
2019-02-04 22:34:25 -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
wizjany e6c6a2cfea Set version to next snapshot, even though this is about to get clobbered by 7.0 snapshot. 2018-08-03 21:40:04 -04:00
wizjany 08fc855c0f Release 6.1.9 for Bukkit 1.12.x 2018-08-03 21:39:18 -04:00
wizjany 437ad00658 Move asm dep to buildscript section. 2017-10-19 20:06:01 -04:00
wizjany 21d89311c9 Update asm dep for ForgeGradle. 2017-10-16 18:08:41 -04:00
wizjany d1c2b8c3e5 Downgrade sponge target to fix compilation issues. 2017-08-05 12:55:35 -04:00
wizjany f34bc7aca5 Updated Bukkit to 6.1.7.3 for MC 1.12.1 and Forge to 6.1.8 for MC 1.12. 2017-08-05 12:18:52 -04:00
wizjany b557b2b71d Revert "Some command fixes" aka "Some command breaks"
This reverts commit 4a8bba7a54.
Fixes WORLDEDIT-3574.
2017-06-09 12:46:26 -04:00
wizjany 9cf8847e0e [Bukkit] Push 6.1.7 and bump.
Forge will take the next number when it gets released.
2017-06-08 10:41:27 -04:00
wizjany b2fb73582f Fixed //center not working in some cases.
Due to odd rounding and math issues, using //center on a region with an edge of even
length in quadrants with negative coordinates would only fill one of the two center blocks.

Thanks to Griffrez and up201406036 for the original PR.

Fixes WORDLEDIT-2986.
2017-06-08 10:01:23 -04:00
wizjany a4f1f57c9d Add Bukkit adapter for 1.12.
Fixes WORLDEDIT-3567.
2017-06-08 10:01:23 -04:00
wizjany a03b9cbe4c Add blocks and items for MC 1.12.
And some forgotten before...
2017-06-08 10:01:23 -04:00
wizjany 46dff16a97 Use our own firstNonNull to maintain back-compat.
Fixes WORLDEDIT-3567.
2017-06-08 10:01:23 -04:00
wizjany 41de204186 Allow copyEntities to be used in ForwardExtentCopy again.
The -e flag should now work for //copy and //cut as it used to.

Fixes WORLDEDIT-3557.
2017-03-19 11:56:04 -04:00
wizjany e511758d99 Add rotations to various blocks that were missing them.
Up/down levers still broken.

Fixes WORLDEDIT-3490.
2017-02-26 18:56:38 -05:00
wizjany 9f24f84c2b Issue tracker is back. 2017-01-08 00:53:36 -05:00
wizjany 66aa881b0c Copy Kernel class to WorldEdit to avoid loading AWT.
Java 8's Kernel statically loads the AWT library, which
can apparently cause some issues on some systems, for some reason.

Either way, there is no need to load AWT if it's not needed (Java pls).
2017-01-08 00:51:16 -05:00
wizjany a8d04c24be [Forge] Release 6.1.6 for Forge 1.11.
Using Forge recommended build 2189.
2016-12-13 21:16:37 -05:00
wizjany 82fdab35d1 Update 1.11 adapter with md_5's fix.
Fixes WORLDEDIT-3524.
2016-12-02 15:27:56 -05:00
wizjany 17aafe87d0 Add some old missing items to the db. 2016-11-30 16:22:48 -05:00
wizjany 81beff8277 Release 6.1.5 for Bukkit 1.11.
Bump version for dev.
2016-11-29 00:33:42 -05:00
wizjany 465161145b Add new blocks and items to lookups. 2016-11-23 18:14:17 -05:00
wizjany b0bfa4a562 Add new 1.11 blocks. 2016-11-20 03:07:28 -05:00
wizjany cd266ad96c Add adapter for CraftBukkit 1.11 2016-11-17 22:23:59 -05:00
wizjany 34c31dc020 Release WE 6.1.4 for Forge 1.10.2.
Bump version to 6.1.5-SNAPSHOT for development.
2016-09-05 00:53:50 -04:00
wizjany ddff8ecbb2 Re-add and update ForgeItemRegistry.
And fix code that depended on it.
Reverts parts of e91859130c
2016-08-28 02:48:29 -04:00
wizjany 98510992eb Fix artifact publishing.
I keep ammending this commit so it doesn't look like I've been working on
this for the past three hours.
2016-08-06 07:08:29 -04:00
wizjany c957ffb95a Fix NPE when //genbiome expression was false.
Fixes WORLDEDIT-3467.
2016-07-06 11:14:11 -04:00
wizjany 28d45870e2 Apply transforms to vectors in //paste -s. 2016-06-29 00:38:11 -04:00
wizjany e0c8776f0f Fix query function in expression masks.
Fixes WORLDEDIT-3344.
2016-06-28 23:59:34 -04:00
wizjany d0cf497939 Bump version for dev 2016-06-23 09:14:42 -04:00
wizjany b03445752e Release 6.1.3 for Forge 1.9.4 and Bukkit 1.10. 2016-06-23 09:12:32 -04:00
wizjany 5a42a8ddb4 Update internal block and item definitions. 2016-06-11 13:07:53 -04:00
wizjany ac1b4f7251 Add adapter for 1.10. Currently untested. 2016-06-09 10:17:52 -04:00
wizjany a5f5dc099b Disable left-click air task creation.
This should really not be necessary anymore.
Reverts 13f36757.
Fixes WORLDEDIT-3444.
2016-05-29 00:54:58 -04:00
Wizjany 07854f79fa Sync forge version to core. 2016-05-19 01:43:35 -04:00
Wizjany 03d7cd394a Fix another NPE in schematics. 2016-05-18 12:44:22 -04:00
wizjany fd3ca53d04 Release bukkit build 6.1.2, version bump snapshot. 2016-05-15 04:33:59 -04:00
wizjany b3fbe8b7a5 Update blocks.json.
This fixes a lot of issues with block rotations for various blocks.
Additionally, the //info tool will now report states (only works for
states that use data values) for easier lookups.

Note that some doors still have update issues, and //fast is needed
to paste them if they drop as items.
2016-05-15 04:02:35 -04:00
wizjany 32fb5b302d Ignore PlayerInteracts with off-hand item.
Fixes WORLDEDIT-3437
The API will need to be changed to accomodate off-hand tools etc
2016-05-15 03:29:58 -04:00
wizjany 7be1395ae2 Add 1.9.4 adapter.
Fixes WORLDEDIT-3438.
2016-05-15 03:17:29 -04:00
wizjany c85c9f7a6c Version bump forge build for release. 2016-05-08 17:08:31 -04:00
wizjany c9f54ecb01 Only negative radius allowed for //butcher is -1. 2016-04-26 19:40:25 -04:00
wizjany 867e59ba3d Parse empty sign lines as empty JSON strings.
Since the server doesn't bother validating sign text, and
the client validates it by crashing. Note that this attempts
to wrap strings as JSON, but hasn't been fully tested.
2016-04-14 19:24:09 -04:00
wizjany 94ae1be2d1 Fix NPE when using //schem list with not schematics present. 2016-03-08 12:42:23 -05:00
wizjany 6c03eea9b1 Force compilation on newer bukkit api.
Since spigot like pulling the rug out from under us.
Fixes WORLDEDIT-3400.
2016-03-07 19:26:16 -05:00
wizjany de3578137b Add bukkit adapter for MC 1.9. 2016-03-02 18:14:18 -05:00
Wizjany 3bd87cfb2d Merge pull request #339 from sk89q/feature/improved-travis-builds
Improve Travis builds
2016-02-05 14:20:22 -05:00
wizjany 1fe197df98 Fix build script versioning, release a 1.8.9 build. 2016-01-16 23:42:21 -05:00
wizjany 62befe7594 Fix schematics in directories. 2016-01-13 18:55:49 -05:00
wizjany 629b7d56dc Merge branch 'feature/paged-schematic' of https://github.com/kenzierocks/WorldEdit 2016-01-13 17:46:10 -05:00
wizjany 2cd4412b5d Make mask parser create world-aware expression masks.
This allows things like //gmask =queryRel(...) to work.
Also the query* functions now allow -1 as a wildcard for either id or data.
2016-01-13 17:34:58 -05:00
wizjany 23d6fa7579 Add worldedit.calc permission node to //calc command. 2015-12-21 16:14:44 -05:00
wizjany bed8a80894 Revert to Guava 17's firstNonNull.
Deprecated but Spigot doesn't include guava18 yet.
2015-11-13 20:17:56 -05:00
wizjany 9a65bdb72d Fix cycler tool trying to set negative data values.
Fixes WORLDEDIT-3325.
2015-07-31 12:46:51 -04:00
wizjany 1dd6faf786 Actually for real fix unit tests.
I promise this time.
Seriously though, who makes unit tests depend on some old,
hardcoded file that isn't even updated anymore.
2015-07-17 07:51:41 -04:00
Wizjany 2aad68f80d Fix BlockData causing unit test to fail
Yes, even though north/south and south/north anvils LOOK the same, they are in fact different data values.
2015-07-17 04:48:09 -04:00
Wizjany a28acdd6a8 Merge pull request #334 from OvercastNetwork/master
Fix unfortunate typo in AffineTransform
2015-07-15 10:08:58 -04:00