Class RepairItemRecipe

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

public class RepairItemRecipe extends SpecialCraftingRecipe
Mappings:
Namespace Name
named net/minecraft/recipe/RepairItemRecipe
intermediary net/minecraft/class_4317
official czc
  • Constructor Details

    • RepairItemRecipe

      public RepairItemRecipe(CraftingRecipeCategory category)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/recipe/SpecialCraftingRecipe;<init>(Lnet/minecraft/recipe/book/CraftingRecipeCategory;)V
      intermediary <init> Lnet/minecraft/class_1852;<init>(Lnet/minecraft/class_7710;)V
      official <init> Lcyo;<init>(Lcym;)V
  • Method Details

    • findPair

      @Nullable private @Nullable com.mojang.datafixers.util.Pair<ItemStack,ItemStack> findPair(RecipeInputInventory inventory)
      Mappings:
      Namespace Name Mixin selector
      named findPair Lnet/minecraft/recipe/RepairItemRecipe;findPair(Lnet/minecraft/inventory/RecipeInputInventory;)Lcom/mojang/datafixers/util/Pair;
      intermediary method_58438 Lnet/minecraft/class_4317;method_58438(Lnet/minecraft/class_8566;)Lcom/mojang/datafixers/util/Pair;
      official a Lczc;a(Lcql;)Lcom/mojang/datafixers/util/Pair;
    • canCombineStacks

      private static boolean canCombineStacks(ItemStack first, ItemStack second)
      Mappings:
      Namespace Name Mixin selector
      named canCombineStacks Lnet/minecraft/recipe/RepairItemRecipe;canCombineStacks(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
      intermediary method_58439 Lnet/minecraft/class_4317;method_58439(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
      official a Lczc;a(Lcuq;Lcuq;)Z
    • matches

      public boolean matches(RecipeInputInventory recipeInputInventory, 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:
      recipeInputInventory - 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
      named matches Lnet/minecraft/recipe/RepairItemRecipe;matches(Lnet/minecraft/inventory/RecipeInputInventory;Lnet/minecraft/world/World;)Z
      intermediary method_20808 Lnet/minecraft/class_4317;method_20808(Lnet/minecraft/class_8566;Lnet/minecraft/class_1937;)Z
      official a Lczc;a(Lcql;Ldbz;)Z
    • craft

      public ItemStack craft(RecipeInputInventory recipeInputInventory, RegistryWrapper.WrapperLookup wrapperLookup)
      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:
      recipeInputInventory - the input inventory
      Returns:
      the resulting item stack
      Mappings:
      Namespace Name Mixin selector
      named craft Lnet/minecraft/recipe/RepairItemRecipe;craft(Lnet/minecraft/inventory/RecipeInputInventory;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/item/ItemStack;
      intermediary method_20807 Lnet/minecraft/class_4317;method_20807(Lnet/minecraft/class_8566;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_1799;
      official a Lczc;a(Lcql;Ljk$a;)Lcuq;
    • 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
      named fits Lnet/minecraft/recipe/Recipe;fits(II)Z
      intermediary method_8113 Lnet/minecraft/class_1860;method_8113(II)Z
      official a Lcyw;a(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
      named getSerializer Lnet/minecraft/recipe/Recipe;getSerializer()Lnet/minecraft/recipe/RecipeSerializer;
      intermediary method_8119 Lnet/minecraft/class_1860;method_8119()Lnet/minecraft/class_1865;
      official ao_ Lcyw;ao_()Lcza;