ClientboundSetChunkCacheRadiusPacket .java

net.minecraft.network.protocol.game.ClientboundSetChunkCacheRadiusPacket (class, 39 lines): members: getRadius, radius, handle, STREAM_CODEC, type.

net.minecraft.network.protocol.gameclass39 linescommon1.2 KB

Implements

API Surface (3)

PacketType<ClientboundSetChunkCacheRadiusPacket> type()
void handle(final ClientGamePacketListener listener)
int getRadius()

Fields & Constants (2)

STREAM_CODEC
radius

Same Package (197)

Code Graph: Dependencies (5)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

ClientboundSetChunkCacheRadiusPacket.java39 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.network.protocol.game;
2
3
import net.minecraft.network.FriendlyByteBuf;
4
import net.minecraft.network.codec.StreamCodec;
5
import net.minecraft.network.protocol.Packet;
6
import net.minecraft.network.protocol.PacketType;
7
8
public class ClientboundSetChunkCacheRadiusPacket implements Packet<ClientGamePacketListener> {
9
	public static final StreamCodec<FriendlyByteBuf, ClientboundSetChunkCacheRadiusPacket> STREAM_CODEC = Packet.codec(
10
		ClientboundSetChunkCacheRadiusPacket::write, ClientboundSetChunkCacheRadiusPacket::new
11
	);
12
	private final int radius;
13
14
	public ClientboundSetChunkCacheRadiusPacket(final int radius) {
15
		this.radius = radius;
16
	}
17
18
	private ClientboundSetChunkCacheRadiusPacket(final FriendlyByteBuf input) {
19
		this.radius = input.readVarInt();
20
	}
21
22
	private void write(final FriendlyByteBuf output) {
23
		output.writeVarInt(this.radius);
24
	}
25
26
	@Override
27
	public PacketType<ClientboundSetChunkCacheRadiusPacket> type() {
28
		return GamePacketTypes.CLIENTBOUND_SET_CHUNK_CACHE_RADIUS;
29
	}
30
31
	public void handle(final ClientGamePacketListener listener) {
32
		listener.handleSetChunkCacheRadius(this);
33
	}
34
35
	public int getRadius() {
36
		return this.radius;
37
	}
38
}
39

Decompiled Minecraft 26.3 source of ClientboundSetChunkCacheRadiusPacket (net/minecraft/network/protocol/game/ClientboundSetChunkCacheRadiusPacket.java) with Mojang official mappings, stored verbatim on the site.