The component ids ItemStack.getComponent takes.
Enum in @minecraft/server
The component ids ItemStack.getComponent takes.
import { ItemComponentTypes } from '@minecraft/server';Example
Section titled “Example”import { ItemComponentTypes } from '@minecraft/server';
const value: ItemComponentTypes = ItemComponentTypes.Cooldown;console.log(value); // "minecraft:cooldown"import { ItemComponentTypes } from '@minecraft/server';
const value = ItemComponentTypes.Cooldown;console.log(value); // "minecraft:cooldown"Values
Section titled “Values”| Name | Value | Description |
|---|---|---|
Cooldown |
"minecraft:cooldown" |
|
Durability |
"minecraft:durability" |
|
Dyeable |
"minecraft:dyeable" |
|
Enchantable |
"minecraft:enchantable" |
|
Food |
"minecraft:food" |
|
Inventory |
"minecraft:inventory" |
|
Potion |
"minecraft:potion" |