Class SectionKeys

java.lang.Object
com.hypixel.hytale.builtin.buildertools.world.SectionKeys

public final class SectionKeys extends Object
Enumerates the chunk sections and columns that cover a block box.
  • Method Details

    • forEachSection

      public static void forEachSection(int minX, int minY, int minZ, int maxX, int maxY, int maxZ, @Nonnull SectionKeys.SectionConsumer consumer)
      Visits every section covering the inclusive box, in ascending section order on all three axes.
    • forEachSection

      public static void forEachSection(@Nonnull org.joml.Vector3ic min, @Nonnull org.joml.Vector3ic max, @Nonnull SectionKeys.SectionConsumer consumer)
    • forEachColumn

      public static void forEachColumn(int minX, int minZ, int maxX, int maxZ, @Nonnull SectionKeys.ColumnConsumer consumer)
      Visits every column covering the inclusive box on X and Z. Y is ignored, because a column covers every section at its X and Z.
    • columnCount

      public static long columnCount(int minX, int minZ, int maxX, int maxZ)
      How many columns cover the inclusive box on X and Z.
    • sectionCount

      public static long sectionCount(int minX, int minY, int minZ, int maxX, int maxY, int maxZ)
      How many sections cover the inclusive box. The count saturates at Long.MAX_VALUE rather than wrapping.
    • columnIndices

      @Nonnull public static it.unimi.dsi.fastutil.longs.LongSet columnIndices(int minX, int minZ, int maxX, int maxZ)
      The column indices covering the inclusive box, keyed by ChunkUtil.indexChunk(int, int).