ServerboundPunchPacket .java

net.minecraft.network.protocol.game.ServerboundPunchPacket (record, 21 lines): record. members: INSTANCE, handle, STREAM_CODEC, type. imports: ByteBuf.

net.minecraft.network.protocol.gamerecord21 linescommon712 B

Implements

API Surface (2)

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

Fields & Constants (2)

INSTANCE
STREAM_CODEC

Same Package (197)

Code Graph: Dependencies (4)

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

Full Source

ServerboundPunchPacket.java21 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.network.protocol.game;
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 ServerboundPunchPacket() implements Packet<ServerGamePacketListener> {
9
	public static final ServerboundPunchPacket INSTANCE = new ServerboundPunchPacket();
10
	public static final StreamCodec<ByteBuf, ServerboundPunchPacket> STREAM_CODEC = StreamCodec.unit(INSTANCE);
11
12
	@Override
13
	public PacketType<ServerboundPunchPacket> type() {
14
		return GamePacketTypes.SERVERBOUND_PUNCH;
15
	}
16
17
	public void handle(final ServerGamePacketListener listener) {
18
		listener.handlePunch(this);
19
	}
20
}
21

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