Minor spring clean

This commit is contained in:
dordsor21 2021-09-19 21:40:15 +01:00
parent 8a4f28a7cc
commit aba147f787
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
3 changed files with 9 additions and 10 deletions

View File

@ -54,7 +54,6 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
} }
@Override @Override
public Extent construct(Extent child) { public Extent construct(Extent child) {
if (getExtent() != child) { if (getExtent() != child) {
new ExtentTraverser<Extent>(this).setNext(child); new ExtentTraverser<Extent>(this).setNext(child);

View File

@ -62,7 +62,6 @@ public class EditSessionBuilder {
private FaweLimit limit; private FaweLimit limit;
private AbstractChangeSet changeSet; private AbstractChangeSet changeSet;
private Region[] allowedRegions; private Region[] allowedRegions;
private Boolean autoQueue;
private Boolean fastmode; private Boolean fastmode;
private Boolean checkMemory; private Boolean checkMemory;
private Boolean combineStages; private Boolean combineStages;
@ -89,7 +88,6 @@ public class EditSessionBuilder {
* limit: Block/Entity/Action limit (defaults to unlimited)<br> * limit: Block/Entity/Action limit (defaults to unlimited)<br>
* changeSet: Stores changes (defaults to config.yml value)<br> * changeSet: Stores changes (defaults to config.yml value)<br>
* allowedRegions: Allowed editable regions (defaults to player's allowed regions, or everywhere)<br> * allowedRegions: Allowed editable regions (defaults to player's allowed regions, or everywhere)<br>
* autoQueue: Changes can occur before flushQueue() (defaults true)<br>
* fastmode: bypasses history (defaults to player fastmode or config.yml console history)<br> * fastmode: bypasses history (defaults to player fastmode or config.yml console history)<br>
* checkMemory: If low memory checks are enabled (defaults to player's fastmode or true)<br> * checkMemory: If low memory checks are enabled (defaults to player's fastmode or true)<br>
* combineStages: If history is combined with dispatching * combineStages: If history is combined with dispatching
@ -176,9 +174,9 @@ public class EditSessionBuilder {
return allowedRegions(new Region[]{RegionWrapper.GLOBAL()}); return allowedRegions(new Region[]{RegionWrapper.GLOBAL()});
} }
@Deprecated
public EditSessionBuilder autoQueue(@Nullable Boolean autoQueue) { public EditSessionBuilder autoQueue(@Nullable Boolean autoQueue) {
this.autoQueue = autoQueue; return this;
return setDirty();
} }
public EditSessionBuilder fastmode(@Nullable Boolean fastmode) { public EditSessionBuilder fastmode(@Nullable Boolean fastmode) {
@ -298,9 +296,6 @@ public class EditSessionBuilder {
limit = player.getLimit(); limit = player.getLimit();
} }
} }
if (autoQueue == null) {
autoQueue = true;
}
if (fastmode == null) { if (fastmode == null) {
if (player == null) { if (player == null) {
fastmode = !Settings.IMP.HISTORY.ENABLE_FOR_CONSOLE; fastmode = !Settings.IMP.HISTORY.ENABLE_FOR_CONSOLE;
@ -343,7 +338,6 @@ public class EditSessionBuilder {
wnaMode = true; wnaMode = true;
extent = world; extent = world;
} }
Extent root = extent;
if (combineStages == null) { if (combineStages == null) {
combineStages = combineStages =
// If it's enabled in the settings // If it's enabled in the settings
@ -423,6 +417,7 @@ public class EditSessionBuilder {
extent.addProcessor(new RelightProcessor(relighter)); extent.addProcessor(new RelightProcessor(relighter));
} }
extent.addProcessor(new HeightmapProcessor(world.getMinY(), world.getMaxY())); extent.addProcessor(new HeightmapProcessor(world.getMinY(), world.getMaxY()));
} else {
relighter = NullRelighter.INSTANCE; relighter = NullRelighter.INSTANCE;
} }
if (limit != null && !limit.isUnlimited() && regionExtent != null) { if (limit != null && !limit.isUnlimited() && regionExtent != null) {

View File

@ -350,7 +350,7 @@ public final class EditSessionBuilder {
*/ */
@Deprecated(forRemoval = true) @Deprecated(forRemoval = true)
public EditSessionBuilder autoQueue(@Nullable Boolean autoQueue) { public EditSessionBuilder autoQueue(@Nullable Boolean autoQueue) {
return setDirty(); return this;
} }
/** /**
@ -473,6 +473,8 @@ public final class EditSessionBuilder {
} else { } else {
changeSet = new DiskStorageHistory(world, uuid); changeSet = new DiskStorageHistory(world, uuid);
} }
// } else if (combineStages && Settings.IMP.HISTORY.COMPRESSION_LEVEL == 0) {
// changeSet = new CPUOptimizedChangeSet(world);
} else { } else {
if (combineStages && Settings.IMP.HISTORY.COMPRESSION_LEVEL == 0) { if (combineStages && Settings.IMP.HISTORY.COMPRESSION_LEVEL == 0) {
//TODO add CPUOptimizedChangeSet //TODO add CPUOptimizedChangeSet
@ -496,6 +498,9 @@ public final class EditSessionBuilder {
this.extent = extent.enableHistory(changeSet); this.extent = extent.enableHistory(changeSet);
} else { } else {
this.extent = new HistoryExtent(extent, changeSet); this.extent = new HistoryExtent(extent, changeSet);
// if (this.blockBag != null) {
// this.extent = new BlockBagExtent(this.extent, blockBag, limit.INVENTORY_MODE == 1);
// }
} }
} }
} }