From aba147f7877552e8a060e3223cb0397a4f3bc68c Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sun, 19 Sep 2021 21:40:15 +0100 Subject: [PATCH] Minor spring clean --- .../core/extent/FaweRegionExtent.java | 1 - .../core/util/EditSessionBuilder.java | 11 +++-------- .../java/com/sk89q/worldedit/EditSessionBuilder.java | 7 ++++++- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/FaweRegionExtent.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/FaweRegionExtent.java index d9e3185b0..6daddccf7 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/FaweRegionExtent.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/FaweRegionExtent.java @@ -54,7 +54,6 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc } @Override - public Extent construct(Extent child) { if (getExtent() != child) { new ExtentTraverser(this).setNext(child); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java index c4347e757..e0e12257f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java @@ -62,7 +62,6 @@ public class EditSessionBuilder { private FaweLimit limit; private AbstractChangeSet changeSet; private Region[] allowedRegions; - private Boolean autoQueue; private Boolean fastmode; private Boolean checkMemory; private Boolean combineStages; @@ -89,7 +88,6 @@ public class EditSessionBuilder { * limit: Block/Entity/Action limit (defaults to unlimited)
* changeSet: Stores changes (defaults to config.yml value)
* allowedRegions: Allowed editable regions (defaults to player's allowed regions, or everywhere)
- * autoQueue: Changes can occur before flushQueue() (defaults true)
* fastmode: bypasses history (defaults to player fastmode or config.yml console history)
* checkMemory: If low memory checks are enabled (defaults to player's fastmode or true)
* combineStages: If history is combined with dispatching @@ -176,9 +174,9 @@ public class EditSessionBuilder { return allowedRegions(new Region[]{RegionWrapper.GLOBAL()}); } + @Deprecated public EditSessionBuilder autoQueue(@Nullable Boolean autoQueue) { - this.autoQueue = autoQueue; - return setDirty(); + return this; } public EditSessionBuilder fastmode(@Nullable Boolean fastmode) { @@ -298,9 +296,6 @@ public class EditSessionBuilder { limit = player.getLimit(); } } - if (autoQueue == null) { - autoQueue = true; - } if (fastmode == null) { if (player == null) { fastmode = !Settings.IMP.HISTORY.ENABLE_FOR_CONSOLE; @@ -343,7 +338,6 @@ public class EditSessionBuilder { wnaMode = true; extent = world; } - Extent root = extent; if (combineStages == null) { combineStages = // If it's enabled in the settings @@ -423,6 +417,7 @@ public class EditSessionBuilder { extent.addProcessor(new RelightProcessor(relighter)); } extent.addProcessor(new HeightmapProcessor(world.getMinY(), world.getMaxY())); + } else { relighter = NullRelighter.INSTANCE; } if (limit != null && !limit.isUnlimited() && regionExtent != null) { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionBuilder.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionBuilder.java index 219cb1a0a..4e618d672 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionBuilder.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionBuilder.java @@ -350,7 +350,7 @@ public final class EditSessionBuilder { */ @Deprecated(forRemoval = true) public EditSessionBuilder autoQueue(@Nullable Boolean autoQueue) { - return setDirty(); + return this; } /** @@ -473,6 +473,8 @@ public final class EditSessionBuilder { } else { changeSet = new DiskStorageHistory(world, uuid); } +// } else if (combineStages && Settings.IMP.HISTORY.COMPRESSION_LEVEL == 0) { +// changeSet = new CPUOptimizedChangeSet(world); } else { if (combineStages && Settings.IMP.HISTORY.COMPRESSION_LEVEL == 0) { //TODO add CPUOptimizedChangeSet @@ -496,6 +498,9 @@ public final class EditSessionBuilder { this.extent = extent.enableHistory(changeSet); } else { this.extent = new HistoryExtent(extent, changeSet); +// if (this.blockBag != null) { +// this.extent = new BlockBagExtent(this.extent, blockBag, limit.INVENTORY_MODE == 1); +// } } } }