ServerboundAcceptCodeOfConductPacket 0x09

ServerboundAcceptCodeOfConductPacket: Minecraft 26.3 packet (0x09 Configuration serverbound).

Minecraft 26.3ConfigurationServerboundnet.minecraft.network.protocol.configuration

Protocol slots (1)

IDdecStateDirectionRegistry
0x099CONFIGURATIONServerboundConfigurationPacketTypes.SERVERBOUND_ACCEPT_CODE_OF_CONDUCT: "accept_code_of_conduct"

Packet ids are positional: the id is the index of the addPacket call in the protocol builder (see ProtocolInfoBuilder.listPackets). Ids change between game versions.

Wire fields (0)

FieldType
No wire fields (marker packet).

Fields are the components of the packet record.

Stream codec

static final StreamCodec<ByteBuf, ServerboundAcceptCodeOfConductPacket> STREAM_CODEC = StreamCodec.unit(INSTANCE);

Modern packets serialize through StreamCodecs instead of read/write methods.

Handling

Resolved on the ServerConfigurationPacketListener packet-listener interface by void handleAcceptCodeOfConduct(ServerboundAcceptCodeOfConductPacket serverboundacceptcodeofconductpacket). The implementation in the game is ServerConfigurationPacketListenerImpl.

Full Source

ServerboundAcceptCodeOfConductPacket.java21 lines · Minecraft 26.3 · verbatimSource page ↗
1
package net.minecraft.network.protocol.configuration;
2
3
import io.netty.buffer.ByteBuf;
4
import net.minecraft.network.codec.StreamCodec;
5
import net.minecraft.network.protocol.Packet;
6
import net.minecraft.network.protocol.PacketType;
7
8
public record ServerboundAcceptCodeOfConductPacket() implements Packet<ServerConfigurationPacketListener> {
9
	public static final ServerboundAcceptCodeOfConductPacket INSTANCE = new ServerboundAcceptCodeOfConductPacket();
10
	public static final StreamCodec<ByteBuf, ServerboundAcceptCodeOfConductPacket> STREAM_CODEC = StreamCodec.unit(INSTANCE);
11
12
	@Override
13
	public PacketType<ServerboundAcceptCodeOfConductPacket> type() {
14
		return ConfigurationPacketTypes.SERVERBOUND_ACCEPT_CODE_OF_CONDUCT;
15
	}
16
17
	public void handle(final ServerConfigurationPacketListener listener) {
18
		listener.handleAcceptCodeOfConduct(this);
19
	}
20
}
21