Class NbtCraftingRecipe

java.lang.Object
net.minecraft.recipe.SpecialCraftingRecipe
net.minecraft.recipe.NbtCraftingRecipe
All Implemented Interfaces:
CraftingRecipe, Recipe<CraftingInventory>

public class NbtCraftingRecipe extends SpecialCraftingRecipe
Mappings:
Namespace Name
official cmz
intermediary net/minecraft/class_8423
named net/minecraft/recipe/NbtCraftingRecipe
  • Constructor Details

    • NbtCraftingRecipe

      public NbtCraftingRecipe(Identifier id, CraftingRecipeCategory category)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcmq;<init>(Lacy;Lcmo;)V
      intermediary <init> Lnet/minecraft/class_1852;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_7710;)V
      named <init> Lnet/minecraft/recipe/SpecialCraftingRecipe;<init>(Lnet/minecraft/util/Identifier;Lnet/minecraft/recipe/book/CraftingRecipeCategory;)V
  • Method Details

    • getInputs

      private static List<ItemStack> getInputs(CraftingInventory craftingInventory)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Lcfi;)Ljava/util/List;
      intermediary method_50809 Lnet/minecraft/class_8423;method_50809(Lnet/minecraft/class_1715;)Ljava/util/List;
      named getInputs Lnet/minecraft/recipe/NbtCraftingRecipe;getInputs(Lnet/minecraft/inventory/CraftingInventory;)Ljava/util/List;
    • matches

      public boolean matches(CraftingInventory craftingInventory, World world)
      Description copied from interface: Recipe
      Returns whether this recipe matches the contents inside the inventory in the given world.

      The world currently is only used by the map cloning recipe to prevent duplication of explorer maps.

      Parameters:
      craftingInventory - the input inventory
      world - the input world
      Returns:
      whether this recipe matches the contents inside the inventory in the given world
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Lcfi;Lcql;)Z
      intermediary method_50810 Lnet/minecraft/class_8423;method_50810(Lnet/minecraft/class_1715;Lnet/minecraft/class_1937;)Z
      named matches Lnet/minecraft/recipe/NbtCraftingRecipe;matches(Lnet/minecraft/inventory/CraftingInventory;Lnet/minecraft/world/World;)Z
    • craft

      public ItemStack craft(CraftingInventory craftingInventory, DynamicRegistryManager dynamicRegistryManager)
      Description copied from interface: Recipe
      Crafts this recipe.

      This method does not perform side effects on the inventory.

      This method should return a new item stack on each call.

      Parameters:
      craftingInventory - the input inventory
      Returns:
      the resulting item stack
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Lcfi;Lhr;)Lcjr;
      intermediary method_50811 Lnet/minecraft/class_8423;method_50811(Lnet/minecraft/class_1715;Lnet/minecraft/class_5455;)Lnet/minecraft/class_1799;
      named craft Lnet/minecraft/recipe/NbtCraftingRecipe;craft(Lnet/minecraft/inventory/CraftingInventory;Lnet/minecraft/registry/DynamicRegistryManager;)Lnet/minecraft/item/ItemStack;
    • countMatching

      private static int countMatching(List<ItemStack> inputs, Predicate<ItemStack> predicate, boolean sizeCounted)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Ljava/util/List;Ljava/util/function/Predicate;Z)I
      intermediary method_50818 Lnet/minecraft/class_8423;method_50818(Ljava/util/List;Ljava/util/function/Predicate;Z)I
      named countMatching Lnet/minecraft/recipe/NbtCraftingRecipe;countMatching(Ljava/util/List;Ljava/util/function/Predicate;Z)I
    • method_50817

      @Nullable private static <T> T method_50817(List<ItemStack> list, Function<ItemStack,T> function)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Ljava/util/List;Ljava/util/function/Function;)Ljava/lang/Object;
      intermediary method_50817 Lnet/minecraft/class_8423;method_50817(Ljava/util/List;Ljava/util/function/Function;)Ljava/lang/Object;
      named method_50817 Lnet/minecraft/recipe/NbtCraftingRecipe;method_50817(Ljava/util/List;Ljava/util/function/Function;)Ljava/lang/Object;
    • createNbtItemStack

      private static <T extends NbtElement> ItemStack createNbtItemStack(Item item, T nbtElement)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Lcjm;Lrk;)Lcjr;
      intermediary method_50812 Lnet/minecraft/class_8423;method_50812(Lnet/minecraft/class_1792;Lnet/minecraft/class_2520;)Lnet/minecraft/class_1799;
      named createNbtItemStack Lnet/minecraft/recipe/NbtCraftingRecipe;createNbtItemStack(Lnet/minecraft/item/Item;Lnet/minecraft/nbt/NbtElement;)Lnet/minecraft/item/ItemStack;
    • createSyntaxError

      private static ItemStack createSyntaxError(String error)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Ljava/lang/String;)Lcjr;
      intermediary method_50814 Lnet/minecraft/class_8423;method_50814(Ljava/lang/String;)Lnet/minecraft/class_1799;
      named createSyntaxError Lnet/minecraft/recipe/NbtCraftingRecipe;createSyntaxError(Ljava/lang/String;)Lnet/minecraft/item/ItemStack;
    • getOutput

      public static ItemStack getOutput(List<ItemStack> inputs)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Ljava/util/List;)Lcjr;
      intermediary method_50815 Lnet/minecraft/class_8423;method_50815(Ljava/util/List;)Lnet/minecraft/class_1799;
      named getOutput Lnet/minecraft/recipe/NbtCraftingRecipe;getOutput(Ljava/util/List;)Lnet/minecraft/item/ItemStack;
    • getTagOutput

      private static ItemStack getTagOutput(List<ItemStack> inputs, int tagCount)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Ljava/util/List;I)Lcjr;
      intermediary method_50816 Lnet/minecraft/class_8423;method_50816(Ljava/util/List;I)Lnet/minecraft/class_1799;
      named getTagOutput Lnet/minecraft/recipe/NbtCraftingRecipe;getTagOutput(Ljava/util/List;I)Lnet/minecraft/item/ItemStack;
    • method_50823

      private static ItemStack method_50823(List<ItemStack> list, int int2)
      Mappings:
      Namespace Name Mixin selector
      official b Lcmz;b(Ljava/util/List;I)Lcjr;
      intermediary method_50823 Lnet/minecraft/class_8423;method_50823(Ljava/util/List;I)Lnet/minecraft/class_1799;
      named method_50823 Lnet/minecraft/recipe/NbtCraftingRecipe;method_50823(Ljava/util/List;I)Lnet/minecraft/item/ItemStack;
    • method_50822

      private static ItemStack method_50822(List<ItemStack> list)
      Mappings:
      Namespace Name Mixin selector
      official b Lcmz;b(Ljava/util/List;)Lcjr;
      intermediary method_50822 Lnet/minecraft/class_8423;method_50822(Ljava/util/List;)Lnet/minecraft/class_1799;
      named method_50822 Lnet/minecraft/recipe/NbtCraftingRecipe;method_50822(Ljava/util/List;)Lnet/minecraft/item/ItemStack;
    • method_50825

      private static ItemStack method_50825(List<ItemStack> list)
      Mappings:
      Namespace Name Mixin selector
      official c Lcmz;c(Ljava/util/List;)Lcjr;
      intermediary method_50825 Lnet/minecraft/class_8423;method_50825(Ljava/util/List;)Lnet/minecraft/class_1799;
      named method_50825 Lnet/minecraft/recipe/NbtCraftingRecipe;method_50825(Ljava/util/List;)Lnet/minecraft/item/ItemStack;
    • createStackFromBytes

      private static ItemStack createStackFromBytes(byte[] bytes)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a([B)Lcjr;
      intermediary method_50820 Lnet/minecraft/class_8423;method_50820([B)Lnet/minecraft/class_1799;
      named createStackFromBytes Lnet/minecraft/recipe/NbtCraftingRecipe;createStackFromBytes([B)Lnet/minecraft/item/ItemStack;
    • getNbtNumberFromStack

      @Nullable private static @Nullable AbstractNbtNumber getNbtNumberFromStack(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Lcjr;)Lre;
      intermediary method_50813 Lnet/minecraft/class_8423;method_50813(Lnet/minecraft/class_1799;)Lnet/minecraft/class_2514;
      named getNbtNumberFromStack Lnet/minecraft/recipe/NbtCraftingRecipe;getNbtNumberFromStack(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/nbt/AbstractNbtNumber;
    • stacksToByteArray

      @Nullable private static @org.jetbrains.annotations.Nullable byte[] stacksToByteArray(List<ItemStack> stacks)
      Mappings:
      Namespace Name Mixin selector
      official d Lcmz;d(Ljava/util/List;)[B
      intermediary method_50827 Lnet/minecraft/class_8423;method_50827(Ljava/util/List;)[B
      named stacksToByteArray Lnet/minecraft/recipe/NbtCraftingRecipe;stacksToByteArray(Ljava/util/List;)[B
    • concatenateStackValues

      private static ItemStack concatenateStackValues(List<ItemStack> stacks)
      Mappings:
      Namespace Name Mixin selector
      official e Lcmz;e(Ljava/util/List;)Lcjr;
      intermediary method_50829 Lnet/minecraft/class_8423;method_50829(Ljava/util/List;)Lnet/minecraft/class_1799;
      named concatenateStackValues Lnet/minecraft/recipe/NbtCraftingRecipe;concatenateStackValues(Ljava/util/List;)Lnet/minecraft/item/ItemStack;
    • concatenateNbt

      @Nullable private static @Nullable NbtElement concatenateNbt(NbtElement first, NbtElement second)
      Mappings:
      Namespace Name Mixin selector
      official a Lcmz;a(Lrk;Lrk;)Lrk;
      intermediary method_50819 Lnet/minecraft/class_8423;method_50819(Lnet/minecraft/class_2520;Lnet/minecraft/class_2520;)Lnet/minecraft/class_2520;
      named concatenateNbt Lnet/minecraft/recipe/NbtCraftingRecipe;concatenateNbt(Lnet/minecraft/nbt/NbtElement;Lnet/minecraft/nbt/NbtElement;)Lnet/minecraft/nbt/NbtElement;
    • fits

      public boolean fits(int width, int height)
      Returns whether this recipe will fit into the given grid size.

      This is currently only used by recipe book.

      Parameters:
      width - the width of the input inventory
      height - the height of the input inventory
      Returns:
      whether this recipe will fit into the given grid size
      Mappings:
      Namespace Name Mixin selector
      official a Lcna;a(II)Z
      intermediary method_8113 Lnet/minecraft/class_1860;method_8113(II)Z
      named fits Lnet/minecraft/recipe/Recipe;fits(II)Z
    • getSerializer

      public RecipeSerializer<?> getSerializer()
      Returns the serializer associated with this recipe.
      Returns:
      the serializer associated with this recipe
      Mappings:
      Namespace Name Mixin selector
      official aj_ Lcna;aj_()Lcnc;
      intermediary method_8119 Lnet/minecraft/class_1860;method_8119()Lnet/minecraft/class_1865;
      named getSerializer Lnet/minecraft/recipe/Recipe;getSerializer()Lnet/minecraft/recipe/RecipeSerializer;