From dd996ae44f55224cd370572e9fccf61246ec562d Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Thu, 9 Jun 2022 13:43:00 +0100 Subject: [PATCH] Address comments --- .../core/queue/QueueCoordinator.java | 18 +----------------- .../ZeroedDelegateScopedQueueCoordinator.java | 4 ++++ .../plotsquared/core/util/ChunkManager.java | 6 ++++++ 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/queue/QueueCoordinator.java b/Core/src/main/java/com/plotsquared/core/queue/QueueCoordinator.java index 8cd0659a3..394c97d90 100644 --- a/Core/src/main/java/com/plotsquared/core/queue/QueueCoordinator.java +++ b/Core/src/main/java/com/plotsquared/core/queue/QueueCoordinator.java @@ -76,23 +76,7 @@ public abstract class QueueCoordinator { * @param x chunk x coordinate * @param z chunk z coordinate * @return a new {@link ZeroedDelegateScopedQueueCoordinator} - * @deprecated Use {@link ZeroedDelegateScopedQueueCoordinator#getForChunk(int, int, int, int)} - */ - @Deprecated(forRemoval = true, since = "6.6.0") - public ZeroedDelegateScopedQueueCoordinator getForChunk(int x, int z) { - if (getWorld() == null) { - return getForChunk(x, z, PlotSquared.platform().versionMinHeight(), PlotSquared.platform().versionMaxHeight()); - } - return getForChunk(x, z, getWorld().getMinY(), getWorld().getMaxY()); - } - - /** - * Get a {@link ZeroedDelegateScopedQueueCoordinator} limited to the chunk at the specific chunk Coordinates - * - * @param x chunk x coordinate - * @param z chunk z coordinate - * @return a new {@link ZeroedDelegateScopedQueueCoordinator} - * @since 6.6.0 + * @since TODO */ public ZeroedDelegateScopedQueueCoordinator getForChunk(int x, int z, int minY, int maxY) { int bx = x << 4; diff --git a/Core/src/main/java/com/plotsquared/core/queue/ZeroedDelegateScopedQueueCoordinator.java b/Core/src/main/java/com/plotsquared/core/queue/ZeroedDelegateScopedQueueCoordinator.java index ba6292c40..9f5abe5e3 100644 --- a/Core/src/main/java/com/plotsquared/core/queue/ZeroedDelegateScopedQueueCoordinator.java +++ b/Core/src/main/java/com/plotsquared/core/queue/ZeroedDelegateScopedQueueCoordinator.java @@ -38,6 +38,8 @@ import org.checkerframework.checker.nullness.qual.Nullable; * Queue that only sets blocks with a designated X-Z area, will accept any Y values. Requires all blocks be set normalized to * zero in the x and z directions, i.e. starting from 0,0. An offset of the minimum point of the region will then be applied to * x and z. + * + * @since TODO */ public class ZeroedDelegateScopedQueueCoordinator extends DelegateQueueCoordinator { @@ -54,6 +56,8 @@ public class ZeroedDelegateScopedQueueCoordinator extends DelegateQueueCoordinat /** * Create a new ScopedQueueCoordinator instance that delegates to a given QueueCoordinator. Locations are inclusive. + * + * @since TODO */ public ZeroedDelegateScopedQueueCoordinator(@Nullable QueueCoordinator parent, @NonNull Location min, @NonNull Location max) { super(parent); diff --git a/Core/src/main/java/com/plotsquared/core/util/ChunkManager.java b/Core/src/main/java/com/plotsquared/core/util/ChunkManager.java index d542bd566..a02a773ea 100644 --- a/Core/src/main/java/com/plotsquared/core/util/ChunkManager.java +++ b/Core/src/main/java/com/plotsquared/core/util/ChunkManager.java @@ -79,6 +79,9 @@ public abstract class ChunkManager { } } + /** + * @since TODO + */ public static boolean preProcessChunk(BlockVector2 loc, ZeroedDelegateScopedQueueCoordinator queue) { final RunnableVal forceChunk = forceChunks.get(loc); if (forceChunk != null) { @@ -89,6 +92,9 @@ public abstract class ChunkManager { return false; } + /** + * @since TODO + */ public static boolean postProcessChunk(BlockVector2 loc, ZeroedDelegateScopedQueueCoordinator queue) { final RunnableVal addChunk = forceChunks.get(loc); if (addChunk != null) {