Package com.comphenix.protocol.wrappers
Class WrappedLevelChunkData.ChunkData
java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedLevelChunkData.ChunkData
- Enclosing class:
WrappedLevelChunkData
Wrapper for ClientboundLevelChunkPacketData
-
Field Summary
Fields inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
handle, handleType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromValues(NbtCompound heightmapsTag, byte[] buffer, List<WrappedLevelChunkData.BlockEntityInfo> blockEntityInfo) Deprecated.fromValues(Map<EnumWrappers.HeightmapType, long[]> heightmaps, byte[] buffer, List<WrappedLevelChunkData.BlockEntityInfo> blockEntityInfo) Creates a new wrapper using predefined values.All block entities of this chunk.byte[]The actual structural data of this chunk as bytes.Map<EnumWrappers.HeightmapType, long[]> The heightmap of this chunk.Deprecated.UsegetHeightmaps()instead.voidsetBlockEntityInfo(List<WrappedLevelChunkData.BlockEntityInfo> blockEntityInfo) Sets the block entities of this chunk.voidsetBuffer(byte[] buffer) Sets the structural data of this chunk.voidsetHeightmaps(Map<EnumWrappers.HeightmapType, long[]> heightmaps) Sets the heightmap tag of this chunk.voidsetHeightmapsTag(NbtCompound heightmapsTag) Deprecated.UsesetHeightmaps(Map)instead.Methods inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
equals, getHandle, getHandleType, hashCode, setHandle, toString
-
Constructor Details
-
ChunkData
-
-
Method Details
-
getHeightmapsTag
Deprecated.UsegetHeightmaps()instead.The heightmap of this chunk.Removed in Minecraft 1.21.5.
- Returns:
- an NBT-Tag
-
setHeightmapsTag
Deprecated.UsesetHeightmaps(Map)instead.Sets the heightmap tag of this chunk.Removed in Minecraft 1.21.5.
- Parameters:
heightmapsTag- the new heightmaps tag.
-
getHeightmaps
The heightmap of this chunk.- Returns:
- a map containing the heightmaps
-
setHeightmaps
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
All block entities of this chunk. Supports removal and other edits.- Returns:
- a mutable (remove only) list containing
WrappedLevelChunkData.BlockEntityInfo
-
setBlockEntityInfo
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.UsefromValues(Map, byte[], List)instead.Creates a new wrapper using predefined values.Removed in Minecraft 1.21.5.
- Parameters:
heightmapsTag- the heightmaps tagbuffer- the bufferblockEntityInfo- 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 heightmapsbuffer- the bufferblockEntityInfo- a list of wrapped block entities- Returns:
- a newly created wrapper
-
fromValues(Map, byte[], List)instead.