ServerboundRecipeBookSeenRecipePacket .java

net.minecraft.network.protocol.game.ServerboundRecipeBookSeenRecipePacket (record): members: recipe, handle, STREAM_CODEC, type. imports: RecipeDisplayId.

net.minecraft.network.protocol.gamerecord23 linescommon942 B

Implements

API Surface (2)

PacketType<ServerboundRecipeBookSeenRecipePacket> 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

ServerboundRecipeBookSeenRecipePacket.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.item.crafting.display.RecipeDisplayId;
8
9
public record ServerboundRecipeBookSeenRecipePacket(RecipeDisplayId recipe) implements Packet<ServerGamePacketListener> {
10
	public static final StreamCodec<FriendlyByteBuf, ServerboundRecipeBookSeenRecipePacket> STREAM_CODEC = StreamCodec.composite(
11
		RecipeDisplayId.STREAM_CODEC, ServerboundRecipeBookSeenRecipePacket::recipe, ServerboundRecipeBookSeenRecipePacket::new
12
	);
13
14
	@Override
15
	public PacketType<ServerboundRecipeBookSeenRecipePacket> type() {
16
		return GamePacketTypes.SERVERBOUND_RECIPE_BOOK_SEEN_RECIPE;
17
	}
18
19
	public void handle(final ServerGamePacketListener listener) {
20
		listener.handleRecipeBookSeenRecipePacket(this);
21
	}
22
}
23

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