PylonItem

open class PylonItem(val stack: ItemStack) : Keyed(source)

PylonItems are wrappers around ItemStacks that allow you to easily add extra functionality.

Unlike PylonBlock and PylonEntity, PylonItem isn't persisted in memory, so you should avoid storing any fields in your PylonItem classes. Instead, use the stack's PersistentDataContainer to store data persistently.

An implementation of PylonItem must have a constructor that takes an ItemStack as its only parameter. This will be used to load an in-world ItemStack as this particular PylonItem class.

Inheritors

Constructors

Link copied to clipboard
constructor(stack: ItemStack)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Additional data about the item's type.

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun getKey(): NamespacedKey
Link copied to clipboard

Returns the list of placeholders to be substituted into the item's lore.

Link copied to clipboard

Returns settings associated with the item.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun key(): @NotNull Key
Link copied to clipboard
open fun place(context: BlockCreateContext): PylonBlock?

Places the block associated with this item, if it exists.