Script API - v1.20.10
    Preparing search index...

    Used to differentiate the component group of a variant of an entity from others. (e.g. ocelot, villager).

    const getEntityVariantComponent = entity.getComponent("variant");
    getEntityVariantComponent.value;
    getEntityVariantComponent.isValid();

    Hierarchy (View Summary)

    Index

    Properties

    typeId: string

    Identifier of the component.

    value: number

    Current value for variant for this entity, as specified via components.

    This property can throw when used.

    componentId: "minecraft:variant" = 'minecraft:variant'