of

fun of(members: Set<CoordinateComponent>, min: Int, name: String = UUID.randomUUID().toString()): GroupRecipe.Context

Creates a Context with validations.

// Example
val items = mapOf(
CoordinateComponent(0, 0) to CMatterImpl.of(Material.STONE)
)

val context = GroupRecipe.Context.of(
members = items.keys,
min = 1
)
// Context:
// members: CoordinateComponent(0, 0)
// min: 1
// name: <Random UUID>

Return

GroupRecipe.Context GroupRecipe.Context

Since

5.0.15

Parameters

members

Contained members. A set of coordinate in a recipe.

min

Minimum amount of item placements

name

Name of this context. Default value is a random UUID

Throws

If members is empty or min is lesser than 0