Implements Packet<ServerCommonPacketListener>
API Surface (2) PacketType<ServerboundClientInformationPacket> type()
void handle(final ServerCommonPacketListener listener)
Code Graph: Dependencies (6) Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
ServerboundClientInformationPacket.java 31 lines · Minecraft 26.3 · verbatim Copy
1 package net.minecraft.network.protocol.common;
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 import net.minecraft.server.level.ClientInformation;
8
9 public record ServerboundClientInformationPacket(ClientInformation information) implements Packet<ServerCommonPacketListener> {
10 public static final StreamCodec<FriendlyByteBuf, ServerboundClientInformationPacket> STREAM_CODEC = Packet.codec(
11 ServerboundClientInformationPacket::write, ServerboundClientInformationPacket::new
12 );
13
14 private ServerboundClientInformationPacket(final FriendlyByteBuf input) {
15 this(new ClientInformation(input));
16 }
17
18 private void write(final FriendlyByteBuf output) {
19 this.information.write(output);
20 }
21
22 @Override
23 public PacketType<ServerboundClientInformationPacket> type() {
24 return CommonPacketTypes.SERVERBOUND_CLIENT_INFORMATION;
25 }
26
27 public void handle(final ServerCommonPacketListener listener) {
28 listener.handleClientInformation(this);
29 }
30 }
31
Decompiled Minecraft 26.3 source of ServerboundClientInformationPacket (net/minecraft/network/protocol/common/ServerboundClientInformationPacket.java) with Mojang official mappings, stored verbatim on the site.