/* * 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 class ClientboundSetChunkCacheRadiusPacket implements Packet { public static final StreamCodec STREAM_CODEC = Packet.codec(ClientboundSetChunkCacheRadiusPacket::write, ClientboundSetChunkCacheRadiusPacket::new); private final int radius; public ClientboundSetChunkCacheRadiusPacket(int radius) { this.radius = radius; } private ClientboundSetChunkCacheRadiusPacket(FriendlyByteBuf input) { this.radius = input.readVarInt(); } private void write(FriendlyByteBuf output) { output.writeVarInt(this.radius); } @Override public PacketType type() { return GamePacketTypes.CLIENTBOUND_SET_CHUNK_CACHE_RADIUS; } @Override public void handle(ClientGamePacketListener listener) { listener.handleSetChunkCacheRadius(this); } public int getRadius() { return this.radius; } }