mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Simplify commit-required detection
This commit is contained in:
parent
351a8bbc6c
commit
e202348dac
@ -104,7 +104,6 @@ import com.sk89q.worldedit.util.eventbus.EventBus;
|
|||||||
import com.sk89q.worldedit.world.NullWorld;
|
import com.sk89q.worldedit.world.NullWorld;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
import com.sk89q.worldedit.world.biome.BaseBiome;
|
import com.sk89q.worldedit.world.biome.BaseBiome;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
|
||||||
import com.sk89q.worldedit.world.block.BlockCategories;
|
import com.sk89q.worldedit.world.block.BlockCategories;
|
||||||
import com.sk89q.worldedit.world.block.BlockState;
|
import com.sk89q.worldedit.world.block.BlockState;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
@ -113,8 +112,6 @@ import com.sk89q.worldedit.world.block.BlockTypes;
|
|||||||
import com.sk89q.worldedit.world.registry.LegacyMapper;
|
import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -234,14 +231,15 @@ public class EditSession implements Extent, AutoCloseable {
|
|||||||
return event.getExtent();
|
return event.getExtent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// pkg private for TracedEditSession only
|
// pkg private for TracedEditSession only, may later become public API
|
||||||
|
boolean commitRequired() {
|
||||||
ChunkBatchingExtent getChunkBatchingExtent() {
|
if (isQueueEnabled() && reorderExtent.commitRequired()) {
|
||||||
return chunkBatchingExtent;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (isBatchingChunks() && chunkBatchingExtent.commitRequired()) {
|
||||||
MultiStageReorder getReorderExtent() {
|
return true;
|
||||||
return reorderExtent;
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,11 +37,8 @@ public class TracedEditSession extends EditSession {
|
|||||||
@Override
|
@Override
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
super.finalize();
|
super.finalize();
|
||||||
if (!isQueueEnabled() && !isBatchingChunks()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getChunkBatchingExtent().commitRequired() || getReorderExtent().commitRequired()) {
|
if (commitRequired()) {
|
||||||
WorldEdit.logger.warning("####### LEFTOVER BUFFER BLOCKS DETECTED #######");
|
WorldEdit.logger.warning("####### LEFTOVER BUFFER BLOCKS DETECTED #######");
|
||||||
WorldEdit.logger.warning("This means that some code did not flush their EditSession.");
|
WorldEdit.logger.warning("This means that some code did not flush their EditSession.");
|
||||||
WorldEdit.logger.log(Level.WARNING, "Here is a stacktrace from the creation of this EditSession:", stacktrace);
|
WorldEdit.logger.log(Level.WARNING, "Here is a stacktrace from the creation of this EditSession:", stacktrace);
|
||||||
|
Loading…
Reference in New Issue
Block a user