From 6187569086419359494909e22c03d1c1c83167c3 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Thu, 16 Jun 2022 15:53:14 +0100 Subject: [PATCH] Re-add wrongly removed method --- .../plotsquared/core/queue/QueueCoordinator.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 f3b6df823..e68dd2108 100644 --- a/Core/src/main/java/com/plotsquared/core/queue/QueueCoordinator.java +++ b/Core/src/main/java/com/plotsquared/core/queue/QueueCoordinator.java @@ -61,6 +61,22 @@ public abstract class QueueCoordinator { PlotSquared.platform().injector().injectMembers(this); } + /** + * 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 TODO + */ + public ZeroedDelegateScopedQueueCoordinator getForChunk(int x, int z, int minY, int maxY) { + int bx = x << 4; + int bz = z << 4; + return new ZeroedDelegateScopedQueueCoordinator(this, Location.at(getWorld().getName(), bx, minY, bz), + Location.at(getWorld().getName(), bx + 15, maxY, bz + 15) + ); + } + /** * Get the size of the queue in chunks *