Class RecipeUtils
java.lang.Object
com.portingdeadmods.portingdeadlibs.utils.RecipeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompareItems(List<net.minecraft.world.item.ItemStack> inputs, List<IngredientWithCount> ingredients) This compares two lists of items/ingredients.static List<IngredientWithCount> ingredientsToIWC(Collection<net.minecraft.world.item.crafting.Ingredient> ingredients) static List<net.minecraft.world.item.crafting.Ingredient> iWCToIngredients(Collection<IngredientWithCount> ingredientsWithCount) static List<net.minecraft.world.item.crafting.Ingredient> iWCToIngredientsSaveCount(Collection<IngredientWithCount> ingredientsWithCount) 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) static <T extends PDLRecipe<?>>
net.minecraft.world.item.crafting.RecipeType<T> newRecipeType(String name)
-
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
-
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)
-