Class ChunkUtils

java.lang.Object
org.geysermc.geyser.util.ChunkUtils

public final class ChunkUtils extends Object
  • Field Details

    • EMPTY_BIOME_DATA

      public static final byte[] EMPTY_BIOME_DATA
    • EMPTY_BLOCK_STORAGE

      public static final BlockStorage[] EMPTY_BLOCK_STORAGE
    • EMPTY_CHUNK_SECTION_SIZE

      public static final int EMPTY_CHUNK_SECTION_SIZE
  • Method Details

    • indexYZXtoXZY

      public static int indexYZXtoXZY(int yzx)
    • updateChunkPosition

      public static void updateChunkPosition(GeyserSession session, org.cloudburstmc.math.vector.Vector3i position)
    • updateBlock

      public static void updateBlock(GeyserSession session, int blockState, org.cloudburstmc.math.vector.Vector3i position)
      Sends a block update to the Bedrock client. If the platform is not Spigot, this also adds that block to the cache.
      Parameters:
      session - the Bedrock session to send/register the block to
      blockState - the Java block state of the block
      position - the position of the block
    • updateBlockClientSide

      public static void updateBlockClientSide(GeyserSession session, int blockState, org.cloudburstmc.math.vector.Vector3i position)
      Updates a block, but client-side only.
    • sendEmptyChunk

      public static void sendEmptyChunk(GeyserSession session, int chunkX, int chunkZ, boolean forceUpdate)
    • sendEmptyChunks

      public static void sendEmptyChunks(GeyserSession session, org.cloudburstmc.math.vector.Vector3i position, int radius, boolean forceUpdate)
    • loadDimension

      public static void loadDimension(GeyserSession session)
      Process the minimum and maximum heights for this dimension, and processes the world coordinate scale. This must be done after the player has switched dimensions so we know what their dimension is