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

    Class EntityVariantComponent

    import { world } from "@minecraft/server";

    for (const entity of world.getDimension("overworld").getEntities()) {
    const variant = entity.getComponent("variant");
    if (!variant) continue;
    variant.value;
    variant.isValid;
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    Properties

    entity: Entity

    This property can throw errors.

    InvalidEntityError

    This property can't be read in early-execution mode.

    isValid: boolean
    typeId: string
    value: number

    This property can throw errors.

    This property can't be read in early-execution mode.