Class ShapedRecipe

java.lang.Object
net.minecraft.recipe.ShapedRecipe
All Implemented Interfaces:
CraftingRecipe, Recipe<CraftingInventory>
Direct Known Subclasses:
MapExtendingRecipe

public class ShapedRecipe
extends Object
implements CraftingRecipe
Mappings:
Namespace Name
official bqs
intermediary net/minecraft/class_1869
named net/minecraft/recipe/ShapedRecipe
  • Field Details

    • width

      private final int width
      Mappings:
      Namespace Name Mixin selector
      official a Lbqs;a:I
      intermediary field_9055 Lnet/minecraft/class_1869;field_9055:I
      named width Lnet/minecraft/recipe/ShapedRecipe;width:I
    • height

      private final int height
      Mappings:
      Namespace Name Mixin selector
      official b Lbqs;b:I
      intermediary field_9054 Lnet/minecraft/class_1869;field_9054:I
      named height Lnet/minecraft/recipe/ShapedRecipe;height:I
    • inputs

      private final DefaultedList<Ingredient> inputs
      Mappings:
      Namespace Name Mixin selector
      official c Lbqs;c:Lgj;
      intermediary field_9052 Lnet/minecraft/class_1869;field_9052:Lnet/minecraft/class_2371;
      named inputs Lnet/minecraft/recipe/ShapedRecipe;inputs:Lnet/minecraft/util/collection/DefaultedList;
    • output

      private final ItemStack output
      Mappings:
      Namespace Name Mixin selector
      official d Lbqs;d:Lbnv;
      intermediary field_9053 Lnet/minecraft/class_1869;field_9053:Lnet/minecraft/class_1799;
      named output Lnet/minecraft/recipe/ShapedRecipe;output:Lnet/minecraft/item/ItemStack;
    • id

      private final Identifier id
      Mappings:
      Namespace Name Mixin selector
      official e Lbqs;e:Lwb;
      intermediary field_9051 Lnet/minecraft/class_1869;field_9051:Lnet/minecraft/class_2960;
      named id Lnet/minecraft/recipe/ShapedRecipe;id:Lnet/minecraft/util/Identifier;
    • group

      private final String group
      Mappings:
      Namespace Name Mixin selector
      official f Lbqs;f:Ljava/lang/String;
      intermediary field_9056 Lnet/minecraft/class_1869;field_9056:Ljava/lang/String;
      named group Lnet/minecraft/recipe/ShapedRecipe;group:Ljava/lang/String;
  • Constructor Details

    • ShapedRecipe

      public ShapedRecipe​(Identifier id, String group, int width, int height, DefaultedList<Ingredient> ingredients, ItemStack output)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbqs;<init>(Lwb;Ljava/lang/String;IILgj;Lbnv;)V
      intermediary <init> Lnet/minecraft/class_1869;<init>(Lnet/minecraft/class_2960;Ljava/lang/String;IILnet/minecraft/class_2371;Lnet/minecraft/class_1799;)V
      named <init> Lnet/minecraft/recipe/ShapedRecipe;<init>(Lnet/minecraft/util/Identifier;Ljava/lang/String;IILnet/minecraft/util/collection/DefaultedList;Lnet/minecraft/item/ItemStack;)V
  • Method Details

    • getId

      public Identifier getId()
      Specified by:
      getId in interface Recipe<CraftingInventory>
      Mappings:
      Namespace Name Mixin selector
      official f Lbqn;f()Lwb;
      intermediary method_8114 Lnet/minecraft/class_1860;method_8114()Lnet/minecraft/class_2960;
      named getId Lnet/minecraft/recipe/Recipe;getId()Lnet/minecraft/util/Identifier;
    • getSerializer

      public RecipeSerializer<?> getSerializer()
      Specified by:
      getSerializer in interface Recipe<CraftingInventory>
      Mappings:
      Namespace Name Mixin selector
      official ai_ Lbqn;ai_()Lbqp;
      intermediary method_8119 Lnet/minecraft/class_1860;method_8119()Lnet/minecraft/class_1865;
      named getSerializer Lnet/minecraft/recipe/Recipe;getSerializer()Lnet/minecraft/recipe/RecipeSerializer;
    • getGroup

      @Environment(CLIENT) public String getGroup()
      Specified by:
      getGroup in interface Recipe<CraftingInventory>
      Mappings:
      Namespace Name Mixin selector
      official d Lbqn;d()Ljava/lang/String;
      intermediary method_8112 Lnet/minecraft/class_1860;method_8112()Ljava/lang/String;
      named getGroup Lnet/minecraft/recipe/Recipe;getGroup()Ljava/lang/String;
    • getOutput

      public ItemStack getOutput()
      Specified by:
      getOutput in interface Recipe<CraftingInventory>
      Mappings:
      Namespace Name Mixin selector
      official c Lbqn;c()Lbnv;
      intermediary method_8110 Lnet/minecraft/class_1860;method_8110()Lnet/minecraft/class_1799;
      named getOutput Lnet/minecraft/recipe/Recipe;getOutput()Lnet/minecraft/item/ItemStack;
    • getPreviewInputs

      public DefaultedList<Ingredient> getPreviewInputs()
      Specified by:
      getPreviewInputs in interface Recipe<CraftingInventory>
      Mappings:
      Namespace Name Mixin selector
      official a Lbqn;a()Lgj;
      intermediary method_8117 Lnet/minecraft/class_1860;method_8117()Lnet/minecraft/class_2371;
      named getPreviewInputs Lnet/minecraft/recipe/Recipe;getPreviewInputs()Lnet/minecraft/util/collection/DefaultedList;
    • fits

      @Environment(CLIENT) public boolean fits​(int width, int height)
      Specified by:
      fits in interface Recipe<CraftingInventory>
      Mappings:
      Namespace Name Mixin selector
      official a Lbqn;a(II)Z
      intermediary method_8113 Lnet/minecraft/class_1860;method_8113(II)Z
      named fits Lnet/minecraft/recipe/Recipe;fits(II)Z
    • matches

      public boolean matches​(CraftingInventory craftingInventory, World world)
      Specified by:
      matches in interface Recipe<CraftingInventory>
      Mappings:
      Namespace Name Mixin selector
      official a Lbqs;a(Lbke;Lbtv;)Z
      intermediary method_17728 Lnet/minecraft/class_1869;method_17728(Lnet/minecraft/class_1715;Lnet/minecraft/class_1937;)Z
      named matches Lnet/minecraft/recipe/ShapedRecipe;matches(Lnet/minecraft/inventory/CraftingInventory;Lnet/minecraft/world/World;)Z
    • matchesSmall

      private boolean matchesSmall​(CraftingInventory inv, int offsetX, int offsetY, boolean bool)
      Mappings:
      Namespace Name Mixin selector
      official a Lbqs;a(Lbke;IIZ)Z
      intermediary method_8161 Lnet/minecraft/class_1869;method_8161(Lnet/minecraft/class_1715;IIZ)Z
      named matchesSmall Lnet/minecraft/recipe/ShapedRecipe;matchesSmall(Lnet/minecraft/inventory/CraftingInventory;IIZ)Z
    • craft

      public ItemStack craft​(CraftingInventory craftingInventory)
      Specified by:
      craft in interface Recipe<CraftingInventory>
      Mappings:
      Namespace Name Mixin selector
      official a Lbqs;a(Lbke;)Lbnv;
      intermediary method_17727 Lnet/minecraft/class_1869;method_17727(Lnet/minecraft/class_1715;)Lnet/minecraft/class_1799;
      named craft Lnet/minecraft/recipe/ShapedRecipe;craft(Lnet/minecraft/inventory/CraftingInventory;)Lnet/minecraft/item/ItemStack;
    • getWidth

      public int getWidth()
      Mappings:
      Namespace Name Mixin selector
      official j Lbqs;j()I
      intermediary method_8150 Lnet/minecraft/class_1869;method_8150()I
      named getWidth Lnet/minecraft/recipe/ShapedRecipe;getWidth()I
    • getHeight

      public int getHeight()
      Mappings:
      Namespace Name Mixin selector
      official k Lbqs;k()I
      intermediary method_8158 Lnet/minecraft/class_1869;method_8158()I
      named getHeight Lnet/minecraft/recipe/ShapedRecipe;getHeight()I
    • getIngredients

      private static DefaultedList<Ingredient> getIngredients​(String[] pattern, Map<String,​Ingredient> key, int width, int height)
      Mappings:
      Namespace Name Mixin selector
      official b Lbqs;b([Ljava/lang/String;Ljava/util/Map;II)Lgj;
      intermediary method_8148 Lnet/minecraft/class_1869;method_8148([Ljava/lang/String;Ljava/util/Map;II)Lnet/minecraft/class_2371;
      named getIngredients Lnet/minecraft/recipe/ShapedRecipe;getIngredients([Ljava/lang/String;Ljava/util/Map;II)Lnet/minecraft/util/collection/DefaultedList;
    • combinePattern

      static String[] combinePattern​(String[] lines)
      Mappings:
      Namespace Name Mixin selector
      official a Lbqs;a([Ljava/lang/String;)[Ljava/lang/String;
      intermediary method_8146 Lnet/minecraft/class_1869;method_8146([Ljava/lang/String;)[Ljava/lang/String;
      named combinePattern Lnet/minecraft/recipe/ShapedRecipe;combinePattern([Ljava/lang/String;)[Ljava/lang/String;
    • isEmpty

      @Environment(CLIENT) public boolean isEmpty()
      Specified by:
      isEmpty in interface Recipe<CraftingInventory>
      Mappings:
      Namespace Name Mixin selector
      official i Lbqn;i()Z
      intermediary method_31584 Lnet/minecraft/class_1860;method_31584()Z
      named isEmpty Lnet/minecraft/recipe/Recipe;isEmpty()Z
    • findNextIngredient

      private static int findNextIngredient​(String pattern)
      Mappings:
      Namespace Name Mixin selector
      official a Lbqs;a(Ljava/lang/String;)I
      intermediary method_8151 Lnet/minecraft/class_1869;method_8151(Ljava/lang/String;)I
      named findNextIngredient Lnet/minecraft/recipe/ShapedRecipe;findNextIngredient(Ljava/lang/String;)I
    • findNextIngredientReverse

      private static int findNextIngredientReverse​(String pattern)
      Mappings:
      Namespace Name Mixin selector
      official b Lbqs;b(Ljava/lang/String;)I
      intermediary method_8153 Lnet/minecraft/class_1869;method_8153(Ljava/lang/String;)I
      named findNextIngredientReverse Lnet/minecraft/recipe/ShapedRecipe;findNextIngredientReverse(Ljava/lang/String;)I
    • getPattern

      private static String[] getPattern​(JsonArray json)
      Mappings:
      Namespace Name Mixin selector
      official b Lbqs;b(Lcom/google/gson/JsonArray;)[Ljava/lang/String;
      intermediary method_8145 Lnet/minecraft/class_1869;method_8145(Lcom/google/gson/JsonArray;)[Ljava/lang/String;
      named getPattern Lnet/minecraft/recipe/ShapedRecipe;getPattern(Lcom/google/gson/JsonArray;)[Ljava/lang/String;
    • getComponents

      private static Map<String,​Ingredient> getComponents​(JsonObject json)
      Mappings:
      Namespace Name Mixin selector
      official c Lbqs;c(Lcom/google/gson/JsonObject;)Ljava/util/Map;
      intermediary method_8157 Lnet/minecraft/class_1869;method_8157(Lcom/google/gson/JsonObject;)Ljava/util/Map;
      named getComponents Lnet/minecraft/recipe/ShapedRecipe;getComponents(Lcom/google/gson/JsonObject;)Ljava/util/Map;
    • getItemStack

      public static ItemStack getItemStack​(JsonObject json)
      Mappings:
      Namespace Name Mixin selector
      official a Lbqs;a(Lcom/google/gson/JsonObject;)Lbnv;
      intermediary method_8155 Lnet/minecraft/class_1869;method_8155(Lcom/google/gson/JsonObject;)Lnet/minecraft/class_1799;
      named getItemStack Lnet/minecraft/recipe/ShapedRecipe;getItemStack(Lcom/google/gson/JsonObject;)Lnet/minecraft/item/ItemStack;