Class ChunkDataS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.ChunkDataS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class ChunkDataS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Field Summary
Fields Modifier and Type Field Description private int[]biomeArrayprivate List<CompoundTag>blockEntitiesprivate intchunkXprivate intchunkZprivate byte[]dataprivate CompoundTagheightmapsprivate booleanisFullChunkprivate intverticalStripBitmask -
Constructor Summary
Constructors Constructor Description ChunkDataS2CPacket()ChunkDataS2CPacket(WorldChunk chunk, int includedSectionsMask) -
Method Summary
Modifier and Type Method Description voidapply(ClientPlayPacketListener clientPlayPacketListener)int[]getBiomeArray()List<CompoundTag>getBlockEntityTagList()protected intgetDataSize(WorldChunk chunk, int includedSectionsMark)CompoundTaggetHeightmaps()PacketByteBufgetReadBuffer()intgetVerticalStripBitmask()private io.netty.buffer.ByteBufgetWriteBuffer()intgetX()intgetZ()booleanisFullChunk()voidread(PacketByteBuf buf)voidwrite(PacketByteBuf buf)intwriteData(PacketByteBuf packetByteBuf, WorldChunk chunk, int includedSectionsMask)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
chunkX
private int chunkX -
chunkZ
private int chunkZ -
verticalStripBitmask
private int verticalStripBitmask -
heightmaps
-
biomeArray
-
data
private byte[] data -
blockEntities
-
isFullChunk
private boolean isFullChunk
-
-
Constructor Details
-
ChunkDataS2CPacket
public ChunkDataS2CPacket() -
ChunkDataS2CPacket
- Parameters:
includedSectionsMask- a bitmask of the vertical chunk sections that should be included in this packet. 65535 will send all sections.
-
-
Method Details
-
read
- Specified by:
readin interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>
-
getReadBuffer
-
getWriteBuffer
private io.netty.buffer.ByteBuf getWriteBuffer() -
writeData
-
getDataSize
-
getX
@Environment(CLIENT) public int getX() -
getZ
@Environment(CLIENT) public int getZ() -
getVerticalStripBitmask
@Environment(CLIENT) public int getVerticalStripBitmask() -
isFullChunk
public boolean isFullChunk() -
getHeightmaps
-
getBlockEntityTagList
-
getBiomeArray
-