ItemAndComponents

data class ItemAndComponents @JvmOverloads constructor(val item: Item, val componentsPatch: DataComponentPatch = DataComponentPatch.EMPTY) : TypedInstance<Item> , Record

Represents the "id" of ItemStack. ItemStacks with same Item and DataComponentPatch can be merged.

Constructors

Link copied to clipboard
constructor(item: Item, componentsPatch: DataComponentPatch = DataComponentPatch.EMPTY)
constructor(itemStack: ItemStack)

Properties

Link copied to clipboard
val componentsPatch: DataComponentPatch
Link copied to clipboard
val TypedInstance<Item>.isAxe: Boolean
Link copied to clipboard
val TypedInstance<Item>.isBundle: Boolean
Link copied to clipboard
val TypedInstance<Item>.isChestArmor: Boolean
Link copied to clipboard
val TypedInstance<Item>.isFootArmor: Boolean
Link copied to clipboard
val TypedInstance<Item>.isHeadArmor: Boolean
Link copied to clipboard
val TypedInstance<Item>.isHoe: Boolean
Link copied to clipboard
val TypedInstance<Item>.isLegArmor: Boolean
Link copied to clipboard
val TypedInstance<Item>.isMiningTool: Boolean

Replacement of 1.21.4 MiningToolItem

Link copied to clipboard
val TypedInstance<Item>.isPickaxe: Boolean
Link copied to clipboard
val TypedInstance<Item>.isPlayerArmor: Boolean
Link copied to clipboard
val TypedInstance<Item>.isShovel: Boolean
Link copied to clipboard
val TypedInstance<Item>.isSpear: Boolean
Link copied to clipboard
val TypedInstance<Item>.isSword: Boolean
Link copied to clipboard
val item: Item

Functions

Link copied to clipboard
open fun is(rawType: Item?): Boolean
open fun is(set: HolderSet<Item?>?): Boolean
open fun is(type: Holder<Item?>?): Boolean
open fun is(type: ResourceKey<Item?>?): Boolean
open fun is(tag: TagKey<Item?>?): Boolean
Link copied to clipboard
open fun tags(): Stream<TagKey<Item?>?>?
Link copied to clipboard
fun toItemStack(count: Int): ItemStack
Link copied to clipboard
open override fun typeHolder(): Holder<Item>