Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / ItemState

Interface: ItemState โ€‹

Defined in: core/values/item/state.ts:10

The settings behind an ItemValue.

Properties โ€‹

canPlaceOn โ€‹

canPlaceOn: string[]

Defined in: core/values/item/state.ts:19


consumable? โ€‹

optional consumable?: Consumable

Defined in: core/values/item/state.ts:32


container? โ€‹

optional container?: [number, ItemValue][]

Defined in: core/values/item/state.ts:25

container contents as [slot, item] pairs.


count? โ€‹

optional count?: number

Defined in: core/values/item/state.ts:12


customModelData? โ€‹

optional customModelData?: number

Defined in: core/values/item/state.ts:15


customName? โ€‹

optional customName?: TextComponent

Defined in: core/values/item/state.ts:13


enchantments โ€‹

enchantments: [string | CommandValue, number][]

Defined in: core/values/item/state.ts:17


extraComponents โ€‹

extraComponents: object[]

Defined in: core/values/item/state.ts:34

Raw components: value is raw SNBT, a value, or items as a stack-NBT list.

json? โ€‹

optional json?: unknown

key? โ€‹

optional key?: string

name โ€‹

name: string

value โ€‹

value: string | CommandValue | LoweredValue | ItemValue[]


hiddenTooltips โ€‹

hiddenTooltips: string[]

Defined in: core/values/item/state.ts:21

Components named in tooltip_display.hidden_components.


hideWholeTooltip? โ€‹

optional hideWholeTooltip?: boolean

Defined in: core/values/item/state.ts:23

tooltip_display.hide_tooltip: no tooltip at all.


id โ€‹

id: string

Defined in: core/values/item/state.ts:11


itemModel? โ€‹

optional itemModel?: string | ModelRef

Defined in: core/values/item/state.ts:16


itemName? โ€‹

optional itemName?: TextComponent

Defined in: core/values/item/state.ts:14


lore โ€‹

lore: TextComponent[]

Defined in: core/values/item/state.ts:18


matchByData? โ€‹

optional matchByData?: boolean

Defined in: core/values/item/state.ts:44

Predicates test only the id and custom_data.


present โ€‹

present: string[]

Defined in: core/values/item/state.ts:42

Components an item predicate requires present, whatever their value.


removed โ€‹

removed: string[]

Defined in: core/values/item/state.ts:48

Component ids (minecraft:x) the stack drops, written !minecraft:x.


subPredicates โ€‹

subPredicates: object[]

Defined in: core/values/item/state.ts:40

json โ€‹

json: unknown

type โ€‹

type: string


vanilla โ€‹

vanilla: object[]

Defined in: core/values/item/state.ts:46

Components set with .set(id, value), typed from vanilla-mcdoc.

id โ€‹

id: string

value โ€‹

value: unknown


writtenBook? โ€‹

optional writtenBook?: object

Defined in: core/values/item/state.ts:26

author โ€‹

author: string

generation? โ€‹

optional generation?: 0 | 2 | 1 | 3

pages โ€‹

pages: (string | TellrawPart | TellrawPart[])[]

title โ€‹

title: string

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.