wizjany
a80420d14b
Add biome storage to BlockArrayClipboard.
2019-03-30 00:42:28 -04:00
wizjany
4e66b9a336
Revert 6b3426e1
.
...
Empty base blocks are always immutable. Fuzzy states don't have NBT.
2019-03-30 00:41:47 -04:00
wizjany
42d0d6e79a
Use getTag instead of requireTag in a few places.
2019-03-29 23:44:18 -04:00
wizjany
d7d2d03ee8
Clipboard offset pattern is now #copy@[x,y,z].
...
Since the parsers were changed around, unescaped commas are parsed as
separate blocks now.
2019-03-27 23:36:59 -04:00
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
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
wizjany
18414fe3b5
Fix symlink detection.
2019-03-15 09:10:51 -04:00
Kenzie Togami
d6804737cf
Switch to SLF4J logging.
2019-03-13 19:51:48 -07: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
Matthew Miller
a5cec7728d
Merge pull request #452 from EngineHub/forge-1.13
...
Added support for Forge 1.13
2019-03-11 22:52:30 +10:00
wizjany
a59d994d84
Hook up the biome registry.
2019-03-11 00:15:21 -04: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
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
Kenzie Togami
4878f38250
Fix platform registration, config setup
2019-03-04 19:36:06 -08: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
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
5de8e0852c
Treat categories as empty when missing
2019-02-18 21:17:36 +10:00
Matthew Miller
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
Matthew Miller
3683a0438a
Use nonNull rather than !isNull
2019-02-16 19:58:06 +10:00
Matthew Miller
db1315e043
Refactor registries to entirely use the platform
2019-02-16 19:35:13 +10:00
Matthew Miller
1b101740fe
Use a proper registry for biomes
2019-02-16 17:27:00 +10:00
Matthew Miller
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
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
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
wizjany
287be0209c
Slight readability and usability improvements.
...
Also no longer allows trailing strings (e.g. //set #clipboardasdf).
2019-02-12 17:11:57 -05:00
wizjany
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
76400e533d
Add missing flags to clipboard brush usage.
2019-02-11 12:50:51 -05:00
Matthew Miller
3e988e7ffe
Fixed parsing fuzzy blocks failing.
2019-02-11 20:30:42 +10: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
Matthew Miller
f3ec5bbdde
Added a ##tag parser Pattern. gives a random combination using the blocks from the tag with an equal distribution.
2019-01-31 22:28:04 +10:00
Matthew Miller
2f9c7f19f5
Added support for 'rotation' BlockState values.
2019-01-22 21:59:20 +10:00
Matthew Miller
2e0fa300b7
Actually support disabling chunk loading extent
2019-01-22 21:34:37 +10:00
Brokkonaut
432a201266
Make biome changes undoable
2019-01-21 19:07:29 +01:00
Matthew Miller
871541d8c0
Tweak the last access extent cache to provide better caching
2018-12-29 19:21:45 +10:00
Kenzie Togami
2f8bdccf65
Clarify state when asking for caps with no platforms
2018-12-28 22:20:12 -08:00
Matthew Miller
862b63d43a
Can't query the row directly
2018-12-28 18:06:41 +10:00
Matthew Miller
54b6e57186
Few minor improvements to the fuzzy system.
2018-12-28 15:05:05 +10:00
Matthew Miller
b544782f3b
Make the base fuzzy cached per block type
2018-12-27 15:33:19 +10:00
Matthew Miller
8da984d9f9
Fuzzier fuzzies
2018-12-27 15:19:58 +10:00
Kenzie Togami
386668d221
Clean up other compiler warnings
2018-12-26 16:50:24 -08:00
Kenzie Togami
3fefcbf971
Remove all raw usages of BSH, improve API generics
2018-12-26 16:39:10 -08:00
Matthew Miller
a88f6b8430
Minor improvements to the server side CUI
2018-12-26 18:15:17 +10:00
Matthew Miller
b75d5149eb
Fixed the bundle being directly used outside of the registry system.
2018-12-23 21:43:20 +10:00
Matthew Miller
1d5e9b7d04
Few fixes
2018-12-23 21:24:58 +10:00
Matthew Miller
645fd682b6
Finish porting all the old masks across
2018-12-23 19:10:05 +10:00
Matthew Miller
6312bcecf6
Fixed the item parser not using the ItemRegistry
2018-12-23 19:02:58 +10:00
Matthew Miller
c5d9aadab8
Start work on modularising masks and patterns
2018-12-23 18:56:26 +10: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
ea30578781
Added a way to get the spawn position of a world
2018-12-21 17:05:30 +10:00
Matthew Miller
c949b07df1
Added a method to teleport entities across worlds.
2018-12-21 16:56:10 +10:00
Matthew Miller
b300c21185
Update draw.js and roof.js
2018-12-20 13:43:01 +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
8f236afae9
Added a display name to Actors
2018-12-18 17:36:53 +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
926f6a6ab8
Flush undo/redo
2018-12-09 16:28:01 +10:00
Matthew Miller
6f3016c7f0
Fixed up the commitRequired checks.
2018-12-09 16:28:01 +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
618cbd2250
Few small fixes
2018-12-09 16:28:01 +10:00
Matthew Miller
59f9864ba3
Set fast to the default
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
b3f5bc030e
Few fixes for FastModeExtent.
2018-12-09 16:28:01 +10:00
Matthew Miller
7d468357e3
Added "fast mode corrections"
2018-12-09 16:27:02 +10:00
Matthew Miller
4e5e9f609e
Added the multi-staging from the multipass2 branch
2018-12-09 16:27:02 +10:00
JOO200
a73faf0c8b
Check by setting blocks with BlockBagExtend for changed materials.
2018-12-05 17:09:06 +01:00
Matthew Miller
be0d21e2a9
Filter out commands that the player doesn't have permissions for. Workaround for a Spigot issue.
2018-12-05 16:32:20 +10:00
Matthew Miller
8e18ecb645
Merge pull request #330 from Europia79/vpcmdfix
...
Fixes issue 3315 with VirtualPlayers
2018-11-24 13:16:56 +10:00
Matthew Miller
2dc9321da6
Added support for axis rotations.
2018-11-17 12:00:19 +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
Matthew Miller
626861aa99
Fixed serialisation of vectors.
2018-11-05 23:27:03 +10:00
Matthew Miller
4e4ed6c893
Fixed missing BaseBlock import
2018-11-04 17:27:36 +10:00
Matthew Miller
53bc730909
Merge pull request #435 from sk89q/feature/trace-unflushed-sessions
...
Add tracing for unflushed EditSessions
2018-11-04 17:21:25 +10:00
Kenzie Togami
b6f6f3dde6
Correct trace property name
2018-11-03 23:06:52 -07: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
e202348dac
Simplify commit-required detection
2018-11-03 22:22:43 -07:00
Kenzie Togami
b8ae611c73
Checkstyle requires calling super.finalize
2018-10-30 18:44:32 -07:00
Kenzie Togami
e1fbaaff59
Add tracing for unflushed EditSessions
2018-10-30 18:39:51 -07:00
Kenzie Togami
3b5972b7f2
Flush / unbuffer more tools
2018-10-30 18:06:00 -07:00
Matthew Miller
93de97dc19
Allow modifying the region of a BlockArrayClipboard
2018-10-24 16:50:15 +10:00
Matthew Miller
275a2fa887
Fixed a few bad javadoc imports
2018-10-24 16:33:04 +10:00
Kenzie Togami
d1312c66e1
Ensure we flush iff it is needed
2018-10-20 19:54:13 -07: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
f8bf547c9e
Added some missing bukkit registries
2018-10-14 17:55:57 +10:00
Matthew Miller
0a149a796f
Make distr operation based
2018-10-12 15:28:40 +10:00
Kenzie Togami
e16dacc11e
Small patches for timed-calc post-1.12-merge
2018-10-11 17:25:06 -07:00
Kenzie Togami
21db86f26b
Register a platform for expression tests
2018-10-11 17:18:52 -07:00
Kenzie Togami
bb923aeb59
Attach a configurable timeout to expression evaluation
2018-10-11 17:18:52 -07:00
Matthew Miller
844971bca6
Java on TC doesn't compile this code for some reason.
2018-10-11 22:04:16 +10:00
Matthew Miller
495b9d07b5
Not all "north/south/east/west" are boolean
2018-10-11 21:39:41 +10:00
Kenzie Togami
2824a92c19
Fix some minor ordering bugs
2018-10-10 12:23:00 -07:00
Kenzie Togami
7d4906cfe9
Add chunk batching flag, enable by default
2018-10-10 11:38:23 -07:00
Kenzie Togami
ff391ca0b3
Update licenses
2018-10-10 11:38:23 -07:00
Kenzie Togami
f73be4b75c
Add newline to LocatedBlock.java
2018-10-10 11:38:23 -07:00
Kenzie Togami
e059490cd1
Rework block-batching, create draft of chunk batching
2018-10-10 11:38:23 -07:00
Matthew Miller
6ecbf19406
Properly rotate fences etc
2018-10-08 22:32:26 +10:00
Kenzie Togami
ff877ec03b
Make BlockType#getDefaultState like other fields
2018-10-04 17:20:07 -07:00
Kenzie Togami
ef2c07ca24
Update forge for new block API
2018-10-04 17:18:43 -07:00
Kenzie Togami
d0ea5121f2
Make some BlockType fields lazy, to avoid early Platform dependencies
2018-10-04 17:18:01 -07:00
Kenzie Togami
2cad9a2c09
Switch to a license plugin for headers
2018-10-04 00:29:34 -07:00
Kenzie Togami
36cbc5d9d0
Cleanup javadoc warnings in worldedit-core
2018-10-01 15:30:23 -07:00
Matthew Miller
59584ba10c
[Experimental] Don't check for permissions on root parents.
2018-09-26 15:41:27 +10:00
Matthew Miller
fd6034fbdd
Added the 1.13.1 new blocks.
2018-09-23 20:22:33 +10: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
4969dac39c
Potential minor performance improvements when checking fuzzy equality.
2018-09-20 16:56:46 +10:00
Gerrygames
934680dac2
fix sponge schematic offset
2018-09-04 14:26:50 +02:00
Brokkonaut
480f2de3af
Add 1.13 chunk format for snapshots
...
Fixes WORLDEDIT-3714
2018-09-02 04:33:08 +02:00
Matthew Miller
8bfbc55c71
Enable experimental //walls for non-cuboid regions.
2018-08-30 16:42:50 +10:00
Matthew Miller
fdc3cd56f7
Add a mask for block categories. Eg, you can now do //replace ##wool minecraft:sand to replace all wool with sand
2018-08-30 14:51:38 +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
d3b3d57041
Merge pull request #420 from sk89q/server-side-cui
...
Added a server side version of WorldEditCUI with limited functionality
2018-08-20 14:46:08 +10:00
Matthew Miller
7b83f97c35
Fixed NotABlockException not getting thrown
2018-08-19 14:41:09 +10:00
Matthew Miller
0f8cc99c35
Disable server CUI by default.
2018-08-19 13:46:24 +10:00
Matthew Miller
4d0df10f88
Fixed sessions not saving on shutdown
2018-08-19 13:01:08 +10:00
Matthew Miller
41c307a4b5
Set the session to dirty if the server CUI is changed.
2018-08-19 10:46:46 +10:00
Matthew Miller
dc39300af8
Merge pull request #364 from mickare/patch-1
...
Fix region contain method
2018-08-18 20:33:53 +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
Matthew Miller
f8585adc79
Remove debug code
2018-08-18 15:27:26 +10:00
Matthew Miller
7f419618cc
Switch to using fake blocks, no more world pollution
2018-08-18 15:22:49 +10:00
Matthew Miller
cf10f8ff8a
Proof of concept server-side CUI handler. Note: This pollutes the world with blocks atm
2018-08-18 14:22:08 +10:00
Matthew Miller
bc5609114b
Add a material to check if air is air, because there are now 3 types of air.
2018-08-16 15:42:11 +10:00
Matthew Miller
c31161d068
Moved report framework to WorldEdit and fixed a few bugs.
2018-08-15 12:45:18 +10:00
Matthew Miller
e0e7778536
Fixed some bugs and cleanup some code.
2018-08-13 22:18:12 +10:00
Matthew Miller
f96487a2d1
Use BlockStateHolder for setBlocks
2018-08-10 20:36:00 +10:00
Matthew Miller
f54d6afb65
Make BaseBlock more memory efficient, and make it clear in the API that it's not intended to be used for every single block.
2018-08-10 20:29:06 +10:00
Matthew Miller
5f4cc3e694
Cleanup a little bit more code.
2018-08-06 19:08:15 +10:00