of

fun of(vararg materials: Material): CMatterImpl

Returns CMatterImpl build from specified materials.

// below 2 matters are same
val matter = CMatterImpl.of(Material.STONE, Material.COBBLESTONE)

val matter = CMatterImpl(
name = "STONE-COBBLESTONE",
candidate = setOf(Material.STONE, Material.COBBLESTONE),
amount = 1,
anyAmount = false,
predicates = defaultMatterPredicates()
)

Return

CMatterImpl Built matter

Parameters

materials

Candidate materials

Throws

Throws when materials is empty or contains invalid material