ItemDefinition

An item definition, defining a model for an item.

Constructors

Link copied to clipboard
constructor(item: Key, type: ItemDefinitionType)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var key: Key

The key of this item.

Link copied to clipboard

The definition type.

Functions

Link copied to clipboard
open override fun save(pack: ResourcePack)

Saves this element to a resource pack.

Link copied to clipboard
open fun validate(pack: ResourcePack): Result<Unit>

Validates this element and returns a Result of type Unit, with an optional exception extending ResourcePackValidationException. This API will probably be improved in the future.