From 4d8cf04be12bd727ed2d3d397a66c07c0f446d6b Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 22 Jul 2019 19:05:14 +1000 Subject: [PATCH] fix some more compilation issues --- .../com/boydti/fawe/beta/IDelegateChunk.java | 17 ++ .../com/boydti/fawe/beta/IQueueExtent.java | 6 + .../beta/implementation/QueueHandler.java | 4 +- .../SingleThreadQueueExtent.java | 10 + .../beta/implementation/holder/WeakChunk.java | 1 + .../com/boydti/fawe/command/Rollback.java | 27 ++- .../java/com/boydti/fawe/config/Commands.java | 53 ++---- .../com/boydti/fawe/object/FawePlayer.java | 2 +- .../fawe/object/brush/CommandBrush.java | 2 +- .../fawe/object/brush/CopyPastaBrush.java | 2 +- .../boydti/fawe/object/brush/ImageBrush.java | 2 +- .../boydti/fawe/object/brush/LayerBrush.java | 13 +- .../fawe/object/brush/RecurseBrush.java | 2 +- .../fawe/object/brush/SplatterBrush.java | 2 +- .../fawe/object/brush/StencilBrush.java | 2 +- .../object/brush/scroll/ScrollAction.java | 1 - .../cfi/HeightMapMCAGenerator.java | 28 +-- .../object/change/MutableBlockChange.java | 23 +-- .../object/clipboard/WorldCopyClipboard.java | 4 +- .../general/plot/FaweLocalBlockQueue.java | 40 ++-- .../general/plot/FaweSchematicHandler.java | 6 - .../java/com/sk89q/jnbt/NBTOutputStream.java | 6 +- .../command/BrushOptionsCommands.java | 109 +++++------ .../worldedit/command/GeneralCommands.java | 26 +-- .../worldedit/command/RegionCommands.java | 75 ++------ .../command/composition/ApplyCommand.java | 68 ------- .../command/composition/DeformCommand.java | 84 --------- .../command/composition/PaintCommand.java | 64 ------- .../composition/ShapedBrushCommand.java | 102 ---------- .../worldedit/command/tool/FloodFillTool.java | 2 +- .../command/tool/RecursivePickaxe.java | 2 +- .../extent/AbstractDelegateExtent.java | 10 +- .../com/sk89q/worldedit/extent/Extent.java | 49 ++--- .../worldedit/extent/PassthroughExtent.java | 177 ------------------ .../extent/clipboard/BlockArrayClipboard.java | 27 +-- .../function/operation/ForwardExtentCopy.java | 11 +- .../function/visitor/FlatRegionVisitor.java | 33 +--- .../java/com/sk89q/worldedit/world/World.java | 4 + 38 files changed, 241 insertions(+), 855 deletions(-) delete mode 100644 worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ApplyCommand.java delete mode 100644 worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/DeformCommand.java delete mode 100644 worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/PaintCommand.java delete mode 100644 worldedit-core/src/main/java/com/sk89q/worldedit/command/composition/ShapedBrushCommand.java delete mode 100644 worldedit-core/src/main/java/com/sk89q/worldedit/extent/PassthroughExtent.java diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/IDelegateChunk.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/IDelegateChunk.java index 36bcb1302..7c8086ae0 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/IDelegateChunk.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/IDelegateChunk.java @@ -1,5 +1,6 @@ package com.boydti.fawe.beta; +import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; @@ -25,6 +26,22 @@ public interface IDelegateChunk extends IChunk { return root; } + + @Override + default IQueueExtent getQueue() { + return getParent().getQueue(); + } + + @Override + default CompoundTag getTag(int x, int y, int z) { + return getParent().getTag(x, y, z); + } + + @Override + default boolean hasSection(int layer) { + return getParent().hasSection(layer); + } + @Override default void flood(Flood flood, FilterBlockMask mask, ChunkFilterBlock block) { getParent().flood(flood, mask, block); diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/IQueueExtent.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/IQueueExtent.java index 61e642a6a..dcd7eb729 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/IQueueExtent.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/IQueueExtent.java @@ -121,4 +121,10 @@ public interface IQueueExtent extends Flushable, Trimable, Extent { void flush(); ChunkFilterBlock initFilterBlock(); + + int size(); + + boolean isEmpty(); + + void sendChunk(int chunkX, int chunkZ); } \ No newline at end of file diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/QueueHandler.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/QueueHandler.java index ee7bc6cca..4e73468b9 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/QueueHandler.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/QueueHandler.java @@ -216,9 +216,9 @@ public abstract class QueueHandler implements Trimable, Runnable { public abstract IQueueExtent create(); - public abstract void startSet(boolean value); + public abstract void startSet(boolean parallel); - public abstract void endSet(boolean value); + public abstract void endSet(boolean parallel); public IQueueExtent getQueue(final World world) { final IQueueExtent queue = queuePool.get(); diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/SingleThreadQueueExtent.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/SingleThreadQueueExtent.java index 522987383..96cfaa980 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/SingleThreadQueueExtent.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/SingleThreadQueueExtent.java @@ -85,6 +85,16 @@ public abstract class SingleThreadQueueExtent implements IQueueExtent { CHUNK_POOL.add(chunk); } + @Override + public int size() { + return chunks.size() + submissions.size(); + } + + @Override + public boolean isEmpty() { + return chunks.isEmpty() && submissions.isEmpty(); + } + @Override public > T submit(final IChunk chunk) { if (lastChunk == chunk) { diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/holder/WeakChunk.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/holder/WeakChunk.java index a97c915d5..46b5fa8f6 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/holder/WeakChunk.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/holder/WeakChunk.java @@ -2,6 +2,7 @@ package com.boydti.fawe.beta.implementation.holder; import com.boydti.fawe.beta.IChunk; import com.boydti.fawe.beta.IQueueExtent; +import com.sk89q.jnbt.CompoundTag; import java.lang.ref.Reference; import java.lang.ref.WeakReference; diff --git a/worldedit-core/src/main/java/com/boydti/fawe/command/Rollback.java b/worldedit-core/src/main/java/com/boydti/fawe/command/Rollback.java index 2d5dd1892..0645a9dba 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/command/Rollback.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/command/Rollback.java @@ -8,6 +8,7 @@ import com.boydti.fawe.object.*; import com.boydti.fawe.object.changeset.DiskStorageHistory; import com.boydti.fawe.util.MainUtil; import com.boydti.fawe.util.MathMan; +import com.boydti.fawe.util.TaskManager; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.World; @@ -17,6 +18,8 @@ import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.UUID; +import java.util.concurrent.Callable; +import java.util.concurrent.Future; public class Rollback extends FaweCommand { @@ -106,22 +109,14 @@ public class Rollback extends FaweCommand { BBC.COMMAND_SYNTAX.send(player, "/frb info u: r: t: