Class ChunkUtils

java.lang.Object
org.geysermc.connector.utils.ChunkUtils

public class ChunkUtils extends Object
  • Field Details

    • MINIMUM_ACCEPTED_HEIGHT

      public static final int MINIMUM_ACCEPTED_HEIGHT
      The minimum height Bedrock Edition will accept.
      See Also:
      Constant Field Values
    • MINIMUM_ACCEPTED_HEIGHT_OVERWORLD

      public static final int MINIMUM_ACCEPTED_HEIGHT_OVERWORLD
    • EMPTY_CHUNK_DATA

      public static final byte[] EMPTY_CHUNK_DATA
    • EMPTY_BIOME_DATA

      public static final byte[] EMPTY_BIOME_DATA
  • Constructor Details

    • ChunkUtils

      public ChunkUtils()
  • Method Details

    • translateToBedrock

      public static ChunkUtils.ChunkData translateToBedrock(GeyserSession session, com.github.steveice10.mc.protocol.data.game.chunk.Column column, int yOffset)
    • updateChunkPosition

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

      public static void updateBlock(GeyserSession session, int blockState, com.github.steveice10.mc.protocol.data.game.entity.metadata.Position position)
      Sends a block update to the Bedrock client. If chunk caching is enabled and 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
    • updateBlock

      public static void updateBlock(GeyserSession session, int blockState, com.nukkitx.math.vector.Vector3i position)
      Sends a block update to the Bedrock client. If chunk caching is enabled and 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
    • sendEmptyChunks

      public static void sendEmptyChunks(GeyserSession session, com.nukkitx.math.vector.Vector3i position, int radius, boolean forceUpdate)
    • loadDimensionTag

      public static void loadDimensionTag(GeyserSession session, com.github.steveice10.opennbt.tag.builtin.CompoundTag dimensionTag)
      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