public class ChunkDeltaUpdateS2CPacket extends Object implements Packet<ClientPlayPacketListener>
Modifier and Type | Field and Description |
---|---|
private BlockState[] |
blockStates |
private boolean |
field_26749 |
private short[] |
positions
The packed local positions
ChunkSectionPos#getPackedLocalPos for each entry in blockStates . |
private ChunkSectionPos |
sectionPos |
Constructor and Description |
---|
ChunkDeltaUpdateS2CPacket() |
ChunkDeltaUpdateS2CPacket(ChunkSectionPos sectionPos,
it.unimi.dsi.fastutil.shorts.ShortSet shortSet,
ChunkSection section,
boolean bool) |
Modifier and Type | Method and Description |
---|---|
private void |
allocateBuffers(int positionCount) |
void |
apply(ClientPlayPacketListener clientPlayPacketListener) |
boolean |
method_31179() |
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, wait
isWritingErrorSkippable
private ChunkSectionPos sectionPos
private short[] positions
ChunkSectionPos#getPackedLocalPos
for each entry in blockStates
.private BlockState[] blockStates
private boolean field_26749
public ChunkDeltaUpdateS2CPacket()
public ChunkDeltaUpdateS2CPacket(ChunkSectionPos sectionPos, it.unimi.dsi.fastutil.shorts.ShortSet shortSet, ChunkSection section, boolean bool)
sectionPos
- the position of the given chunk section that will be sent to the clientprivate void allocateBuffers(int positionCount)
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>
public void visitUpdates(BiConsumer<BlockPos,BlockState> biConsumer)
@Environment(value=CLIENT) public boolean method_31179()