Commit Graph

561 Commits

Author SHA1 Message Date
Matthew Miller
f67f2ed93e
Merge pull request #408 from Brokkonaut/fix-old-sign-converting
Fix loading and converting signs in old schematics
2018-04-07 09:47:26 +10:00
Matthew Miller
ca660f1260
Merge pull request #409 from Brokkonaut/fix-wrong-block-for-snow-check
LEAVES2 should have snow on it too
2018-03-27 14:56:18 +10:00
Brokkonaut
4d2fe62d97 Fix loading and converting signs in old schematics
* Sign texts not starting with { are never valid json objects, so don't try to parse
* Else try to parse as json, but fall back to read sign text as string if not parseable
2018-03-26 06:49:39 +02:00
Brokkonaut
165fdac642 some translucent blocks were missing 2018-03-25 08:40:16 +02:00
Brokkonaut
701d80c757 LEAVES2 should have snow on it too 2018-03-25 08:38:47 +02:00
Matthew Miller
52263ac3b7 Ignore CUI connections with more than 3 failed attempts. 2018-02-28 10:59:00 +10:00
Matthew Miller
b17f2b55d7
Merge pull request #379 from boy0001/vector-fix
Vector and BlockVector should use the same hashCode
2018-02-17 16:18:35 +10:00
Matthew Miller
50f60da69f Prevent players and complex parts being pasted in schematics. 2018-01-02 20:49:36 +10:00
Matthew Miller
6fc1449837
Merge pull request #391 from sk89q/sign-fixes
Provide compatibility for legacy schematics that use the old sign NBT format
2018-01-02 20:38:00 +10:00
SlimSoftware
099987d439
Fix //snow didn't put snow on all types of leaves
For example, //snow didn't work on Oak leaves while it did work as you would expect on Dark Oak leaves. Fixed by adding leaves2 to translucent block list and checking if the block to put snow on is a leaf block when executing //snow.
2017-12-14 21:00:38 +01:00
Jesse Boyd
5c64cf2f56 Fix affine inverse (#395) 2017-09-02 00:23:30 -07:00
Kenzie Togami
d6aa1ad509
Make Java 8 detection work on Java 9
Closes #393.
2017-08-16 16:39:42 -07:00
Dumbo52
82bf563b3d Add beds, concrete, and concrete powder to usesDamageValue hash 2017-07-16 06:38:12 -04:00
Wyatt Childers
6b8ae6b988 Provide compatibility for legacy schematics that use the old sign NBT format 2017-07-04 14:58:18 -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
Jesse Boyd
4a8bba7a54 Some command fixes
Fix EditSession being created for commands that don't need it
Fix error from schematic list (when there are files in sub directories)
Fix dispatcher redundantly checking a huge number of permissions
2017-06-08 10:01:23 -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
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
Jesse Boyd
58094c72c3
* 2017-01-10 16:12:13 +11:00
Jesse Boyd
ad7fdd19fb
Vector and BlockVector should use the same hashCode
For example, the getChunks method returns a Set<Vector2D> which is
actually comprised of BlockVector2D, so using set.contains(some vector)
will always return false.

There's unlikely to be multiple entities on the same block, or above
y=256, so using the int coords is better.
2017-01-10 16:03:10 +11: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
17aafe87d0 Add some old missing items to the db. 2016-11-30 16:22:48 -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
Michael
6c65a8a989 CuboidRegion contains use block position
Int casting would be better here than adding one to the max block
2016-09-13 23:13:47 +02:00
Michael
5de4cfced2 Fix region contain method
The region contain method was broken.
A lot of subsquent issues are caused by this bug.
E.g. in a selection the entities in the last blocks at the positive-axis border are not selected.

Max block gives the impression of an exclusive point; however it is inclusive!
A position that is anywhere between of a 1x1x1 region, would return false in the old implementation.

By simply adding a one this should solve the problem.

Greetings
2016-09-13 09:26:23 +02:00
Wizjany
2e10fe896f Fixed bad copypaste in error message for //curve. 2016-08-27 16:53:51 -04:00
Wyatt Childers
b9801ebf57 Fixed an issue where the ParametricCallable wasn't forwarding InvocationTargetExpections caused by CommandExceptions properly
Fixes WORLDEDIT-3364
2016-07-17 19:03:22 -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
Wyatt Childers
6e36b5236c Fixed the automatic selection of a user's pasted area when using //paste -s
Fixes WORLDEDIT-3457
2016-06-28 20:36:46 -04:00
Wyatt Childers
a091853385 Made the CommandManager responsible for exception converters as apposed to individual dispatchers
Previously some exceptions were being handled only in the ParametricCallable, which lead to other dispatchers throwing the exception, and requesting that users report them.

Fixes WORLDEDIT-3386
2016-06-28 19:37:10 -04:00
Minecrell
7a097ca56e Add new 1.10 blocks to blocks.json 2016-06-23 09:03:07 -04:00
Kenzie Togami
e42107557e [Forge] Make DefaultBlockParser behave more like vanilla. 2016-06-17 16:59:41 -07:00
wizjany
5a42a8ddb4 Update internal block and item definitions. 2016-06-11 13:07:53 -04:00
FrozenBrain
fabd7045e7 Fix NPE when rotating hanging entities (#356) 2016-05-20 20:00:30 -04:00
FrozenBrain
85d4b9f4ec Fix MathUtils.dSin 2016-05-20 17:14:04 -04:00
FrozenBrain
4a7683d5bf Apply transformations to NBT data of tile entities (fixes rotation of skulls) 2016-05-20 17:13:52 -04:00
FrozenBrain
8f50f5adfb Fix secondary-ordinal direction vectors 2016-05-20 17:13:46 -04:00
FrozenBrain
1a3ae37b73 Fix rotation of item frames 2016-05-20 17:13:39 -04:00
Wyatt Childers
7dc9a9aece Merge remote-tracking branch 'origin/master' into feature/sponge-new 2016-05-18 19:49:16 -04:00
Wizjany
03d7cd394a Fix another NPE in schematics. 2016-05-18 12:44:22 -04:00
David Ortiz
2734dc377c Add 1.9 doors to getBlockBagItem HashMap 2016-05-17 03:00:09 -05:00
David Ortiz
c3342bb7b4 Add support for 1.9 doors on MultiStageReorder 2016-05-17 01:15:50 -05: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
Kenzie Togami
574ed9aa41 Fix some formatting concerns. 2016-05-05 20:09:53 -07:00
Kenzie Togami
301d02c9c5 Warn when not using Java 8 or greater.
Note: this warning is not in the shared WorldEdit class because it
doesn't get loaded as early as the individual plugin/mod
implementations for some reason.
2016-05-05 17:55:22 -07: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
Wyatt Childers
d3bbb40274 Merge remote-tracking branch 'origin/master' into feature/sponge-new 2016-03-19 14:44:56 -04:00
wizjany
94ae1be2d1 Fix NPE when using //schem list with not schematics present. 2016-03-08 12:42:23 -05:00
Wyatt Childers
124308c4ce Fixed an issue where an entity could fail to spawn, and this would end the edit 2016-02-05 19:33:48 -05:00
Kenzie Togami
982420369d Rewrite Closer to compile on Java 6 wrt Jar/ZipFile. 2016-01-31 22:26:30 -08:00
rlf
03f8843c20 More efficient chunk calculation of CuboidRegion 2016-01-13 19:02:46 -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
Kenzie Togami
8cd46977f3 Add paging to //schematics.
-p <int> can be used to select a page. Defaults to page 1.

First implementation by @BangL.
2015-12-28 12:52:39 -08: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
sk89q
0e200df5be Replace //set with new command version. 2015-10-29 18:20:27 -07:00
Albert Pham
86c6de7105 Add shortcut forest brush. 2015-10-29 13:16:22 -07:00
Albert Pham
fdfc3cdb33 Reorganize and further unify the new commands. 2015-10-29 13:05:04 -07:00
Albert Pham
25ad916611 Make ApplyCommand use SimpleCommand rather than ParameterCommand. 2015-10-28 14:08:47 -07:00
Albert Pham
6cfc60b2d6 Don't call next suggestion provider if there are no args left. 2015-10-28 14:08:29 -07:00
Albert Pham
cba32732a3 Add /br raise and /br lower as shortcuts for /br deform. 2015-10-28 13:50:07 -07:00
Albert Pham
98b61d0fbd Add a default suggested Deform expression. 2015-10-28 13:38:04 -07:00
Albert Pham
874408ad10 Make flags command executor-specific. 2015-10-28 13:37:58 -07:00
Albert Pham
f4bb5272e1 Update new commands with suggestion and help support. 2015-10-27 13:51:45 -07:00
sk89q
935de4c93d Add some experimental brush commands.
/br set <shape> <radius> <pattern>
/br deform <shape> <expression>
/br scatter <shape> <density> <generator>
/br apply <shape> <generator>

<shape> can be: cuboid, cyl[inder], sphere

<density> is 0-100

<generator> can be:
forest|tree <type>
item <item>[:<data>] (ONLY WORKS ON FORGE)

Examples:

/br deform cuboid 5 y-=0.2
/br scatter sphere 5 100 minecraft:dye:15
2015-10-26 23:14:30 -07: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
Wizjany
7586c19bb3 Revert changes to skull rotation.
Because it's stored in nbt. This should fix unit tests.
Someone reported rotation to be broken though, so this potentially rebreaks it?
2015-07-15 10:08:43 -04:00
Jedediah Smith
49fde59716 Fix unfortunate typo in AffineTransform 2015-07-15 08:03:13 -04:00
wizjany
1e6e54b85a Add/Fix rotation values for several blocks.
Torches, redstone torches, anvils, iron trapdoors, and skull should all rotate correctly now.
Doors are still missing data.
Fixes WORLDEDIT-3307, WORLDEDIT-3273.
2015-07-06 00:06:41 -04:00
Europia79
780b391987 Updated comment to reflect code changes 2015-06-26 00:09:09 -05:00
Europia79
eb43018ae2 Fixes issue 3315 with VirtualPlayers
http://youtrack.sk89q.com/issue/WORLDEDIT-3315
2015-06-25 22:38:00 -05:00
wizjany
025591e6d9 Don't double-check for symlinks while loading schematics.
Fixes WORLDEDIT-3310.
2015-06-19 18:28:25 -04:00
sk89q
b4d574273d Add more random tree types. 2015-06-05 00:30:14 -07:00
sk89q
e6662d7519 Make some minor corrections in TreeGenerator. 2015-06-04 23:54:25 -07:00
sk89q
270e988b60 2015 called: they are called "oak" and "spruce" now. 2015-06-04 23:26:23 -07:00
Kenzie Togami
ec5de0f22f Cleanup unused imports 2015-05-31 15:59:40 -07:00
wizjany
642f2a1f58 Fix entities copying to original location.
Fixes WORLDEDIT-3275.
2015-05-29 16:18:58 -04:00
flamin_scotsman
d5914e52e1 Fix ExceptionHandler compareTo method.
The previous implementation violated the contract that compareTo must be behave the same way when operands are reversed and that it is transitive. Any classes that were not equal, or a superclass of another were returned as being "less than".

The new implementation tests if classes are superclasses of each other, otherwise falls back to alphabetical sorting on canonical name.

While this did not manifest in 1.6, the replacement sort algorithm in 1.8 (TimSort) caused the sorting to appear random due to apparently contiguous sections being consumed, then sorted in bulk.
2015-03-13 16:04:55 +00:00
Wizjany
2db5d8b11a Merge pull request #322 from flaminscotsman/tools_fix
Fix for WORLDEDIT-3270
2015-03-11 00:36:35 -04:00
Wizjany
b551512f27 Merge pull request #321 from Dumbo52/master
Add stone + banners to usesData HashSet.
2015-03-11 00:32:41 -04:00
flamin_scotsman
f71d037a35 Change cycler tool to use EditSession rather than changing the world directly 2015-03-10 21:55:51 +00:00
flamin_scotsman
0d347a3837 Fix incorrect instantiation of BlockBag and EditSession in two of the tools.
Used EditSessionFactory rather than getting the EditSession from the local session.
2015-03-10 21:51:35 +00:00
Wizjany
2fedcf8019 Add rotation values to lit redstone torches.
Fixes WORLDEDIT-3273.
2015-03-06 15:22:55 -05:00
Dumbo52
440cee3539 Add banners to usesDamageValue HashSet. 2015-03-06 01:42:22 -05:00
Dumbo52
55f1f42ebf Add stone to usesData HashSet. 2015-02-28 18:46:49 -05:00
Dumbo52
8b2bf84b5e Fix imprecise rotations bug.
The bug this fixes is documented here: http://youtrack.sk89q.com/issue/WORLDEDIT-3220
2015-02-21 17:52:22 -05:00
sk89q
2009344058 Fix entity rotation. 2015-02-20 21:23:54 -08:00
sk89q
7257c7bb2b Don't transform entity positions if the isIdentity() == true. 2015-02-20 21:09:48 -08:00
wizjany
ddc741147e Fix button rotation, add support for up/down flipping and restore unit test functionality. 2015-01-23 00:28:05 -05:00
wizjany
ec9c77c31b Excluded armor stands from //butcher by default.
Someone got lazy and just made armor stands a living entity instead of extracting an ArmorEquippable interface.
2015-01-22 15:54:01 -05:00
TomyLobo
dc6ffae500 Fixed /butcher text in the case of only one mob being killed. 2015-01-21 09:46:35 +01:00
wizjany
d1631a9ca4 Restore entity counter to //remove and grammatified //butcher similarly. 2015-01-20 12:30:51 -05:00
sk89q
98a7257c47 Fix a typo in EditSession.java 2015-01-12 21:52:06 -08:00
Wizjany
0f865623ed Closed a set of quotes in JavaDocs. 2014-12-11 09:38:14 -05:00
sk89q
faf0b0691e Update internal block data for 1.8, without updates to block bag data. 2014-12-05 19:57:39 -08:00
sk89q
052addbc05 [Forge] Add creative use mode and cheat mode and fix config overwrite. 2014-11-14 18:23:43 -08:00
sk89q
3bee2d4c02 Handle mod:name as a way to specify blocks in the Forge mod. 2014-11-14 17:45:30 -08:00
sk89q
fe5cfced4f Remove redundant name from Tag instances. 2014-11-14 11:38:54 -08:00
sk89q
7192780251 Switch to Gradle. Use git log --follow for history.
This converts the project into a multi-module Gradle build.

By default, Git does not show history past a rename, so use git log
--follow to see further history.
2014-11-14 11:27:39 -08:00