Address comments

This commit is contained in:
dordsor21 2022-06-09 13:43:00 +01:00
parent 43150abb86
commit dd996ae44f
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
3 changed files with 11 additions and 17 deletions

View File

@ -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;

View File

@ -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);

View File

@ -79,6 +79,9 @@ public abstract class ChunkManager {
}
}
/**
* @since TODO
*/
public static boolean preProcessChunk(BlockVector2 loc, ZeroedDelegateScopedQueueCoordinator queue) {
final RunnableVal<ZeroedDelegateScopedQueueCoordinator> 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<ZeroedDelegateScopedQueueCoordinator> addChunk = forceChunks.get(loc);
if (addChunk != null) {