Skip to content

API reference Obsidian.API.Crafting

PotionIngredient record

One side of a BrewingRecipe (vanilla's PotionIngredient): one of PotionIngredient.Items, holding one of PotionIngredient.Potions when that's set.

public sealed record PotionIngredient : IEquatable<PotionIngredient>

In Obsidian.API.

Constructors

PotionIngredient(Ingredient, IReadOnlyList<Potion>)

public PotionIngredient(Ingredient Items, IReadOnlyList<Potion> Potions);

One side of a BrewingRecipe (vanilla's PotionIngredient): one of PotionIngredient.Items, holding one of PotionIngredient.Potions when that's set.

Parameters

Items
The items that match.
Potions
The potions a matching item holds, or null to match any item of Items.

Properties

Items

public Ingredient Items { get; init; }

The items that match.

Potions

public IReadOnlyList<Potion> Potions { get; init; }

The potions a matching item holds, or null to match any item of Items.

Methods

Matches(ItemStack)

public bool Matches(ItemStack item);

Whether item matches: it's one of the items, and holds one of the potions when they're set. Only the item and its potion count, not its other components.

On this page