RebarItem

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

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

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

An implementation of RebarItem 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 RebarItem 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
open override val key: NamespacedKey
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 fun key(): @NotNull Key
Link copied to clipboard
open fun place(context: BlockCreateContext): RebarBlock

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

Link copied to clipboard
open fun prePlace(context: BlockCreateContext): Boolean

Checks if the block associated with this item can be placed in the given context.