From 630245bb9f9bf77f8c3a00a9f16206874fd61486 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Mon, 11 Nov 2019 16:22:03 -0500 Subject: [PATCH] Attempt to fix compile and other small changes --- .../fawe/bukkit/wrapper/AsyncWorld.java | 2 +- .../beta/implementation/cache/ChunkCache.java | 2 -- .../queue/SingleThreadQueueExtent.java | 4 +--- .../com/boydti/fawe/command/CFICommands.java | 5 ++--- .../object/collection/DifferentialArray.java | 9 ++++----- .../collection/DifferentialBlockBuffer.java | 2 +- .../worldedit/command/BrushCommands.java | 19 +++++++++++++------ .../java/com/sk89q/worldedit/world/World.java | 5 ++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java index 7313eed5e..5cea8e76d 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java @@ -103,7 +103,7 @@ public class AsyncWorld extends PassthroughExtent implements World { /** * @deprecated use {@link #wrap(World)} instead * @param parent - * @param queue + * @param extent */ @Deprecated public AsyncWorld(World parent, Extent extent) { diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/cache/ChunkCache.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/cache/ChunkCache.java index 36c0fbd2b..8c8dc463a 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/cache/ChunkCache.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/cache/ChunkCache.java @@ -22,8 +22,6 @@ public class ChunkCache implements IChunkCache { /** * Get or create the IGetBlocks * - * @param index chunk index {@link com.boydti.fawe.util.MathMan#pairInt(int, int)} - * @param provider used to create if it isn't already cached * @return cached IGetBlocks */ @Override diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/queue/SingleThreadQueueExtent.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/queue/SingleThreadQueueExtent.java index d9a4d5a23..57bc557ea 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/queue/SingleThreadQueueExtent.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/queue/SingleThreadQueueExtent.java @@ -29,7 +29,7 @@ import java.util.concurrent.Future; * Single threaded implementation for IQueueExtent (still abstract) - Does not implement creation of * chunks (that has to implemented by the platform e.g., Bukkit) *

- * This queue is reusable {@link #init(IChunkCache)} + * This queue is reusable {@link #init(Extent, IChunkCache, IChunkCache)} } */ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implements IQueueExtent { @@ -103,7 +103,6 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen /** * Initialize the queue * - * @param cache */ @Override public synchronized void init(Extent extent, IChunkCache get, IChunkCache set) { @@ -146,7 +145,6 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen * Submit without first checking that it has been removed from the chunk map * * @param chunk - * @param * @return */ private > V submitUnchecked(IQueueChunk chunk) { diff --git a/worldedit-core/src/main/java/com/boydti/fawe/command/CFICommands.java b/worldedit-core/src/main/java/com/boydti/fawe/command/CFICommands.java index 8da394401..6ec3e86e2 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/command/CFICommands.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/command/CFICommands.java @@ -75,7 +75,6 @@ import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.IntStream; import javax.imageio.ImageIO; -import org.checkerframework.checker.nullness.qual.NonNull; import org.enginehub.piston.annotation.Command; import org.enginehub.piston.annotation.CommandContainer; import org.enginehub.piston.annotation.param.Arg; @@ -88,7 +87,7 @@ import org.jetbrains.annotations.NotNull; public class CFICommands { private final WorldEdit worldEdit; - private final @NonNull TextComponent doubleNewLine = TextComponent.of("\n\n"); + private final TextComponent doubleNewLine = TextComponent.of("\n\n"); /** * Create a new instance. @@ -111,7 +110,7 @@ public class CFICommands { desc = "Start CFI with a height map as a base" ) @CommandPermissions("worldedit.anvil.cfi") - public void heightmap(Player player, @Arg(def = "", desc = "image url or filename") ProvideBindings.ImageUri image, @Arg(name = "yscale", desc = "double", def = "1") double yscale) { + public void heightmap(Player player, @Arg(def = "", desc = "image url or filename") ProvideBindings.ImageUri image, @Arg(desc = "double", def = "1") double yscale) { if (yscale != 0) { int[] raw = ((DataBufferInt) image.load().getRaster().getDataBuffer()).getData(); int[] table = IntStream.range(0, 256).map(i -> Math.min(255, (int) (i * yscale))) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/collection/DifferentialArray.java b/worldedit-core/src/main/java/com/boydti/fawe/object/collection/DifferentialArray.java index ac1ccfae0..57482af1c 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/collection/DifferentialArray.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/collection/DifferentialArray.java @@ -1,5 +1,8 @@ package com.boydti.fawe.object.collection; +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + import com.boydti.fawe.object.FaweInputStream; import com.boydti.fawe.object.FaweOutputStream; import com.boydti.fawe.object.io.serialize.Serialize; @@ -8,12 +11,8 @@ import java.io.IOException; import java.lang.reflect.Array; import java.util.Arrays; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - /** - * Records changes made through the {@link #setByte(int, byte)} or {@link #setChar(int, char)} method
+ * Records changes made through the {@link #setByte(int, byte)} or {@link #setInt(int, int)} method
* If you are editing the raw data, use {@link #record(Runnable)} * @param */ diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/collection/DifferentialBlockBuffer.java b/worldedit-core/src/main/java/com/boydti/fawe/object/collection/DifferentialBlockBuffer.java index a7bf2eed4..ce6efa400 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/collection/DifferentialBlockBuffer.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/collection/DifferentialBlockBuffer.java @@ -6,7 +6,7 @@ import java.io.IOException; import java.lang.reflect.Array; /** - * Records changes made through the {@link #set(int, int, int, int)} method
+ * Records changes made through the {@link #set(int, int, int, char)} method
* Changes are not recorded if you edit the raw data */ public final class DifferentialBlockBuffer implements DifferentialCollection { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java index c7c5c14ef..0d163d808 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java @@ -502,9 +502,12 @@ public class BrushCommands { ) @CommandPermissions("worldedit.brush.scatter") public void scatterBrush(InjectedValueAccess context, Pattern fill, - @Arg(desc = "Expression", def = "5") Expression radius, - @Arg(desc = "double", def = "5") double points, - @Arg(desc = "double", def = "1") double distance, + @Arg(desc = "Expression", def = "5") + Expression radius, + @Arg(desc = "double", def = "5") + double points, + @Arg(desc = "double", def = "1") + double distance, @Switch(name = 'o', desc = "Overlay the block") boolean overlay) throws WorldEditException { worldEdit.checkMaxBrushRadius(radius); Brush brush; @@ -585,14 +588,18 @@ public class BrushCommands { desc = "Run commands at random points on a surface", descFooter = "Run commands at random points on a surface\n" + - " - The scatter radius is the min distance between each point\n" + " - Your selection will be expanded to the specified size around each point\n" + " - Placeholders: {x}, {y}, {z}, {world}, {size}" ) @CommandPermissions("worldedit.brush.scattercommand") public void scatterCommandBrush(Player player, InjectedValueAccess context, - @Arg(desc = "Expression") Expression radius, double points, - double distance, List commandStr) throws WorldEditException { + @Arg(desc = "The minimum distance between each point") + Expression radius, + @Arg(desc = "double", def = "1") + double points, + @Arg(desc = "double", def = "1") + double distance, + List commandStr) throws WorldEditException { worldEdit.checkMaxBrushRadius(radius); set(context, new ScatterCommand((int) points, (int) distance, StringMan.join(commandStr, " "))) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java index 95eb601ac..30f489589 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java @@ -295,14 +295,13 @@ public interface World extends Extent, Keyed, IChunkCache { } /** - * Refresh a specific chunk with a bitMask (0 = default, 65535 = all block sections) + * Refresh a specific chunk * Note: only 0 is guaranteed to send all tiles / entities * Note: Only 65535 is guaranteed to send all blocks * @param chunkX * @param chunkZ - * @param bitMask */ - void refreshChunk(final int X, final int Z); + void refreshChunk(final int chunkX, final int chunkZ); @Override IChunkGet get(int x, int z);