36 lines
1.2 KiB
Java
36 lines
1.2 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package net.minecraft.network.protocol.game;
|
|
|
|
import net.minecraft.network.FriendlyByteBuf;
|
|
import net.minecraft.network.codec.StreamCodec;
|
|
import net.minecraft.network.protocol.Packet;
|
|
import net.minecraft.network.protocol.PacketType;
|
|
import net.minecraft.network.protocol.game.ClientGamePacketListener;
|
|
import net.minecraft.network.protocol.game.GamePacketTypes;
|
|
|
|
public record ClientboundChunkBatchFinishedPacket(int batchSize) implements Packet<ClientGamePacketListener>
|
|
{
|
|
public static final StreamCodec<FriendlyByteBuf, ClientboundChunkBatchFinishedPacket> STREAM_CODEC = Packet.codec(ClientboundChunkBatchFinishedPacket::write, ClientboundChunkBatchFinishedPacket::new);
|
|
|
|
private ClientboundChunkBatchFinishedPacket(FriendlyByteBuf input) {
|
|
this(input.readVarInt());
|
|
}
|
|
|
|
private void write(FriendlyByteBuf output) {
|
|
output.writeVarInt(this.batchSize);
|
|
}
|
|
|
|
@Override
|
|
public PacketType<ClientboundChunkBatchFinishedPacket> type() {
|
|
return GamePacketTypes.CLIENTBOUND_CHUNK_BATCH_FINISHED;
|
|
}
|
|
|
|
@Override
|
|
public void handle(ClientGamePacketListener listener) {
|
|
listener.handleChunkBatchFinished(this);
|
|
}
|
|
}
|
|
|