Skip to content
BasaltSoftware
Bedrock 1.26.60

Site colour

Discord
Esc

    ↑↓ moveEnter openEsc close

    Keyboard shortcuts
    Ctrl K
    Search the whole site, from any page
    /
    Jump to the sidebar search, or search the whole site where there isn't one
    Enter
    Open the top search result
    Esc
    Clear the search, or close this panel
    ?
    Show these shortcuts
    Item components

    ItemDyeableComponent

    Class in @minecraft/server

    Extends ItemComponent

    A leather item’s dye.

    import { ItemDyeableComponent } from '@minecraft/server';
    import { ItemStack, type ItemDyeableComponent } from '@minecraft/server';
    const item = new ItemStack('minecraft:diamond_sword');
    const component: ItemDyeableComponent | undefined = item.getComponent('minecraft:dyeable');
    if (component) {
    console.log(item.typeId, component.typeId);
    }
    import { ItemStack } from '@minecraft/server';
    const item = new ItemStack('minecraft:diamond_sword');
    const component = item.getComponent('minecraft:dyeable');
    if (component) {
    console.log(item.typeId, component.typeId);
    }

    static read-only

    static readonly componentId = "minecraft:dyeable";

    optional

    color?: RGB;

    The dye on the item, or undefined for none. Setting it changes the stack; undefined washes it off.

    Types

    read-only optional

    readonly defaultColor?: RGB;

    The colour of undyed leather.

    Types

    ItemComponentTypeMap.dyeable, ItemComponentTypeMap.minecraft:dyeable

    From ItemComponent: typeId, isValid