Class WrappedLevelChunkData.ChunkData

java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedLevelChunkData.ChunkData
Enclosing class:
WrappedLevelChunkData

public static final class WrappedLevelChunkData.ChunkData extends AbstractWrapper
Wrapper for ClientboundLevelChunkPacketData
  • Constructor Details

    • ChunkData

      public ChunkData(Object handle)
  • Method Details

    • getHeightmapsTag

      @Deprecated public NbtCompound getHeightmapsTag()
      Deprecated.
      Use getHeightmaps() instead.
      The heightmap of this chunk.

      Removed in Minecraft 1.21.5.

      Returns:
      an NBT-Tag
    • setHeightmapsTag

      @Deprecated public void setHeightmapsTag(NbtCompound heightmapsTag)
      Deprecated.
      Use setHeightmaps(Map) instead.
      Sets the heightmap tag of this chunk.

      Removed in Minecraft 1.21.5.

      Parameters:
      heightmapsTag - the new heightmaps tag.
    • getHeightmaps

      public Map<EnumWrappers.HeightmapType,long[]> getHeightmaps()
      The heightmap of this chunk.
      Returns:
      a map containing the heightmaps
    • setHeightmaps

      public void setHeightmaps(Map<EnumWrappers.HeightmapType,long[]> heightmaps)
      Sets the heightmap tag of this chunk.

      Removed in Minecraft 1.21.5.

      Parameters:
      heightmaps - the new heightmaps.
    • getBuffer

      public byte[] getBuffer()
      The actual structural data of this chunk as bytes.
      Returns:
      a byte array containing the chunks structural data.
    • setBuffer

      public void setBuffer(byte[] buffer)
      Sets the structural data of this chunk.
      Parameters:
      buffer - the new buffer.
    • getBlockEntityInfo

      public List<WrappedLevelChunkData.BlockEntityInfo> getBlockEntityInfo()
      All block entities of this chunk. Supports removal and other edits.
      Returns:
      a mutable (remove only) list containing WrappedLevelChunkData.BlockEntityInfo
    • setBlockEntityInfo

      public void setBlockEntityInfo(List<WrappedLevelChunkData.BlockEntityInfo> blockEntityInfo)
      Sets the block entities of this chunk. Supports removal and other edits.
      Parameters:
      blockEntityInfo - the new list of block entities
    • fromValues

      @Deprecated public static WrappedLevelChunkData.ChunkData fromValues(NbtCompound heightmapsTag, byte[] buffer, List<WrappedLevelChunkData.BlockEntityInfo> blockEntityInfo)
      Deprecated.
      Creates a new wrapper using predefined values.

      Removed in Minecraft 1.21.5.

      Parameters:
      heightmapsTag - the heightmaps tag
      buffer - the buffer
      blockEntityInfo - a list of wrapped block entities
      Returns:
      a newly created wrapper
    • fromValues

      public static WrappedLevelChunkData.ChunkData fromValues(Map<EnumWrappers.HeightmapType,long[]> heightmaps, byte[] buffer, List<WrappedLevelChunkData.BlockEntityInfo> blockEntityInfo)
      Creates a new wrapper using predefined values.
      Parameters:
      heightmaps - the heightmaps
      buffer - the buffer
      blockEntityInfo - a list of wrapped block entities
      Returns:
      a newly created wrapper