public class ChunkDataS2CPacket extends Object implements Packet<ClientPlayPacketListener>
Modifier and Type | Field and Description |
---|---|
private int[] |
biomeArray |
private List<CompoundTag> |
blockEntities |
private int |
chunkX |
private int |
chunkZ |
private byte[] |
data |
private CompoundTag |
heightmaps |
private boolean |
isFullChunk |
private int |
verticalStripBitmask |
Constructor and Description |
---|
ChunkDataS2CPacket() |
ChunkDataS2CPacket(WorldChunk chunk,
int includedSectionsMask) |
Modifier and Type | Method and Description |
---|---|
void |
apply(ClientPlayPacketListener clientPlayPacketListener) |
int[] |
getBiomeArray() |
List<CompoundTag> |
getBlockEntityTagList() |
protected int |
getDataSize(WorldChunk chunk,
int includedSectionsMark) |
CompoundTag |
getHeightmaps() |
PacketByteBuf |
getReadBuffer() |
int |
getVerticalStripBitmask() |
private io.netty.buffer.ByteBuf |
getWriteBuffer() |
int |
getX() |
int |
getZ() |
boolean |
isFullChunk() |
void |
read(PacketByteBuf buf) |
void |
write(PacketByteBuf buf) |
int |
writeData(PacketByteBuf packetByteBuf,
WorldChunk chunk,
int includedSectionsMask) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isWritingErrorSkippable
private int chunkX
private int chunkZ
private int verticalStripBitmask
private CompoundTag heightmaps
@Nullable private int[] biomeArray
private byte[] data
private List<CompoundTag> blockEntities
private boolean isFullChunk
public ChunkDataS2CPacket()
public ChunkDataS2CPacket(WorldChunk chunk, int includedSectionsMask)
includedSectionsMask
- a bitmask of the vertical chunk sections that should be included in this packet.
65535 will send all sections.public void read(PacketByteBuf buf) throws IOException
read
in interface Packet<ClientPlayPacketListener>
IOException
public void write(PacketByteBuf buf) throws IOException
write
in interface Packet<ClientPlayPacketListener>
IOException
public void apply(ClientPlayPacketListener clientPlayPacketListener)
apply
in interface Packet<ClientPlayPacketListener>
@Environment(value=CLIENT) public PacketByteBuf getReadBuffer()
private io.netty.buffer.ByteBuf getWriteBuffer()
public int writeData(PacketByteBuf packetByteBuf, WorldChunk chunk, int includedSectionsMask)
protected int getDataSize(WorldChunk chunk, int includedSectionsMark)
@Environment(value=CLIENT) public int getX()
@Environment(value=CLIENT) public int getZ()
@Environment(value=CLIENT) public int getVerticalStripBitmask()
public boolean isFullChunk()
@Environment(value=CLIENT) public CompoundTag getHeightmaps()
@Environment(value=CLIENT) public List<CompoundTag> getBlockEntityTagList()
@Environment(value=CLIENT) @Nullable public int[] getBiomeArray()