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(); Copy
const getEntityVariantComponent = entity.getComponent("variant");getEntityVariantComponent.value;getEntityVariantComponent.isValid();
Readonly
Identifier of the component.
Current value for variant for this entity, as specified via components.
This property can throw when used.
Static
Used to differentiate the component group of a variant of an entity from others. (e.g. ocelot, villager).
Example: getEntityVariantComponent.js