ServerboundChatCommandSignedPacket .java

net.minecraft.network.protocol.game.ServerboundChatCommandSignedPacket (record, 38 lines): members: command, timeStamp, salt, argumentSignatures, handle.

net.minecraft.network.protocol.gamerecord38 linescommon1.4 KB

Implements

API Surface (2)

PacketType<ServerboundChatCommandSignedPacket> type()
void handle(final ServerGamePacketListener listener)

Fields & Constants (1)

STREAM_CODEC

Same Package (197)

Full Source

ServerboundChatCommandSignedPacket.java38 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.network.protocol.game;
2
3
import io.netty.buffer.ByteBuf;
4
import java.time.Instant;
5
import net.minecraft.commands.arguments.ArgumentSignatures;
6
import net.minecraft.network.chat.LastSeenMessages;
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 ServerboundChatCommandSignedPacket(
13
	String command, Instant timeStamp, long salt, ArgumentSignatures argumentSignatures, LastSeenMessages.Update lastSeenMessages
14
) implements Packet<ServerGamePacketListener> {
15
	public static final StreamCodec<ByteBuf, ServerboundChatCommandSignedPacket> STREAM_CODEC = StreamCodec.composite(
16
		ByteBufCodecs.STRING_UTF8,
17
		ServerboundChatCommandSignedPacket::command,
18
		ByteBufCodecs.INSTANT,
19
		ServerboundChatCommandSignedPacket::timeStamp,
20
		ByteBufCodecs.LONG,
21
		ServerboundChatCommandSignedPacket::salt,
22
		ArgumentSignatures.STREAM_CODEC,
23
		ServerboundChatCommandSignedPacket::argumentSignatures,
24
		LastSeenMessages.Update.STREAM_CODEC,
25
		ServerboundChatCommandSignedPacket::lastSeenMessages,
26
		ServerboundChatCommandSignedPacket::new
27
	);
28
29
	@Override
30
	public PacketType<ServerboundChatCommandSignedPacket> type() {
31
		return GamePacketTypes.SERVERBOUND_CHAT_COMMAND_SIGNED;
32
	}
33
34
	public void handle(final ServerGamePacketListener listener) {
35
		listener.handleSignedChatCommand(this);
36
	}
37
}
38

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