Table of Contents

Class MixIngredientItemCreator

Namespace
S1API.Items.Ingredient
Assembly
S1API.dll

Provides convenient static methods for creating custom mixing ingredients. Use CreateBuilder() for creating ingredients from scratch, or CloneFrom(string) for variants.

public static class MixIngredientItemCreator
Inheritance
MixIngredientItemCreator
Inherited Members

Methods

CloneFrom(MixIngredientDefinition)

Creates a new ingredient builder by cloning an existing ingredient wrapper.

public static MixIngredientDefinitionBuilder CloneFrom(MixIngredientDefinition source)

Parameters

source MixIngredientDefinition

The ingredient definition to clone from.

Returns

MixIngredientDefinitionBuilder

A builder pre-configured with the source ingredient's properties.

Exceptions

ArgumentNullException

Thrown if the source is null.

CloneFrom(string)

Creates a new ingredient builder by cloning an existing mixing ingredient by ID.

public static MixIngredientDefinitionBuilder CloneFrom(string sourceItemId)

Parameters

sourceItemId string

The ID of the ingredient to clone.

Returns

MixIngredientDefinitionBuilder

A builder pre-configured with the source ingredient's properties.

Exceptions

ArgumentException

Thrown if the source item does not exist or is not a mixing ingredient.

CreateBuilder()

Creates a new builder for composing a mixing ingredient definition with full flexibility. Use fluent methods to configure the ingredient, then call Build() to register it.

public static MixIngredientDefinitionBuilder CreateBuilder()

Returns

MixIngredientDefinitionBuilder

A new MixIngredientDefinitionBuilder instance for fluent configuration.