Package net.minecraft.recipe
Class NbtCraftingRecipe
java.lang.Object
net.minecraft.recipe.SpecialCraftingRecipe
net.minecraft.recipe.NbtCraftingRecipe
- All Implemented Interfaces:
CraftingRecipe,Recipe<CraftingInventory>
- Mappings:
Namespace Name official cmzintermediary net/minecraft/class_8423named net/minecraft/recipe/NbtCraftingRecipe
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static @Nullable NbtElementconcatenateNbt(NbtElement first, NbtElement second) private static ItemStackconcatenateStackValues(List<ItemStack> stacks) private static intcountMatching(List<ItemStack> inputs, Predicate<ItemStack> predicate, boolean sizeCounted) craft(CraftingInventory craftingInventory, DynamicRegistryManager dynamicRegistryManager) Crafts this recipe.private static <T extends NbtElement>
ItemStackcreateNbtItemStack(Item item, T nbtElement) private static ItemStackcreateStackFromBytes(byte[] bytes) private static ItemStackcreateSyntaxError(String error) booleanfits(int width, int height) Returns whether this recipe will fit into the given grid size.getInputs(CraftingInventory craftingInventory) private static @Nullable AbstractNbtNumbergetNbtNumberFromStack(ItemStack stack) static ItemStackReturns the serializer associated with this recipe.private static ItemStackgetTagOutput(List<ItemStack> inputs, int tagCount) booleanmatches(CraftingInventory craftingInventory, World world) Returns whether this recipe matches the contents inside theinventoryin the givenworld.private static <T> Tmethod_50817(List<ItemStack> list, Function<ItemStack, T> function) private static ItemStackmethod_50822(List<ItemStack> list) private static ItemStackmethod_50823(List<ItemStack> list, int int2) private static ItemStackmethod_50825(List<ItemStack> list) private static @org.jetbrains.annotations.Nullable byte[]stacksToByteArray(List<ItemStack> stacks) Methods inherited from class net.minecraft.recipe.SpecialCraftingRecipe
getCategory, getId, getOutput, isIgnoredInRecipeBookMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.recipe.CraftingRecipe
getTypeMethods inherited from interface net.minecraft.recipe.Recipe
createIcon, getGroup, getIngredients, getRemainder, isEmpty, method_50831, method_50832, showNotification
-
Constructor Details
-
NbtCraftingRecipe
- Mappings:
Namespace Name Mixin selector official <init>Lcmq;<init>(Lacy;Lcmo;)Vintermediary <init>Lnet/minecraft/class_1852;<init>(Lnet/minecraft/class_2960;Lnet/minecraft/class_7710;)Vnamed <init>Lnet/minecraft/recipe/SpecialCraftingRecipe;<init>(Lnet/minecraft/util/Identifier;Lnet/minecraft/recipe/book/CraftingRecipeCategory;)V
-
-
Method Details
-
getInputs
- Mappings:
Namespace Name Mixin selector official aLcmz;a(Lcfi;)Ljava/util/List;intermediary method_50809Lnet/minecraft/class_8423;method_50809(Lnet/minecraft/class_1715;)Ljava/util/List;named getInputsLnet/minecraft/recipe/NbtCraftingRecipe;getInputs(Lnet/minecraft/inventory/CraftingInventory;)Ljava/util/List;
-
matches
Description copied from interface:RecipeReturns whether this recipe matches the contents inside theinventoryin the givenworld.The
worldcurrently is only used by the map cloning recipe to prevent duplication of explorer maps.- Parameters:
craftingInventory- the input inventoryworld- the input world- Returns:
- whether this recipe matches the contents inside the
inventoryin the givenworld - Mappings:
Namespace Name Mixin selector official aLcmz;a(Lcfi;Lcql;)Zintermediary method_50810Lnet/minecraft/class_8423;method_50810(Lnet/minecraft/class_1715;Lnet/minecraft/class_1937;)Znamed matchesLnet/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:RecipeCrafts 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 aLcmz;a(Lcfi;Lhr;)Lcjr;intermediary method_50811Lnet/minecraft/class_8423;method_50811(Lnet/minecraft/class_1715;Lnet/minecraft/class_5455;)Lnet/minecraft/class_1799;named craftLnet/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 aLcmz;a(Ljava/util/List;Ljava/util/function/Predicate;Z)Iintermediary method_50818Lnet/minecraft/class_8423;method_50818(Ljava/util/List;Ljava/util/function/Predicate;Z)Inamed countMatchingLnet/minecraft/recipe/NbtCraftingRecipe;countMatching(Ljava/util/List;Ljava/util/function/Predicate;Z)I
-
method_50817
- Mappings:
Namespace Name Mixin selector official aLcmz;a(Ljava/util/List;Ljava/util/function/Function;)Ljava/lang/Object;intermediary method_50817Lnet/minecraft/class_8423;method_50817(Ljava/util/List;Ljava/util/function/Function;)Ljava/lang/Object;named method_50817Lnet/minecraft/recipe/NbtCraftingRecipe;method_50817(Ljava/util/List;Ljava/util/function/Function;)Ljava/lang/Object;
-
createNbtItemStack
- Mappings:
Namespace Name Mixin selector official aLcmz;a(Lcjm;Lrk;)Lcjr;intermediary method_50812Lnet/minecraft/class_8423;method_50812(Lnet/minecraft/class_1792;Lnet/minecraft/class_2520;)Lnet/minecraft/class_1799;named createNbtItemStackLnet/minecraft/recipe/NbtCraftingRecipe;createNbtItemStack(Lnet/minecraft/item/Item;Lnet/minecraft/nbt/NbtElement;)Lnet/minecraft/item/ItemStack;
-
createSyntaxError
- Mappings:
Namespace Name Mixin selector official aLcmz;a(Ljava/lang/String;)Lcjr;intermediary method_50814Lnet/minecraft/class_8423;method_50814(Ljava/lang/String;)Lnet/minecraft/class_1799;named createSyntaxErrorLnet/minecraft/recipe/NbtCraftingRecipe;createSyntaxError(Ljava/lang/String;)Lnet/minecraft/item/ItemStack;
-
getOutput
- Mappings:
Namespace Name Mixin selector official aLcmz;a(Ljava/util/List;)Lcjr;intermediary method_50815Lnet/minecraft/class_8423;method_50815(Ljava/util/List;)Lnet/minecraft/class_1799;named getOutputLnet/minecraft/recipe/NbtCraftingRecipe;getOutput(Ljava/util/List;)Lnet/minecraft/item/ItemStack;
-
getTagOutput
- Mappings:
Namespace Name Mixin selector official aLcmz;a(Ljava/util/List;I)Lcjr;intermediary method_50816Lnet/minecraft/class_8423;method_50816(Ljava/util/List;I)Lnet/minecraft/class_1799;named getTagOutputLnet/minecraft/recipe/NbtCraftingRecipe;getTagOutput(Ljava/util/List;I)Lnet/minecraft/item/ItemStack;
-
method_50823
- Mappings:
Namespace Name Mixin selector official bLcmz;b(Ljava/util/List;I)Lcjr;intermediary method_50823Lnet/minecraft/class_8423;method_50823(Ljava/util/List;I)Lnet/minecraft/class_1799;named method_50823Lnet/minecraft/recipe/NbtCraftingRecipe;method_50823(Ljava/util/List;I)Lnet/minecraft/item/ItemStack;
-
method_50822
- Mappings:
Namespace Name Mixin selector official bLcmz;b(Ljava/util/List;)Lcjr;intermediary method_50822Lnet/minecraft/class_8423;method_50822(Ljava/util/List;)Lnet/minecraft/class_1799;named method_50822Lnet/minecraft/recipe/NbtCraftingRecipe;method_50822(Ljava/util/List;)Lnet/minecraft/item/ItemStack;
-
method_50825
- Mappings:
Namespace Name Mixin selector official cLcmz;c(Ljava/util/List;)Lcjr;intermediary method_50825Lnet/minecraft/class_8423;method_50825(Ljava/util/List;)Lnet/minecraft/class_1799;named method_50825Lnet/minecraft/recipe/NbtCraftingRecipe;method_50825(Ljava/util/List;)Lnet/minecraft/item/ItemStack;
-
createStackFromBytes
- Mappings:
Namespace Name Mixin selector official aLcmz;a([B)Lcjr;intermediary method_50820Lnet/minecraft/class_8423;method_50820([B)Lnet/minecraft/class_1799;named createStackFromBytesLnet/minecraft/recipe/NbtCraftingRecipe;createStackFromBytes([B)Lnet/minecraft/item/ItemStack;
-
getNbtNumberFromStack
- Mappings:
Namespace Name Mixin selector official aLcmz;a(Lcjr;)Lre;intermediary method_50813Lnet/minecraft/class_8423;method_50813(Lnet/minecraft/class_1799;)Lnet/minecraft/class_2514;named getNbtNumberFromStackLnet/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 dLcmz;d(Ljava/util/List;)[Bintermediary method_50827Lnet/minecraft/class_8423;method_50827(Ljava/util/List;)[Bnamed stacksToByteArrayLnet/minecraft/recipe/NbtCraftingRecipe;stacksToByteArray(Ljava/util/List;)[B
-
concatenateStackValues
- Mappings:
Namespace Name Mixin selector official eLcmz;e(Ljava/util/List;)Lcjr;intermediary method_50829Lnet/minecraft/class_8423;method_50829(Ljava/util/List;)Lnet/minecraft/class_1799;named concatenateStackValuesLnet/minecraft/recipe/NbtCraftingRecipe;concatenateStackValues(Ljava/util/List;)Lnet/minecraft/item/ItemStack;
-
concatenateNbt
- Mappings:
Namespace Name Mixin selector official aLcmz;a(Lrk;Lrk;)Lrk;intermediary method_50819Lnet/minecraft/class_8423;method_50819(Lnet/minecraft/class_2520;Lnet/minecraft/class_2520;)Lnet/minecraft/class_2520;named concatenateNbtLnet/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 inventoryheight- the height of the input inventory- Returns:
- whether this recipe will fit into the given grid size
- Mappings:
Namespace Name Mixin selector official aLcna;a(II)Zintermediary method_8113Lnet/minecraft/class_1860;method_8113(II)Znamed fitsLnet/minecraft/recipe/Recipe;fits(II)Z
-
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_8119Lnet/minecraft/class_1860;method_8119()Lnet/minecraft/class_1865;named getSerializerLnet/minecraft/recipe/Recipe;getSerializer()Lnet/minecraft/recipe/RecipeSerializer;
-