Class ChunkRange

java.lang.Object
net.minestom.server.coordinate.ChunkRange

public final class ChunkRange extends Object
Helper class to iterate over chunks within a range.
  • 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, @NotNull @NotNull ChunkRange.ChunkConsumer callback)
    • chunksInRangeDiffering

      public static void chunksInRangeDiffering(int newChunkX, int newChunkZ, int oldChunkX, int oldChunkZ, int range, @NotNull @NotNull ChunkRange.ChunkConsumer newCallback, @NotNull @NotNull 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

      public static void chunksInRange(@NotNull @NotNull Point point, int range, ChunkRange.ChunkConsumer consumer)