Class RecipeUtils

java.lang.Object
com.portingdeadmods.portingdeadlibs.utils.RecipeUtils

public final class RecipeUtils extends Object
  • Constructor Details

    • RecipeUtils

      public RecipeUtils()
  • Method Details

    • compareItems

      public static boolean compareItems(List<net.minecraft.world.item.ItemStack> inputs, List<IngredientWithCount> ingredients)
      This compares two lists of items/ingredients. It does not care about the order of these.
    • ingredientsToIWC

      public static List<IngredientWithCount> ingredientsToIWC(Collection<net.minecraft.world.item.crafting.Ingredient> ingredients)
    • iWCToIngredients

      public static List<net.minecraft.world.item.crafting.Ingredient> iWCToIngredients(Collection<IngredientWithCount> ingredientsWithCount)
    • iWCToIngredientsSaveCount

      public static List<net.minecraft.world.item.crafting.Ingredient> iWCToIngredientsSaveCount(Collection<IngredientWithCount> ingredientsWithCount)
    • newRecipeType

      public static <T extends PDLRecipe<?>> net.minecraft.world.item.crafting.RecipeType<T> newRecipeType(String name)
    • newRecipeSerializer

      public static <T extends PDLRecipe<?>> net.minecraft.world.item.crafting.RecipeSerializer<T> newRecipeSerializer(com.mojang.serialization.MapCodec<T> mapCodec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,T> streamCodec)