import { world } from "@minecraft/server";world.afterEvents.entitySpawn.subscribe(({ entity }) => { const markVariant = entity.getComponent("mark_variant"); markVariant.value; markVariant.isValid;}); Copy
import { world } from "@minecraft/server";world.afterEvents.entitySpawn.subscribe(({ entity }) => { const markVariant = entity.getComponent("mark_variant"); markVariant.value; markVariant.isValid;});
Private
Readonly
This property can throw errors.
InvalidEntityError
This property can't be read in early-execution mode.
Example: entityMarkVariant.js