Skip to content

Commit

Permalink
chore: remove bad range annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
dordsor21 committed Nov 26, 2023
1 parent 53ec728 commit d1798b7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.fastasyncworldedit.core.extent.filter.block.FilterBlock;
import com.sk89q.worldedit.regions.Region;
import org.jetbrains.annotations.Range;

import javax.annotation.Nullable;

Expand All @@ -18,8 +17,8 @@ public interface Filter {
* @param chunkZ the z coordinate in the chunk
*/
default boolean appliesChunk(
@Range(from = 0, to = 15) int chunkX,
@Range(from = 0, to = 15) int chunkZ
int chunkX,
int chunkZ
) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.fastasyncworldedit.core.extent.filter.block.ChunkFilterBlock;
import com.sk89q.worldedit.regions.Region;
import org.jetbrains.annotations.Range;

import javax.annotation.Nullable;

Expand All @@ -25,15 +24,13 @@ default <V extends IChunk> void init(IQueueExtent<V> extent, int x, int z) {
*
* @return the x coordinate of the chunk
*/
@Range(from = 0, to = 15)
int getX();

/**
* Get chunkZ
*
* @return the z coordinate of the chunk
*/
@Range(from = 0, to = 15)
int getZ();

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.fastasyncworldedit.core.queue;

import org.jetbrains.annotations.Range;

/**
* IGetBlocks may be cached by the WorldChunkCache so that it can be used between multiple
* IQueueExtents - avoids conversion between a palette and raw data on every block get
*/
public interface IChunkCache<T> extends Trimable {

T get(@Range(from = 0, to = 15) int chunkX, @Range(from = 0, to = 15) int chunkZ);
T get(int chunkX, int chunkZ);

@Override
default boolean trim(boolean aggressive) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.Region;
import org.jetbrains.annotations.Range;

import javax.annotation.Nullable;
import java.io.Flushable;
Expand Down Expand Up @@ -51,12 +50,12 @@ default boolean isQueueEnabled() {
* Get the cached get object. This is faster than getting the object using NMS and allows for
* wrapping.
*/
IChunkGet getCachedGet(@Range(from = 0, to = 15) int chunkX, @Range(from = 0, to = 15) int chunkZ);
IChunkGet getCachedGet(int chunkX, int chunkZ);

/**
* Get the cached chunk set object.
*/
IChunkSet getCachedSet(@Range(from = 0, to = 15) int chunkX, @Range(from = 0, to = 15) int chunkZ);
IChunkSet getCachedSet(int chunkX, int chunkZ);

/**
* Submit the chunk so that it's changes are applied to the world
Expand Down

0 comments on commit d1798b7

Please sign in to comment.