Class RecipeHandlerHelpers
java.lang.Object
org.cyclops.commoncapabilities.api.capability.recipehandler.RecipeHandlerHelpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack, Integer> getPrototypesFromDisplay(net.minecraft.world.item.crafting.display.SlotDisplay display) A heuristical method for converting a display slot to a list of prototyped ingredients.static IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack, Integer> getPrototypesFromDisplay(net.minecraft.world.item.crafting.display.SlotDisplay display, int count) A heuristical method for converting a display slot to a list of prototyped ingredients.static IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack, Integer> getPrototypesFromIngredient(net.minecraft.world.item.crafting.Ingredient ingredient, net.minecraft.world.item.crafting.display.SlotDisplay display) A heuristical method for converting an ingredient to a list of prototyped ingredients.static IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack, Integer> getPrototypesFromIngredient(net.minecraft.world.item.crafting.Ingredient ingredient, net.minecraft.world.item.crafting.display.SlotDisplay display, int count) A heuristical method for converting an ingredient to a list of prototyped ingredients.static IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack, Integer> getPrototypesFromIngredient(net.neoforged.neoforge.common.crafting.SizedIngredient ingredient) protected static net.minecraft.world.item.ItemStackoverrideStackCount(net.minecraft.world.item.ItemStack stack, int count) static <C extends net.minecraft.world.item.crafting.RecipeInput,T extends net.minecraft.world.item.crafting.Recipe<C>>
RecipeDefinitionrecipeToRecipeDefinition(net.minecraft.resources.ResourceKey<net.minecraft.world.item.crafting.Recipe<?>> recipeId, T recipe, net.minecraft.world.level.Level level)
-
Constructor Details
-
RecipeHandlerHelpers
public RecipeHandlerHelpers()
-
-
Method Details
-
getPrototypesFromDisplay
public static IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack,Integer> getPrototypesFromDisplay(net.minecraft.world.item.crafting.display.SlotDisplay display) A heuristical method for converting a display slot to a list of prototyped ingredients.- Parameters:
display- A display slot.- Returns:
- A list of prototyped ingredients.
-
getPrototypesFromDisplay
public static IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack,Integer> getPrototypesFromDisplay(net.minecraft.world.item.crafting.display.SlotDisplay display, int count) A heuristical method for converting a display slot to a list of prototyped ingredients.- Parameters:
display- A display slot.count- Override for the prototype counts.- Returns:
- A list of prototyped ingredients.
-
getPrototypesFromIngredient
public static IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack,Integer> getPrototypesFromIngredient(net.minecraft.world.item.crafting.Ingredient ingredient, @Nullable net.minecraft.world.item.crafting.display.SlotDisplay display) A heuristical method for converting an ingredient to a list of prototyped ingredients.- Parameters:
ingredient- An ingredient.- Returns:
- A list of prototyped ingredients.
-
getPrototypesFromIngredient
public static IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack,Integer> getPrototypesFromIngredient(net.minecraft.world.item.crafting.Ingredient ingredient, @Nullable net.minecraft.world.item.crafting.display.SlotDisplay display, int count) A heuristical method for converting an ingredient to a list of prototyped ingredients.- Parameters:
ingredient- An ingredient.count- Override for the prototype counts.- Returns:
- A list of prototyped ingredients.
-
overrideStackCount
protected static net.minecraft.world.item.ItemStack overrideStackCount(net.minecraft.world.item.ItemStack stack, int count) -
getPrototypesFromIngredient
public static IPrototypedIngredientAlternatives<net.minecraft.world.item.ItemStack,Integer> getPrototypesFromIngredient(net.neoforged.neoforge.common.crafting.SizedIngredient ingredient) -
recipeToRecipeDefinition
@Nullable public static <C extends net.minecraft.world.item.crafting.RecipeInput,T extends net.minecraft.world.item.crafting.Recipe<C>> RecipeDefinition recipeToRecipeDefinition(net.minecraft.resources.ResourceKey<net.minecraft.world.item.crafting.Recipe<?>> recipeId, T recipe, net.minecraft.world.level.Level level)
-