ClientboundPlayerInfoRemovePacket 0x46

ClientboundPlayerInfoRemovePacket: Minecraft 26.3 packet (0x46 Play clientbound). Wire name 'player_info_remove', fields: profileIds, handled

Minecraft 26.3PlayClientboundnet.minecraft.network.protocol.game

Protocol slots (1)

IDdecStateDirectionRegistry
0x4670PLAYClientboundGamePacketTypes.CLIENTBOUND_PLAYER_INFO_REMOVE: "player_info_remove"

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 (1)

FieldType
profileIdsList<UUID>

Fields are the components of the packet record.

Stream codec

static final StreamCodec<ByteBuf, ClientboundPlayerInfoRemovePacket> STREAM_CODEC = StreamCodec.composite( UUIDUtil.STREAM_CODEC.apply(ByteBufCodecs.list()), ClientboundPlayerInfoRemovePacket::profile

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

Handling

Resolved on the ClientGamePacketListener packet-listener interface by void handlePlayerInfoRemove(ClientboundPlayerInfoRemovePacket clientboundplayerinforemovepacket). The implementation in the game is ClientPacketListener.

Full Source

ClientboundPlayerInfoRemovePacket.java26 lines · Minecraft 26.3 · verbatimSource page ↗
1
package net.minecraft.network.protocol.game;
2
3
import io.netty.buffer.ByteBuf;
4
import java.util.List;
5
import java.util.UUID;
6
import net.minecraft.core.UUIDUtil;
7
import net.minecraft.network.codec.ByteBufCodecs;
8
import net.minecraft.network.codec.StreamCodec;
9
import net.minecraft.network.protocol.Packet;
10
import net.minecraft.network.protocol.PacketType;
11
12
public record ClientboundPlayerInfoRemovePacket(List<UUID> profileIds) implements Packet<ClientGamePacketListener> {
13
	public static final StreamCodec<ByteBuf, ClientboundPlayerInfoRemovePacket> STREAM_CODEC = StreamCodec.composite(
14
		UUIDUtil.STREAM_CODEC.apply(ByteBufCodecs.list()), ClientboundPlayerInfoRemovePacket::profileIds, ClientboundPlayerInfoRemovePacket::new
15
	);
16
17
	@Override
18
	public PacketType<ClientboundPlayerInfoRemovePacket> type() {
19
		return GamePacketTypes.CLIENTBOUND_PLAYER_INFO_REMOVE;
20
	}
21
22
	public void handle(final ClientGamePacketListener listener) {
23
		listener.handlePlayerInfoRemove(this);
24
	}
25
}
26