Class RecipeUtils

java.lang.Object
vazkii.botania.common.crafting.recipe.RecipeUtils

public class RecipeUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>
    getRemainingItemsSub(net.minecraft.world.item.crafting.RecipeInput inv, Function<net.minecraft.world.item.ItemStack,@Nullable net.minecraft.world.item.ItemStack> specialHandler)
    Like the vanilla method on recipe interface, but specialHandler is called first, and if it returns nonnull, that result is used instead of vanilla's
    static boolean
    matches(List<net.minecraft.world.item.crafting.Ingredient> inputs, net.minecraft.world.item.crafting.RecipeInput inv, @Nullable it.unimi.dsi.fastutil.ints.IntSet usedSlots)
    Check if every ingredient in inputs is satisfied by inv.
    static net.minecraft.world.item.crafting.Recipe<?>
    recipeFromNetwork(net.minecraft.network.RegistryFriendlyByteBuf buffer)
     
    static void
    recipeToNetwork(net.minecraft.network.RegistryFriendlyByteBuf buffer, net.minecraft.world.item.crafting.Recipe<?> recipe)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RecipeUtils

      public RecipeUtils()
  • Method Details

    • matches

      public static boolean matches(List<net.minecraft.world.item.crafting.Ingredient> inputs, net.minecraft.world.item.crafting.RecipeInput inv, @Nullable @Nullable it.unimi.dsi.fastutil.ints.IntSet usedSlots)
      Check if every ingredient in inputs is satisfied by inv. Optionally, the slots from the inventory used to fulfill the inputs are placed into usedSlots.
    • getRemainingItemsSub

      public static net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getRemainingItemsSub(net.minecraft.world.item.crafting.RecipeInput inv, Function<net.minecraft.world.item.ItemStack,@Nullable net.minecraft.world.item.ItemStack> specialHandler)
      Like the vanilla method on recipe interface, but specialHandler is called first, and if it returns nonnull, that result is used instead of vanilla's
    • recipeFromNetwork

      public static net.minecraft.world.item.crafting.Recipe<?> recipeFromNetwork(net.minecraft.network.RegistryFriendlyByteBuf buffer)
    • recipeToNetwork

      public static void recipeToNetwork(net.minecraft.network.RegistryFriendlyByteBuf buffer, net.minecraft.world.item.crafting.Recipe<?> recipe)