Commit Graph

1325 Commits

Author SHA1 Message Date
dordsor21
56972ee40b
Trim performance (#451)
* Increase performance slightly when trimming.
If the chunk section is all one blocks (common in plotworlds) it'll be a nice little boost.

* Cache whether blocks are ticking or not. Greatly reduces the time required to create a palette

* collapse 5 lines to 2.

* Also apply to 14 and 15 for the numpties

* Cleanup
Actually ignore the exception - remove my debug print.
Remove double semi-colon

* Apparently 1.14/15 matter too still.
2020-05-07 23:00:13 +01:00
dordsor21
a2b0a5e622 Fix offset mask (< and >) 2020-05-07 19:38:42 +01:00
IronApollo
8b1a0bbc34 Fix #417
This commit aims to fix existing issues regarding the "0/-1 blocks affected" bug. Introducing the new LinkedFilter class allows us to use multiple filters for single-filter operations, e.g. applying a pattern to blocks while also counting the amount of blocks applied to. SetFilter.java was also removed due to not being used.
2020-05-07 12:29:18 -04:00
dordsor21
0c539b4e84 Fix replace patterns
Fixes #445 #440 #372
2020-05-06 15:50:57 +01:00
dordsor21
3abf964620 Better logic for selecting schematic format.
- You had to specifically use //schem load <schematic>.schematic mcedit to load legacy schematics, now if you're loading .schematic it assumes you're wanting mcedit format
 - If you end up attempting to load an mcedit schematic with the sponge reader it now throws an exception.
2020-05-05 16:16:27 +01:00
IronApollo
6dec0ab2ba Override #equals method in AbstractRegion.java
This is an attempt to fix CPU spikes which do not reduce and continue mounting until the server reaches ~300%-500% usage. This override should allow prompt equality checks for regions based on the world, the minimum point, the maximum point, and area covered by the region.

Issues found regarding this change should be quickly reported so this can be reverted and replaced with another appropriate solution.
2020-05-03 19:51:48 -04:00
dordsor21
a6f2cd0fb5 add // to mask and range 2020-05-02 18:34:49 +01:00
IronApollo
aae760c625 Merge branch '1.15' of https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13 into 1.15 2020-04-29 14:17:48 -04:00
IronApollo
8247f78e9d Override hashCode method in AbstractRegion
This commit fixes the PlotSquared issue where running a PlotSquared command could result in intense lag on the main thread. This was mainly seen with running the /p info command on an extremely large plot.

Since #world can be null, the uniqueness of this hashCode is not the best, but since it's essentially just a collection of BlockVector3's, I don't believe this change will break anything. If it does, please let me know! Feedback on the uniqueness of this is welcomed.
2020-04-29 14:17:05 -04:00
Pierre Grimaud
f9a40599fb
Fix typos 2020-04-29 19:36:34 +02:00
MattBDev
d9829614f2 Fixes #408
The issue seems to be that a some upstream code was removed for likely "performance" reasons. Obviously, wrong since it broke stuff.
2020-04-28 22:26:16 -04:00
Octavia Togami
4307e3a671 Transpile using Babel
This is pretty slow right now, but works as a proof-of-concept.
2020-04-27 23:18:21 -04:00
Octavia Togami
4f8ac056ab Correct typo in region selector docs
(cherry picked from commit 9a11c57846ab2e18faad4572d8f4655b617d9260)
2020-04-27 23:15:07 -04:00
MattBDev
aeb2820d89 Add debug message to addProcessor 2020-04-27 19:17:23 -04:00
MattBDev
b13dea19c5 Add debug messages 2020-04-27 19:04:20 -04:00
Octavia Togami
864d160102 Update Piston to fix bugs
Closes #1292 via Piston fixes.

(cherry picked from commit dc56b602c0367fbd24f954de2b8be4e864add59f)
2020-04-24 16:05:15 -04:00
Octavia Togami
3426e0103b Make the null-result case visible to the user
Fixes #1303.

(cherry picked from commit 83438644dcdc470517f67c0d55ff4889f71cc435)
2020-04-24 15:57:34 -04:00
wizjany
ee3a30d582 Don't suggest default namespaces.
This just ends adding a lot of `minecraft:` to otherwise short commands.

(cherry picked from commit d2601851835201d11e5805250ecffc703d0b0cd6)
2020-04-24 15:57:07 -04:00
chickeneer
396b03edf7 Add compatibility handlers for beds and banners for MCEdit Schematics (#561)
* Add compatibility handlers for beds and banners

* IntTag#getValue does not return null so do not check that

(cherry picked from commit 53ac21aa8723d71040d580902cfeae551a9cabf6)
2020-04-24 15:56:22 -04:00
dordsor21
69bd0274dd Fix undo for stack, move
- Most/anything using ForwardCopyExtent basically
2020-04-23 17:07:34 +01:00
dordsor21
29b82d4e51 Remove a load of soft errors in EditSession. 2020-04-23 17:07:01 +01:00
dordsor21
c714e26f68 Reformat paste in ClipboardCommands because it was ugly 2020-04-23 17:01:17 +01:00
dordsor21
330fc39dde Further non-standard selection fixes as per #393
- Fix incorrect usage of initChunk (it's run in the right place now)
 - Fix poorly implemented //sel sphere "improvements"
2020-04-19 19:46:41 +01:00
dordsor21
b52fc46f19 Regarding #393
- Fix CharFilterBlock not being properly created (the chunk X and Z were never set)
 - Replace BlockVector3#divide with bitshift because you can't divide down and then bitshift back up with the correct results for negative values
2020-04-19 13:56:02 +01:00
dordsor21
7b9a64e9a6 add a bunch of // aliases for commands 2020-04-19 11:43:30 +01:00
Octavia Togami
415e91b519 Re-apply 374ad99
Accidentally fixed the EntryMaker issue before I pulled 374ad99. Should reflect upstream now.
2020-04-16 20:41:59 -04:00
IronApollo
8b97a11fa4 Merge branch '1.15' of https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13 into 1.15 2020-04-16 20:27:47 -04:00
IronApollo
e1ba16b699 Fix #403 2020-04-16 20:27:38 -04:00
Octavia Togami
ff47e6f717 Cherry-pick to fix EntryMaker issue 2020-04-16 20:26:55 -04:00
dordsor21
97d73889cc Remove _ from tree type as easy fix for actually typing the correct tree type 2020-04-16 17:22:22 +01:00
mrlasagne
cba7c21ce5
Fix special masks issue
This fixes the issue where masks other than SimpleBlock masks (like Offset mask or negate mask) would not work.

The issue was caused by parseFromListInput() who would throw SuggestInputParseException if the input was not a valid block definition.
But as the parser was catching NoMatchException only, this was causing an error and the MaskFactory was broken.
2020-04-13 22:34:15 +02:00
Octavia Togami
735a37ffd0 Use custom radix sort for ordering blocks (#1277)
* Use custom radix sort for ordering blocks

* Licenses :P

* Fix ordering, add test for it

* Grant Gradle more memory (thx Fabric)

* Increase (?) / Specify memory for core tests

* Many attempts at fixing OOM

(cherry picked from commit bb013aa89b8457c4649e2546eef0aa94b9fc4020)
2020-04-10 13:42:27 -04:00
Octavia Togami
374ad992a2 Properly close all files when dealing with archives (#1274)
* Properly close all files when dealing with archives

* Move file utils to SafeFiles class

* Licenses

(cherry picked from commit a600266d41151eec4f2239cf90e202bb99fa3a8b)
2020-04-10 13:38:14 -04:00
MattBDev
092bf98ea5 Odd sort-of fix for allowing //stack to be undone 2020-04-10 13:25:27 -04:00
MattBDev
dded68e071 Add missing code to SpongeSchematicReader 2020-04-02 15:49:45 -04:00
IronApollo
755ea09797 Fix #390
Turns out the FilterBlock's getOrdinal value is from the "get", and does not share the same reference as setOrdinal, whose value is from the "set", would modify.

Because of this, even if #getOrdinal returns 0, we still must update the set with 0 by #setOrdinal.
2020-04-01 00:26:11 -04:00
MattBDev
56395534fa Remove useless messages 2020-03-31 19:28:21 -04:00
wizjany
2ea85ab004 Make //size text color consistent.
(cherry picked from commit eb8fcdcd5b797a7ec1db0c53c3602f79d4f971bf)
2020-03-31 00:33:43 -04:00
dordsor21
318e367cf0 Correctly unregister player on quit and close clipboard if using disk. 2020-03-30 17:41:41 +01:00
dordsor21
3cd30ebbff Fix DiskOptimisedClipboard not closing 2020-03-30 17:00:41 +01:00
dordsor21
76efbed4b2 Fix rotation breaking NBT data:
- Don't only copy NBT over if the original block had a Rot tag
2020-03-30 16:01:50 +01:00
dordsor21
45e0d37889 Clipboards paste biomes 2020-03-30 10:27:03 +01:00
Marco
1d562c7cc3 Fixing wrong translation keys 2020-03-29 12:41:10 +02:00
IronApollo
8c7d4c0cc5 Fix #377
- Added comments to help explain some of the logic of the Region/CuboidRegion filtering
2020-03-28 20:51:53 -04:00
dordsor21
8ffdd8a9e9 Better reading of schematic biomes.
Use biomes in the P2 schematic handler and save as a .schem not .schematic (when it's enabled again)
2020-03-28 10:44:51 +00:00
MattBDev
9c3fea6567 Remove poorly implemented biomes in MCEdit schematics 2020-03-27 19:09:01 -04:00
MattBDev
7db61be075 Started stripping apart EditSessionBuilder 2020-03-26 22:26:11 -04:00
MattBDev
e648b35b95 Small code quality changes 2020-03-24 12:32:36 -04:00
MattBDev
1577ef61d4 Upstream merge 2020-03-23 20:59:56 -04:00
MattBDev
b2e3d40be2 Rename uploadAnonymous to upload 2020-03-23 20:48:58 -04:00