API reference Obsidian.API.Crafting
IRecipeSerializer<TRecipe> interface
Reads and matches a plugin's machine recipes. Implementations and their values go on unload.
public interface IRecipeSerializer<TRecipe> where TRecipe : class
In Obsidian.API.
Methods
Matches(TRecipe, IReadOnlyList<ItemStack>)
bool Matches(TRecipe recipe, IReadOnlyList<ItemStack> inputs);Tests inputs without changing them or the recipe; null slots are empty.
Read(string, JsonElement)
TRecipe Read(string identifier, JsonElement json);Reads one recipe file. Return an immutable value owned by the recipe set.
Parameters
identifier- The recipe identifier derived from its file path.
json- The complete recipe object, including type. Retained elements must be cloned.