Class ChunkDeltaUpdateS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.ChunkDeltaUpdateS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class ChunkDeltaUpdateS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Field Summary
Fields Modifier and Type Field Description private BlockState[]blockStatesprivate booleanfield_26749private short[]positionsThe packed local positions {@see ChunkSectionPos#getPackedLocalPos} for each entry in {@see #blockStates}.private ChunkSectionPossectionPos -
Constructor Summary
Constructors Constructor Description ChunkDeltaUpdateS2CPacket()ChunkDeltaUpdateS2CPacket(ChunkSectionPos sectionPos, ShortSet shortSet, ChunkSection section, boolean bool) -
Method Summary
Modifier and Type Method Description private voidallocateBuffers(int positionCount)voidapply(ClientPlayPacketListener clientPlayPacketListener)booleanmethod_31179()voidread(PacketByteBuf buf)voidvisitUpdates(BiConsumer<BlockPos,BlockState> biConsumer)Calls the given consumer for each pair of block position and block state contained in this packet.voidwrite(PacketByteBuf buf)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
-
sectionPos
-
positions
private short[] positionsThe packed local positions {@see ChunkSectionPos#getPackedLocalPos} for each entry in {@see #blockStates}. -
blockStates
-
field_26749
private boolean field_26749
-
-
Constructor Details
-
ChunkDeltaUpdateS2CPacket
public ChunkDeltaUpdateS2CPacket() -
ChunkDeltaUpdateS2CPacket
public ChunkDeltaUpdateS2CPacket(ChunkSectionPos sectionPos, ShortSet shortSet, ChunkSection section, boolean bool)- Parameters:
sectionPos- the position of the given chunk section that will be sent to the client
-
-
Method Details
-
allocateBuffers
private void allocateBuffers(int positionCount) -
read
- Specified by:
readin interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>
-
visitUpdates
Calls the given consumer for each pair of block position and block state contained in this packet. -
method_31179
@Environment(CLIENT) public boolean method_31179()
-