minecraft_25w45a_unobfuscated/net/minecraft/network/protocol/game/ClientboundRecipeBookSettingsPacket.java
2025-11-24 22:52:51 +03:00

29 lines
1.1 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.network.protocol.game;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.PacketType;
import net.minecraft.network.protocol.game.ClientGamePacketListener;
import net.minecraft.network.protocol.game.GamePacketTypes;
import net.minecraft.stats.RecipeBookSettings;
public record ClientboundRecipeBookSettingsPacket(RecipeBookSettings bookSettings) implements Packet<ClientGamePacketListener>
{
public static final StreamCodec<FriendlyByteBuf, ClientboundRecipeBookSettingsPacket> STREAM_CODEC = StreamCodec.composite(RecipeBookSettings.STREAM_CODEC, ClientboundRecipeBookSettingsPacket::bookSettings, ClientboundRecipeBookSettingsPacket::new);
@Override
public PacketType<ClientboundRecipeBookSettingsPacket> type() {
return GamePacketTypes.CLIENTBOUND_RECIPE_BOOK_SETTINGS;
}
@Override
public void handle(ClientGamePacketListener listener) {
listener.handleRecipeBookSettings(this);
}
}