Package org.geysermc.geyser.util
Class ChunkUtils
java.lang.Object
org.geysermc.geyser.util.ChunkUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]static final BlockStorage[]static final int -
Method Summary
Modifier and TypeMethodDescriptionstatic intindexYZXtoXZY(int yzx) static voidloadDimension(GeyserSession session) Process the minimum and maximum heights for this dimension, and processes the world coordinate scale.static voidsendEmptyChunk(GeyserSession session, int chunkX, int chunkZ, boolean forceUpdate) static voidsendEmptyChunks(GeyserSession session, org.cloudburstmc.math.vector.Vector3i position, int radius, boolean forceUpdate) static voidupdateBlock(GeyserSession session, int blockState, org.cloudburstmc.math.vector.Vector3i position) Sends a block update to the Bedrock client.static voidupdateBlockClientSide(GeyserSession session, int blockState, org.cloudburstmc.math.vector.Vector3i position) Updates a block, but client-side only.static voidupdateChunkPosition(GeyserSession session, org.cloudburstmc.math.vector.Vector3i position)
-
Field Details
-
EMPTY_BIOME_DATA
public static final byte[] EMPTY_BIOME_DATA -
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 toblockState- the Java block state of the blockposition- 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
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
-