Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-07 00:22:51 +02:00
Don't set extent to self when cancelling in AbstractDelegateExtent
#749
Dieser Commit ist enthalten in:
Ursprung
93dff36ee2
Commit
f8aaf0cae3
@ -222,6 +222,16 @@ public class NullExtent extends FaweRegionExtent implements IBatchProcessor {
|
||||
throw reason;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Extent addProcessor(final IBatchProcessor processor) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Extent addPostProcessor(final IBatchProcessor processor) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockArrayClipboard lazyCopy(Region region) {
|
||||
throw reason;
|
||||
|
@ -19,8 +19,10 @@
|
||||
|
||||
package com.sk89q.worldedit.extent;
|
||||
|
||||
import com.fastasyncworldedit.core.FaweCache;
|
||||
import com.fastasyncworldedit.core.configuration.Settings;
|
||||
import com.fastasyncworldedit.core.extent.HistoryExtent;
|
||||
import com.fastasyncworldedit.core.extent.NullExtent;
|
||||
import com.fastasyncworldedit.core.history.changeset.AbstractChangeSet;
|
||||
import com.fastasyncworldedit.core.internal.exception.FaweException;
|
||||
import com.fastasyncworldedit.core.queue.IBatchProcessor;
|
||||
@ -41,7 +43,6 @@ import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.jetbrains.annotations.Range;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
@ -160,6 +161,26 @@ public class AbstractDelegateExtent implements Extent {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cancel() {
|
||||
ExtentTraverser<Extent> traverser = new ExtentTraverser<>(this);
|
||||
|
||||
NullExtent nullExtent = new NullExtent(getExtent(), FaweCache.MANUAL);
|
||||
|
||||
ExtentTraverser<Extent> next = traverser.next();
|
||||
if (next != null) {
|
||||
Extent child = next.get();
|
||||
if (child instanceof NullExtent) {
|
||||
return true;
|
||||
}
|
||||
traverser.setNext(nullExtent);
|
||||
child.cancel();
|
||||
}
|
||||
addProcessor(nullExtent);
|
||||
addPostProcessor(nullExtent);
|
||||
return true;
|
||||
}
|
||||
|
||||
//FAWE start
|
||||
@Override
|
||||
public void removeEntity(int x, int y, int z, UUID uuid) {
|
||||
|
@ -646,6 +646,7 @@ public interface Extent extends InputExtent, OutputExtent {
|
||||
child.cancel();
|
||||
}
|
||||
addProcessor(nullExtent);
|
||||
addPostProcessor(nullExtent);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren