NovaItemBuilder

A builder for NovaItem.

Properties

Link copied to clipboard
abstract val entry: RegistryEntry.Paper<ItemType>

The entry of the element being built.

Functions

Link copied to clipboard
abstract fun behaviors(vararg itemBehaviors: ItemBehaviorHolder)

Adds to the behaviors of this item to itemBehaviors.

Link copied to clipboard
abstract fun block(block: RegistryEntry.Paper<BlockType>)

Sets the block of this NovaItem, making it placeable.

Link copied to clipboard
abstract fun config(name: String)

Configures the name of the config file in this addon's namespace.

Link copied to clipboard
open fun craftingRemainingItem(item: TypedKey<ItemType>)
abstract fun craftingRemainingItem(item: RegistryEntry.Paper<ItemType>)

Sets the crafting remaining item to item.

Link copied to clipboard
abstract fun hidden(hidden: Boolean)

Configures whether the item is hidden from the give and similar commands. Hidden items also do not have advanced tooltips (/nova advancedTooltips).

Link copied to clipboard
open fun localizedName(localizedName: String)

Sets the localization key.

Link copied to clipboard
abstract fun lore(vararg lines: Component)

Adds lore lines (tooltip) to the item.

Link copied to clipboard
abstract fun maxStackSize(maxStackSize: Int)

Sets the maximum stack size of the item. Cannot exceed the maximum client-side stack size.

Link copied to clipboard
abstract fun modelDefinition(itemModelDefinition: ItemModelDefinitionBuilder<ItemModelSelectorScope>.() -> Unit)

Configures the item model definition of the item.

Link copied to clipboard
open override fun name(name: Component)

Sets the name.

abstract fun name(name: Component?)

Sets the name of the item. Can be set to null to completely hide the tooltip.

Link copied to clipboard
abstract fun rawConfig(id: String)
open fun rawConfig(id: Key)

Configures the id of this config file in the format namespace:name.

Link copied to clipboard
abstract fun style(style: Style)
open fun style(color: TextColor)
open fun style(decoration: TextDecoration)
open fun style(vararg decorations: TextDecoration)
open fun style(color: TextColor, vararg decorations: TextDecoration)

Sets the style of the name.

Link copied to clipboard
abstract fun tags(vararg tags: RegistryEntrySet.Paper.Tag<ItemType>)

Adds the entry of the element being build to the given tags.

Link copied to clipboard
abstract fun tooltipStyle(tooltipStyle: RegistryEntry.Nova<TooltipStyle>)

Sets the tooltip style of the item.