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

      public NbtCompound getHeightmapsTag()
      The heightmap of this chunk.
      Returns:
      an NBT-Tag
    • setHeightmapsTag

      public void setHeightmapsTag(NbtCompound heightmapsTag)
      Sets the heightmap tag of this chunk.
      Parameters:
      heightmapsTag - the new heightmaps tag.
    • 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

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