Class PatchouliUtils

java.lang.Object
at.petrak.hexcasting.interop.patchouli.PatchouliUtils

public class PatchouliUtils extends Object
> no this is a "literally copy these files/parts of file into your mod" > we should put this in patchy but lol > lazy -- Hubry Vazcord
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends net.minecraft.world.item.crafting.Recipe<C>, C extends net.minecraft.world.Container>
    T
    getRecipe(net.minecraft.world.item.crafting.RecipeType<T> type, net.minecraft.resources.ResourceLocation id)
     
    static vazkii.patchouli.api.IVariable
    interweaveIngredients(List<net.minecraft.world.item.crafting.Ingredient> ingredients)
    Overload of the method above that uses the provided list's longest ingredient size.
    static vazkii.patchouli.api.IVariable
    interweaveIngredients(List<net.minecraft.world.item.crafting.Ingredient> ingredients, int longestIngredientSize)
    Combines the ingredients, returning the first matching stack of each, then the second stack of each, etc.

    Methods inherited from class java.lang.Object

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

    • PatchouliUtils

      public PatchouliUtils()
  • Method Details

    • getRecipe

      public static <T extends net.minecraft.world.item.crafting.Recipe<C>, C extends net.minecraft.world.Container> T getRecipe(net.minecraft.world.item.crafting.RecipeType<T> type, net.minecraft.resources.ResourceLocation id)
    • interweaveIngredients

      public static vazkii.patchouli.api.IVariable interweaveIngredients(List<net.minecraft.world.item.crafting.Ingredient> ingredients, int longestIngredientSize)
      Combines the ingredients, returning the first matching stack of each, then the second stack of each, etc. looping back ingredients that run out of matched stacks, until the ingredients reach the length of the longest ingredient in the recipe set.
      Parameters:
      ingredients - List of ingredients in the specific slot
      longestIngredientSize - Longest ingredient in the entire recipe
      Returns:
      Serialized Patchouli ingredient string
    • interweaveIngredients

      public static vazkii.patchouli.api.IVariable interweaveIngredients(List<net.minecraft.world.item.crafting.Ingredient> ingredients)
      Overload of the method above that uses the provided list's longest ingredient size.