Class ShapelessRecipe.Serializer

java.lang.Object
net.minecraft.recipe.ShapelessRecipe.Serializer
All Implemented Interfaces:
RecipeSerializer<ShapelessRecipe>
Enclosing class:
ShapelessRecipe

public static class ShapelessRecipe.Serializer extends Object implements RecipeSerializer<ShapelessRecipe>
Mappings:
Namespace Name
official cje$a
intermediary net/minecraft/class_1867$class_1868
named net/minecraft/recipe/ShapelessRecipe$Serializer
  • Constructor Details

    • Serializer

      public Serializer()
  • Method Details

    • read

      public ShapelessRecipe read(Identifier identifier, JsonObject jsonObject)
      Description copied from interface: RecipeSerializer
      Reads a recipe from a JSON object.
      Specified by:
      read in interface RecipeSerializer<ShapelessRecipe>
      Parameters:
      identifier - the recipe's ID
      jsonObject - the recipe JSON
      Returns:
      the read recipe
      Mappings:
      Namespace Name Mixin selector
      official a Lcje$a;a(Ladd;Lcom/google/gson/JsonObject;)Lcje;
      intermediary method_8142 Lnet/minecraft/class_1867$class_1868;method_8142(Lnet/minecraft/class_2960;Lcom/google/gson/JsonObject;)Lnet/minecraft/class_1867;
      named read Lnet/minecraft/recipe/ShapelessRecipe$Serializer;read(Lnet/minecraft/util/Identifier;Lcom/google/gson/JsonObject;)Lnet/minecraft/recipe/ShapelessRecipe;
    • getIngredients

      private static DefaultedList<Ingredient> getIngredients(JsonArray json)
      Mappings:
      Namespace Name Mixin selector
      official a Lcje$a;a(Lcom/google/gson/JsonArray;)Lhm;
      intermediary method_8144 Lnet/minecraft/class_1867$class_1868;method_8144(Lcom/google/gson/JsonArray;)Lnet/minecraft/class_2371;
      named getIngredients Lnet/minecraft/recipe/ShapelessRecipe$Serializer;getIngredients(Lcom/google/gson/JsonArray;)Lnet/minecraft/util/collection/DefaultedList;
    • read

      public ShapelessRecipe read(Identifier identifier, PacketByteBuf packetByteBuf)
      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 interface RecipeSerializer<ShapelessRecipe>
      Parameters:
      identifier - the recipe's ID
      packetByteBuf - the recipe buf
      Returns:
      the read recipe
      Mappings:
      Namespace Name Mixin selector
      official a Lcje$a;a(Ladd;Lss;)Lcje;
      intermediary method_8141 Lnet/minecraft/class_1867$class_1868;method_8141(Lnet/minecraft/class_2960;Lnet/minecraft/class_2540;)Lnet/minecraft/class_1867;
      named read Lnet/minecraft/recipe/ShapelessRecipe$Serializer;read(Lnet/minecraft/util/Identifier;Lnet/minecraft/network/PacketByteBuf;)Lnet/minecraft/recipe/ShapelessRecipe;
    • write

      public void write(PacketByteBuf packetByteBuf, ShapelessRecipe shapelessRecipe)
      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 interface RecipeSerializer<ShapelessRecipe>
      Parameters:
      packetByteBuf - the recipe buf
      shapelessRecipe - the recipe
      Mappings:
      Namespace Name Mixin selector
      official a Lcje$a;a(Lss;Lcje;)V
      intermediary method_8143 Lnet/minecraft/class_1867$class_1868;method_8143(Lnet/minecraft/class_2540;Lnet/minecraft/class_1867;)V
      named write Lnet/minecraft/recipe/ShapelessRecipe$Serializer;write(Lnet/minecraft/network/PacketByteBuf;Lnet/minecraft/recipe/ShapelessRecipe;)V