Class ChunkRange
java.lang.Object
net.minestom.server.coordinate.ChunkRange
Helper class to iterate over chunks within a range.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intchunksCount(int range) Get the amount of chunks in a square range.static voidchunksInRange(int chunkX, int chunkZ, int range, ChunkRange.ChunkConsumer consumer) New implementation comes from Krypton which comes from kotlin port by Esophose, which comes from a stackoverflow answer.static voidchunksInRange(Point point, int range, ChunkRange.ChunkConsumer consumer) static voidchunksInRangeDiffering(int newChunkX, int newChunkZ, int oldChunkX, int oldChunkZ, int range, ChunkRange.ChunkConsumer callback) static voidchunksInRangeDiffering(int newChunkX, int newChunkZ, int oldChunkX, int oldChunkZ, int range, ChunkRange.ChunkConsumer newCallback, ChunkRange.ChunkConsumer oldCallback)
-
Constructor Details
-
ChunkRange
public ChunkRange()
-
-
Method Details
-
chunksCount
public static int chunksCount(int range) Get the amount of chunks in a square range.- Parameters:
range- the range- Returns:
- the amount of chunks in the square range
-
chunksInRangeDiffering
public static void chunksInRangeDiffering(int newChunkX, int newChunkZ, int oldChunkX, int oldChunkZ, int range, ChunkRange.ChunkConsumer callback) -
chunksInRangeDiffering
public static void chunksInRangeDiffering(int newChunkX, int newChunkZ, int oldChunkX, int oldChunkZ, int range, ChunkRange.ChunkConsumer newCallback, ChunkRange.ChunkConsumer oldCallback) -
chunksInRange
public static void chunksInRange(int chunkX, int chunkZ, int range, ChunkRange.ChunkConsumer consumer) New implementation comes from Krypton which comes from kotlin port by Esophose, which comes from a stackoverflow answer. -
chunksInRange
-