public class ChunkDeltaUpdateS2CPacket extends Object implements Packet<ClientPlayPacketListener>
| Modifier and Type | Field and Description |
|---|---|
private BlockState[] |
blockState |
private short[] |
packedLocalPos
The packed local positions
ChunkSectionPos#getPackedLocalPos for
each entry in blockState. |
private ChunkSectionPos |
sectionPos |
| Constructor and Description |
|---|
ChunkDeltaUpdateS2CPacket() |
ChunkDeltaUpdateS2CPacket(ChunkSectionPos sectionPos,
it.unimi.dsi.fastutil.shorts.ShortSet updatedLocalPosSet,
ChunkSection section) |
| Modifier and Type | Method and Description |
|---|---|
private void |
allocateBuffers(int posCount) |
void |
apply(ClientPlayPacketListener clientPlayPacketListener) |
void |
read(PacketByteBuf buf) |
void |
visitUpdates(BiConsumer<BlockPos,BlockState> biConsumer)
Calls the given consumer for each pair of block position and block state contained in this packet.
|
void |
write(PacketByteBuf buf) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisWritingErrorSkippableprivate ChunkSectionPos sectionPos
private short[] packedLocalPos
ChunkSectionPos#getPackedLocalPos for
each entry in blockState.private BlockState[] blockState
public ChunkDeltaUpdateS2CPacket()
public ChunkDeltaUpdateS2CPacket(ChunkSectionPos sectionPos, it.unimi.dsi.fastutil.shorts.ShortSet updatedLocalPosSet, ChunkSection section)
sectionPos - the position of the given chunk section that will be sent to the clientupdatedLocalPosSet - the set of packed local positions within the given chunk section that should be included in the packetprivate void allocateBuffers(int posCount)
public void read(PacketByteBuf buf) throws IOException
read in interface Packet<ClientPlayPacketListener>IOExceptionpublic void write(PacketByteBuf buf) throws IOException
write in interface Packet<ClientPlayPacketListener>IOExceptionpublic void apply(ClientPlayPacketListener clientPlayPacketListener)
apply in interface Packet<ClientPlayPacketListener>public void visitUpdates(BiConsumer<BlockPos,BlockState> biConsumer)