Class RecipeUtils
java.lang.Object
vazkii.botania.common.crafting.recipe.RecipeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getRemainingItemsSub(net.minecraft.world.item.crafting.RecipeInput inv, Function<net.minecraft.world.item.ItemStack, 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'sstatic booleanmatches(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 ininputsis satisfied byinv.static @NotNull net.minecraft.world.item.crafting.Recipe<?> recipeFromNetwork(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buffer) static voidrecipeToNetwork(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buffer, net.minecraft.world.item.crafting.Recipe<?> recipe)
-
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 ininputsis satisfied byinv. Optionally, the slots from the inventory used to fulfill the inputs are placed intousedSlots. -
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, 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
@NotNull public static @NotNull net.minecraft.world.item.crafting.Recipe<?> recipeFromNetwork(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buffer) -
recipeToNetwork
public static void recipeToNetwork(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buffer, net.minecraft.world.item.crafting.Recipe<?> recipe)
-