Interface FabricServerRecipeManager

All Superinterfaces:
FabricRecipeManager

public interface FabricServerRecipeManager extends FabricRecipeManager
General-purpose Fabric-provided extensions for RecipeManager class.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <I extends net.minecraft.world.item.crafting.RecipeInput, T extends net.minecraft.world.item.crafting.Recipe<I>>
    Stream<net.minecraft.world.item.crafting.RecipeHolder<T>>
    getAllMatches(net.minecraft.world.item.crafting.RecipeType<T> type, I input, net.minecraft.world.level.Level world)
    Creates a stream of all recipe entries of the given type that match the given input and world.
    default <I extends net.minecraft.world.item.crafting.RecipeInput, T extends net.minecraft.world.item.crafting.Recipe<I>>
    Collection<net.minecraft.world.item.crafting.RecipeHolder<T>>
    getAllOfType(net.minecraft.world.item.crafting.RecipeType<T> type)
     

    Methods inherited from interface net.fabricmc.fabric.api.recipe.v1.FabricRecipeManager

    getSynchronizedRecipes
  • Method Details

    • getAllMatches

      default <I extends net.minecraft.world.item.crafting.RecipeInput, T extends net.minecraft.world.item.crafting.Recipe<I>> Stream<net.minecraft.world.item.crafting.RecipeHolder<T>> getAllMatches(net.minecraft.world.item.crafting.RecipeType<T> type, I input, net.minecraft.world.level.Level world)
      Creates a stream of all recipe entries of the given type that match the given input and world.

      If input.isEmpty() returns true, the returned stream will be always empty.

      Returns:
      the stream of matching recipes
    • getAllOfType

      default <I extends net.minecraft.world.item.crafting.RecipeInput, T extends net.minecraft.world.item.crafting.Recipe<I>> Collection<net.minecraft.world.item.crafting.RecipeHolder<T>> getAllOfType(net.minecraft.world.item.crafting.RecipeType<T> type)
      Returns:
      the collection of recipe entries of given type