Commit Graph

1027 Commits

Author SHA1 Message Date
haykam821
b5b29a2962
Add the trim command (#2278)
* Add the trim command

Fixes #1629

* Fix issues from PR review

---------

Co-authored-by: Madeline Miller <mnmiller1@me.com>
2023-06-24 16:36:24 +10:00
Maddy Miller
a3a5b074b0
Add a memoizing mask utility (#2319)
* Add a memoizing mask utility

* add utils to Masks

* license header

* PR feedback
2023-06-24 05:42:45 +00:00
Maddy Miller
61363821b9
Add a BiomeCategories API (#2338)
* Add a BiomeCategories API

* licenses

* Use a supplier to retain the lazy-load & dynamicness of the existing system, but still retaining the inversion of control that this PR was intended to provide
2023-06-24 15:11:31 +10:00
TomyLobo
6494dbc612
Improve ArbitraryShape caching (#2325)
* Improve ArbitraryShape caching

Every point is now only evaluated once.

* Defer cache initialization until it is clear that we need it.

* Defer pattern evaluation until cache miss
2023-06-18 17:34:12 +10:00
Madeline Miller
b079da7db0
Merge branch 'version/7.2.x' 2023-06-14 19:21:59 +10:00
Jordan
4892e056cf
feat: implement recently-added tree types to tree generator (#2332)
* feat: implement recently-added tree types to tree generator

* fix: add mappings to implementation worlds

* Use later API version to fix tests

---------

Co-authored-by: Madeline Miller <mnmiller1@me.com>
2023-06-14 18:47:19 +10:00
Madeline Miller
c5188212b5
Fixed setting sign text on 1.20 2023-06-09 23:09:43 +10:00
Madeline Miller
3cb1e03edb
Fix diffs missed due to merge crash 2023-06-09 22:06:33 +10:00
Madeline Miller
d312553fc5
Merge branch 'version/7.2.x' 2023-06-09 21:55:13 +10:00
Maddy Miller
40a203c3d2
Add Console/CommandBlock support to Fabric/Forge/Sponge (#2317)
* Add Console/CommandBlock support to Fabric/Forge

* Hoist config option and add a common abstract class for command block actors

* Apply to Sponge too
2023-06-09 21:21:40 +10:00
wizjany
91c9786e27 Bump snakeyaml to match spigot, use default ctors. 2023-06-09 20:16:41 +10:00
Madeline Miller
066a7abf7f [Bukkit] 1.20 2023-06-09 20:16:41 +10:00
Madeline Miller
48d2195fe7 [Fabric] 1.20-rc1
Add MCUtils data

pre7

rc1
2023-06-09 20:16:41 +10:00
Octavia Togami
9667101730
Upgrade many items, Gradle 8.1.1 (#2329)
* Upgrade many items, Gradle 8.1.1

* Bump to codecov snapshot

* Use the release of the codecov plugin

---------

Co-authored-by: Madeline Miller <mnmiller1@me.com>
2023-06-04 05:40:08 +00:00
Maddy Miller
856aaa6267
Add a -c flag to the biome brush to set entire column (#2235)
* Add a -c flag to the biome brush to set entire column

* Use new region factories that take fixed positions

* Rename to FixedHeight from just Fixed
2023-05-21 22:12:41 +10:00
Madeline Miller
bd9af40e83
Add regression tests to the round Expression function 2023-05-21 15:09:38 +10:00
Madeline Miller
237ebc1016
Ensure non-Double types are boxed in expression function calls. Fixes #2315 2023-05-21 15:03:30 +10:00
TomyLobo
4fc62d98cb Add new //placement types
- //placement min - selection min X/Y/Z
- //placement max - selection max X/Y/Z
- //placement world - absolute world location
- //placement here - This puts the placement position at the current player position.
2023-05-14 16:53:25 +10:00
TomyLobo
d28fadb842 Add //placement, which sets either pos1 or player explicitly 2023-05-14 16:53:25 +10:00
TomyLobo
21a465b902 Refactor placement system to be more flexible 2023-05-14 16:53:25 +10:00
TomyLobo
6c14e839d8 Add LocalSessionTest
Test coverage so far:
- setPlaceAtPos1
- isPlaceAtPos1
- togglePlacementPosition
- getPlacementPosition for both pos1 and player modes
2023-05-14 16:53:25 +10:00
TomyLobo
edb54345ba Extract base test class for WorldEdit test cases 2023-05-14 16:53:25 +10:00
ykgamma
df13de3379
Fix McRegionChunkStore.java (#2292)
- Fixes an issue where the LinCompoundTag passed to ChunkStoreHelper::getChunk is not the expected root compound tag, but one that wraps it. See comment of LinRootEntry::toLinTag
2023-05-13 22:41:32 +10:00
TomyLobo
34b19577f1
Use an annotation to register the methods in the Functions class (#2305)
There's a lot less code now and it's also easier to add new methods.
2023-05-13 21:25:58 +10:00
Maddy Miller
b8b89267c1
Ensure blockmap uniqueness across TE values (#2304) 2023-05-13 16:18:47 +10:00
zml
d320dafc2b
fix(core): Properly reinit convex CUI selection on primary click (#2313)
Fixes #2312
2023-05-13 16:15:42 +10:00
Madeline Miller
91dd9deca8 Added strings and implement on other platforms 2023-04-30 16:53:58 +10:00
Madeline Miller
5ca80395a3 Add structure generator command 2023-04-30 16:53:58 +10:00
Madeline Miller
88851b0cc2
Update to Gradle 7.6 and resolve deprecation issues in buildscript 2023-04-13 22:42:47 +10:00
TomyLobo
ba94660e27 Keep extending cuboid selector after //paste -s/n 2023-04-12 14:23:33 +10:00
Madeline Miller
561ab50a7b
Fix loading a missing session printing a warning to console. Fixes #2291 2023-04-09 17:06:28 +10:00
Madeline Miller
acc4b59744
Fix Sponge Schematic V1 incorrectly attempting to read base tag twice 2023-04-02 18:27:27 +10:00
Madeline Miller
da4bca05f2
Remove requirement for caller to ungzip the stream with the new isFormat API 2023-04-02 18:21:20 +10:00
Maddy Miller
c7d559bfcc
Allow finding schematic format by InputStream (#2249)
* Allow finding schematic format by InputStream

* .

* Don't auto-close the stream

* Fix up based on feedback

* checkstyle
2023-04-02 14:42:39 +10:00
Madeline Miller
0d8a2118f2
Merge branch 'version/7.2.x' 2023-03-19 16:20:24 +10:00
JOO200
d4556dfea2
Add method to check initialize state in PlatformManager, deny access to registries when uninitialized (#2237)
* Add initialize method to PlatformManager, modify UnitTest

* Prevent too early access to registries

Check for worldedit init state in Registry

* review: changed the error message to a generic message

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

---------

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2023-03-19 15:13:54 +10:00
Maddy Miller
121b4b616c
Add a feature generator and allow undoing of feature placement (#2239)
* Add a feature generator and allow undoing of feature placement [WIP]

Apply changes to Forge as well

Use proper translatable components

* Add a brush version of the feature command

Use Java proxy classes

* Add for Bukkit (only 1.19.3 for now)

Clean up the proxies to use a switch

Checkstyle is grumpy

Add the obfuscated versions

Remove debug text

Fix missed "destroyBlock" deobfuscated proxy function

* checkstyle
2023-03-10 11:39:24 +00:00
TomyLobo
b5b9c6ab86 Fix data values returned by the query functions in the expression language 2023-03-09 05:34:02 +01:00
Maddy Miller
82727ffb63
Few cleanups over the code and use more Java 9+ features (#2248)
* Few cleanups over the code and use more Java 9+ features

* Address feedback

* cleanup switch case

* Remove TODO
2023-02-26 18:17:14 +10:00
Maddy Miller
d960fa2237
Add property suggestions for hand,offhand,pos1 patterns (#2269) 2023-02-26 18:16:46 +10:00
Maddy Miller
98fd5dc82f
Allow factory suggestions to have parser context (#2236) 2023-02-26 17:05:53 +10:00
Tianhao Chai
17ce47cd66
EditSession.drawSpline: use vectors at block center for spline nodes
The spline generator was fed integral block node vectors, where center
of a block at coordinate (X,Y,Z) is actually in (X+0.5,Y+0.5,Z+0.5).
When generating a spline with (X,Y,Z)s, the curve sometimes doesn't go
through the intended block and may make weird turns at end of the curve.

Placing spline nodes at the center causes the curve to actually hit the
center of every block selected.
2023-01-09 01:09:12 -05:00
Madeline Miller
844a8fc04b
Merge branch 'version/7.2.x' 2022-12-27 21:04:27 +10:00
Maddy Miller
0b6dcb1fb7
Fixed clipboards failing to paste when a block has NBT data (#2198) 2022-09-30 14:20:39 -07:00
wizjany
0ef38b5292
Use SnakeYaml 1.32+, set loader code point limit. (#2194)
Defaults to 64MB, can be set via -Dworldedit.yaml.codePointLimit sysprop.

Fixes #2193, EngineHub/WorldGuard#1953.
2022-09-26 17:33:57 -04:00
Maddy Miller
4267fabd3d
Ignore structure void by default and use a flag to paste it (#2180) 2022-09-20 09:29:55 +10:00
Maddy Miller
267bbb307f
Add API to disable history tracking in EditSessions (#2189)
* Add API to disable history tracking in EditSessions

* Update worldedit-core/src/main/java/com/sk89q/worldedit/extent/ChangeSetExtent.java

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>

Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
2022-09-18 10:38:03 +00:00
Maddy Miller
7e61ff19ca
Work around invalid legacy values in schematics (#2171)
* Work around invalid legacy values in schematics

* Actually apply it to blocks lmao

* Micro-optimisation to reduce identical duplicate map lookups
2022-08-29 07:08:57 -07:00
Maddy Miller
55e2d3d480
Catch InvalidPathException in safeFile handler (#2167) 2022-08-10 11:08:14 +10:00
Madeline Miller
b3962d8b41
Merge branch 'version/7.2.x' 2022-08-07 17:38:06 +10:00