ServerboundPlayerInputPacket .java

net.minecraft.network.protocol.game.ServerboundPlayerInputPacket (record): members: input, handle, STREAM_CODEC, type. imports: Input, FriendlyByteBuf.

net.minecraft.network.protocol.gamerecord23 linescommon831 B

Implements

API Surface (2)

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

Fields & Constants (1)

STREAM_CODEC

Same Package (197)

Code Graph: Dependencies (6)

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

Full Source

ServerboundPlayerInputPacket.java23 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
import net.minecraft.world.entity.player.Input;
8
9
public record ServerboundPlayerInputPacket(Input input) implements Packet<ServerGamePacketListener> {
10
	public static final StreamCodec<FriendlyByteBuf, ServerboundPlayerInputPacket> STREAM_CODEC = StreamCodec.composite(
11
		Input.STREAM_CODEC, ServerboundPlayerInputPacket::input, ServerboundPlayerInputPacket::new
12
	);
13
14
	@Override
15
	public PacketType<ServerboundPlayerInputPacket> type() {
16
		return GamePacketTypes.SERVERBOUND_PLAYER_INPUT;
17
	}
18
19
	public void handle(final ServerGamePacketListener listener) {
20
		listener.handlePlayerInput(this);
21
	}
22
}
23

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