/* * 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; import net.minecraft.util.debugchart.RemoteDebugSampleType; public record ClientboundDebugSamplePacket(long[] sample, RemoteDebugSampleType debugSampleType) implements Packet { public static final StreamCodec STREAM_CODEC = Packet.codec(ClientboundDebugSamplePacket::write, ClientboundDebugSamplePacket::new); private ClientboundDebugSamplePacket(FriendlyByteBuf input) { this(input.readLongArray(), input.readEnum(RemoteDebugSampleType.class)); } private void write(FriendlyByteBuf output) { output.writeLongArray(this.sample); output.writeEnum(this.debugSampleType); } @Override public PacketType type() { return GamePacketTypes.CLIENTBOUND_DEBUG_SAMPLE; } @Override public void handle(ClientGamePacketListener listener) { listener.handleDebugSample(this); } }