The item type that the components are for.
Readonly
[toReadonly
componentsThe component definitions of the item type.
Protected
Readonly
itemThe type of item that the components are for.
The name of the nbt tag.
Readonly
sizeReadonly
typeThe nbt tag type of the data type.
Static
Readonly
[species]Returns an iterable of entries in the map.
Adds a new component to the item type.
The component instance.
true if an element in the Map existed and has been removed, or false if the element does not exist.
Returns an iterable of key, value pairs for every entry in the map.
Executes a provided function once per each key/value pair in the Map, in insertion order.
Optional
thisArg: anyGet a nbt tag by its key.
The key of the tag to retrieve.
The tag associated with the key, or undefined if not found.
Get all the components of the item type.
All the components of the item type.
Get the block placer component of the item type.
The block placer component of the item type.
Get whether the item type can destroy blocks in creative mode.
Whether the item type can destroy blocks in creative mode.
Gets the component from the item type.
The identifier of the component.
The component instance.
Get the cooldown component of the item type.
The cooldown component of the item type.
Get the digger component of the item type.
The digger component of the item type.
Get the display name of the item type.
The display name of the item type.
Get the food component of the item type.
The food component of the item type.
Get the hand equipped component of the item type.
The hand equipped component of the item type.
Get the max stack size of the item type.
The max stack size of the item type.
Get the use modifiers component of the item type.
The use modifiers component of the item type.
Get the wearable component of the item type.
The wearable component of the item type.
boolean indicating whether an element with the specified key exists or not.
Check if the item type has a block placer component.
Whether the item type has a block placer component.
Check if the item type has a can destroy in creative component.
Whether the item type has a can destroy in creative component.
Checks if the item type has a component.
The component to check.
True if the item type has the component, false otherwise.
Check if the item type has a cooldown component.
Whether the item type has a cooldown component.
Check if the item type has a digger component.
Whether the item type has a digger component.
Check if the item type has a display name component.
Whether the item type has a display name component.
Check if the item type has a food component.
Whether the item type has a food component.
Check if the item type has a hand equipped component.
Whether the item type has a hand equipped component.
Check if the item type has an icon component.
Whether the item type has an icon component.
Check if the item type has a max stack size component.
Whether the item type has a max stack size component.
Check if the item type has a use modifiers component.
Whether the item type has a use modifiers component.
Check if the item type has a wearable component.
Whether the item type has a wearable component.
Returns an iterable of keys in the map
Add multiple tags to the compound tag.
An array of tags to add.
The current instance for method chaining.
Removes a component from the item type.
The component to remove.
Set a nbt tag with a specific key.
The key to associate with the tag.
The tag to set.
The current instance for method chaining.
Set the block placer component of the item type.
Optional
options: Partial<ItemTypeBlockPlacerComponentOptions>Set whether the item type can destroy blocks in creative mode.
The can destroy in creative value.
Set the cooldown component of the item type.
Optional
options: Partial<ItemTypeCooldownComponentOptions>The options of the cooldown component.
Set the digger component of the item type.
Optional
options: Partial<ItemTypeDiggerComponentOptions>The options of the digger component.
Set the display name of the item type.
The display name value.
Set the food component of the item type.
Optional
options: Partial<ItemTypeFoodComponentOptions>The options of the food component.
Set the hand equipped component of the item type.
The hand equipped value.
Set the icon of the item type.
Optional
options: Partial<ItemTypeIconComponentOptions>Set the max stack size of the item type.
The max stack size value.
Set the use modifiers component of the item type.
Optional
options: Partial<ItemTypeUseModifiersComponentOptions>The options of the use modifiers component.
Set the wearable component of the item type.
Optional
options: Partial<ItemTypeWearableComponentOptions>The options of the wearable component.
Convert the tag to a JSON object.
Returns an iterable of values in the map
Static
groupStatic
readRead the nbt tag from the stream.
The binary stream to read from.
Optional
options: ReadWriteOptionsThe options for reading the tag.
Static
writeWrite the nbt tag to the stream.
The binary stream to write to.
The value of the tag to write.
Optional
options: ReadWriteOptionsThe options for writing the tag.
Create a new item component collection.