Package net.minecraft.recipe
Class SpecialRecipeSerializer<T extends CraftingRecipe>
java.lang.Object
net.minecraft.recipe.SpecialRecipeSerializer<T>
- All Implemented Interfaces:
RecipeSerializer<T>
public class SpecialRecipeSerializer<T extends CraftingRecipe>
extends Object
implements RecipeSerializer<T>
A serializer for hardcoded recipes. The recipes with this serializer don't
transport any extra data besides their ID when read from JSON or synchronized
over network.
The name "special" comes from the fact that in vanilla, recipes using this
serializer have IDs starting with crafting_special_
. All of their logic and ingredients
are also defined in code, which distinguishes them from "non-special" recipes.
- Mappings:
Namespace Name official cji
intermediary net/minecraft/class_1866
named net/minecraft/recipe/SpecialRecipeSerializer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
-
Field Summary
Fields inherited from interface net.minecraft.recipe.RecipeSerializer
ARMOR_DYE, BANNER_DUPLICATE, BLASTING, BOOK_CLONING, CAMPFIRE_COOKING, CRAFTING_DECORATED_POT, FIREWORK_ROCKET, FIREWORK_STAR, FIREWORK_STAR_FADE, MAP_CLONING, MAP_EXTENDING, REPAIR_ITEM, SHAPED, SHAPELESS, SHIELD_DECORATION, SHULKER_BOX, SMELTING, SMITHING, SMITHING_TRANSFORM, SMITHING_TRIM, SMOKING, STONECUTTING, SUSPICIOUS_STEW, TIPPED_ARROW
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionread
(Identifier identifier, JsonObject jsonObject) Reads a recipe from a JSON object.read
(Identifier identifier, PacketByteBuf packetByteBuf) Reads a recipe from a packet byte buf, usually on the client.void
write
(PacketByteBuf packetByteBuf, T t) Writes a recipe to a packet byte buf, usually on the server.
-
Field Details
-
factory
- Mappings:
Namespace Name Mixin selector official y
Lcji;y:Lcji$a;
intermediary field_9046
Lnet/minecraft/class_1866;field_9046:Lnet/minecraft/class_1866$class_7711;
named factory
Lnet/minecraft/recipe/SpecialRecipeSerializer;factory:Lnet/minecraft/recipe/SpecialRecipeSerializer$Factory;
-
-
Constructor Details
-
SpecialRecipeSerializer
- Mappings:
Namespace Name Mixin selector official <init>
Lcji;<init>(Lcji$a;)V
intermediary <init>
Lnet/minecraft/class_1866;<init>(Lnet/minecraft/class_1866$class_7711;)V
named <init>
Lnet/minecraft/recipe/SpecialRecipeSerializer;<init>(Lnet/minecraft/recipe/SpecialRecipeSerializer$Factory;)V
-
-
Method Details
-
read
Description copied from interface:RecipeSerializer
Reads a recipe from a JSON object.- Specified by:
read
in interfaceRecipeSerializer<T extends CraftingRecipe>
- Parameters:
identifier
- the recipe's IDjsonObject
- the recipe JSON- Returns:
- the read recipe
- Mappings:
Namespace Name Mixin selector official a
Lcji;a(Ladd;Lcom/google/gson/JsonObject;)Lcio;
intermediary method_45443
Lnet/minecraft/class_1866;method_45443(Lnet/minecraft/class_2960;Lcom/google/gson/JsonObject;)Lnet/minecraft/class_3955;
named read
Lnet/minecraft/recipe/SpecialRecipeSerializer;read(Lnet/minecraft/util/Identifier;Lcom/google/gson/JsonObject;)Lnet/minecraft/recipe/CraftingRecipe;
-
read
Description copied from interface:RecipeSerializer
Reads a recipe from a packet byte buf, usually on the client.This can throw whatever exception the packet byte buf throws. This may be called in the netty event loop than the client game engine thread.
- Specified by:
read
in interfaceRecipeSerializer<T extends CraftingRecipe>
- Parameters:
identifier
- the recipe's IDpacketByteBuf
- the recipe buf- Returns:
- the read recipe
- Mappings:
Namespace Name Mixin selector official a
Lcji;a(Ladd;Lss;)Lcio;
intermediary method_45444
Lnet/minecraft/class_1866;method_45444(Lnet/minecraft/class_2960;Lnet/minecraft/class_2540;)Lnet/minecraft/class_3955;
named read
Lnet/minecraft/recipe/SpecialRecipeSerializer;read(Lnet/minecraft/util/Identifier;Lnet/minecraft/network/PacketByteBuf;)Lnet/minecraft/recipe/CraftingRecipe;
-
write
Description copied from interface:RecipeSerializer
Writes a recipe to a packet byte buf, usually on the server.The recipe's ID is already written into the buf when this is called.
This can throw whatever exception the packet byte buf throws. This may be called in the netty event loop than the server game engine thread.
- Specified by:
write
in interfaceRecipeSerializer<T extends CraftingRecipe>
- Parameters:
packetByteBuf
- the recipe buft
- the recipe- Mappings:
Namespace Name Mixin selector official a
Lcji;a(Lss;Lcio;)V
intermediary method_45442
Lnet/minecraft/class_1866;method_45442(Lnet/minecraft/class_2540;Lnet/minecraft/class_3955;)V
named write
Lnet/minecraft/recipe/SpecialRecipeSerializer;write(Lnet/minecraft/network/PacketByteBuf;Lnet/minecraft/recipe/CraftingRecipe;)V
-