geforkt von Mirrors/FastAsyncWorldEdit
Fixed up the commitRequired checks.
Dieser Commit ist enthalten in:
Ursprung
5f2c77b719
Commit
6f3016c7f0
@ -386,7 +386,9 @@ public class EditSession implements Extent, AutoCloseable {
|
|||||||
* Returns queue status.
|
* Returns queue status.
|
||||||
*
|
*
|
||||||
* @return whether the queue is enabled
|
* @return whether the queue is enabled
|
||||||
|
* @deprecated Use {@link EditSession#getReorderMode()} with MULTI_STAGE instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public boolean isQueueEnabled() {
|
public boolean isQueueEnabled() {
|
||||||
return reorderMode == ReorderMode.MULTI_STAGE && reorderExtent.isEnabled();
|
return reorderMode == ReorderMode.MULTI_STAGE && reorderExtent.isEnabled();
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ public class ChunkBatchingExtent extends AbstractDelegateExtent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean commitRequired() {
|
public boolean commitRequired() {
|
||||||
return enabled && batches.size() > 0;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -88,7 +88,7 @@ public class ChunkBatchingExtent extends AbstractDelegateExtent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Operation commitBefore() {
|
protected Operation commitBefore() {
|
||||||
if (!enabled) {
|
if (!commitRequired()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new Operation() {
|
return new Operation() {
|
||||||
|
@ -199,7 +199,7 @@ public class MultiStageReorder extends AbstractDelegateExtent implements Reorder
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean commitRequired() {
|
public boolean commitRequired() {
|
||||||
return enabled && stages.values().stream().anyMatch(stage -> stage.size() > 0);
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -248,7 +248,7 @@ public class MultiStageReorder extends AbstractDelegateExtent implements Reorder
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Operation commitBefore() {
|
public Operation commitBefore() {
|
||||||
if (!enabled) {
|
if (!commitRequired()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<Operation> operations = new ArrayList<>();
|
List<Operation> operations = new ArrayList<>();
|
||||||
|
@ -114,12 +114,12 @@ public class FastModeExtent extends AbstractDelegateExtent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean commitRequired() {
|
public boolean commitRequired() {
|
||||||
return (enabled && !dirtyChunks.isEmpty()) || (postEditSimulation && !positions.isEmpty());
|
return enabled || postEditSimulation;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Operation commitBefore() {
|
protected Operation commitBefore() {
|
||||||
if (!enabled && !postEditSimulation) {
|
if (!commitRequired()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new Operation() {
|
return new Operation() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren