Class SpecialCraftingRecipe.SpecialRecipeSerializer<T extends CraftingRecipe>

java.lang.Object
net.minecraft.recipe.SpecialCraftingRecipe.SpecialRecipeSerializer<T>
All Implemented Interfaces:
RecipeSerializer<T>
Enclosing class:
SpecialCraftingRecipe

public static class SpecialCraftingRecipe.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
named net/minecraft/recipe/SpecialCraftingRecipe$SpecialRecipeSerializer
intermediary net/minecraft/class_1852$class_1866
official dbt$a
  • Field Details

    • codec

      private final com.mojang.serialization.MapCodec<T extends CraftingRecipe> codec
      Mappings:
      Namespace Name Mixin selector
      named codec Lnet/minecraft/recipe/SpecialCraftingRecipe$SpecialRecipeSerializer;codec:Lcom/mojang/serialization/MapCodec;
      intermediary field_46106 Lnet/minecraft/class_1852$class_1866;field_46106:Lcom/mojang/serialization/MapCodec;
      official w Ldbt$a;w:Lcom/mojang/serialization/MapCodec;
    • packetCodec

      private final PacketCodec<RegistryByteBuf,T extends CraftingRecipe> packetCodec
      Mappings:
      Namespace Name Mixin selector
      named packetCodec Lnet/minecraft/recipe/SpecialCraftingRecipe$SpecialRecipeSerializer;packetCodec:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48362 Lnet/minecraft/class_1852$class_1866;field_48362:Lnet/minecraft/class_9139;
      official x Ldbt$a;x:Lzt;
  • Constructor Details

    • SpecialRecipeSerializer

      public SpecialRecipeSerializer(SpecialCraftingRecipe.SpecialRecipeSerializer.Factory<T> factory)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/recipe/SpecialCraftingRecipe$SpecialRecipeSerializer;<init>(Lnet/minecraft/recipe/SpecialCraftingRecipe$SpecialRecipeSerializer$Factory;)V
      intermediary <init> Lnet/minecraft/class_1852$class_1866;<init>(Lnet/minecraft/class_1852$class_1866$class_7711;)V
      official <init> Ldbt$a;<init>(Ldbt$a$a;)V
  • Method Details

    • codec

      public com.mojang.serialization.MapCodec<T> codec()
      Specified by:
      codec in interface RecipeSerializer<T extends CraftingRecipe>
      Mappings:
      Namespace Name Mixin selector
      named codec Lnet/minecraft/recipe/RecipeSerializer;codec()Lcom/mojang/serialization/MapCodec;
      intermediary method_53736 Lnet/minecraft/class_1865;method_53736()Lcom/mojang/serialization/MapCodec;
      official a Ldcn;a()Lcom/mojang/serialization/MapCodec;
    • packetCodec

      public PacketCodec<RegistryByteBuf,T> packetCodec()
      Deprecated.
      Recipe is no longer synced to the clients, making this obsolete.
      Returns the packet codec for serializing recipes over the network.
      Specified by:
      packetCodec in interface RecipeSerializer<T extends CraftingRecipe>
      Returns:
      the packet codec for serializing recipes over the network
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named packetCodec Lnet/minecraft/recipe/RecipeSerializer;packetCodec()Lnet/minecraft/network/codec/PacketCodec;
      intermediary method_56104 Lnet/minecraft/class_1865;method_56104()Lnet/minecraft/class_9139;
      official b Ldcn;b()Lzt;