Skip to content

API reference Obsidian.API.Crafting

TransmuteRecipe class

Turns an item into another, keeping its components (minecraft:crafting_transmute): one TransmuteRecipe.Input and TransmuteRecipe.MinMaterialCount to TransmuteRecipe.MaxMaterialCountTransmuteRecipe.Material items, anywhere in the grid, craft TransmuteRecipe.ResultCount of TransmuteRecipe.ResultItem, with TransmuteRecipe.ResultComponents set and TransmuteRecipe.RemovedResultComponents removed over the input's components. Vanilla dyes shulker boxes and bundles, and clones maps, with it.

public sealed class TransmuteRecipe : ICraftingRecipe, IRecipe

In Obsidian.API.

Properties

AddMaterialCountToResult

public bool AddMaterialCountToResult { get; init; }

Whether each material item adds one to the result, as each blank map makes a copy.

public required CraftingBookCategory Category { get; init; }public string Group { get; init; }public required string Identifier { get; init; }

Input

public required Ingredient Input { get; init; }

The item transmuted, whose components the result keeps.

Material

public required Ingredient Material { get; init; }

The items it's transmuted with.

MaxMaterialCount

public required int MaxMaterialCount { get; init; }

The most material items the recipe takes, up to 8.

MinMaterialCount

public required int MinMaterialCount { get; init; }

The fewest material items the recipe takes, from 1.

RemovedResultComponents

public IReadOnlyList<DataComponentType> RemovedResultComponents { get; init; }

The components the result removes, the input's or its item's.

ResultComponents

public IReadOnlyList<DataComponent> ResultComponents { get; init; }

The components the result sets, replacing the input's of the same types.

ResultCount

public required int ResultCount { get; init; }

How many are crafted, before TransmuteRecipe.AddMaterialCountToResult adds to it.

ResultItem

public Item ResultItem { get; init; }

The item crafted, or null for the input's own item (map cloning).

public required CraftingType Type { get; init; }

On this page