타입은 ObjectValue<LivingEntity>입니다.
| Name | Description | Usage | Must be called on |
|---|---|---|---|
uuid(): String | 엔티티의 UUID를 반환합니다. | v.entity.uuid() | |
damage(amount: Double) | amount만큼 피해를 줍니다. 피해 타입은 generic입니다. | v.entity.damage(5) | |
walk_to(x: Double, y: Double, z: Double, speedMultiplier: Double?) | 엔티티가 PathfinderMob이면 해당 몹의 목표 위치를 x, y, z로 바꿉니다. speedMultiplier의 기본값은 0.35입니다. | v.entity.walk_to(0, 0, 0) | |
has_walk_target(): Double | 엔티티가 PathfinderMob이고 이동 목표가 있거나 현재 경로 탐색 중이면 1.0을 반환합니다. 그렇지 않으면 0.0을 반환합니다. | v.entity.has_walk_target() | |
is_sneaking(): Double | 1.0을 반환합니다: the entity is sneaking. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_sneaking() | |
is_sprinting(): Double | 1.0을 반환합니다: the entity is sprinting. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_sprinting() | |
is_flying(): Double | 1.0을 반환합니다: the entity is flying. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_flying() | |
is_in_water(): Double | 1.0을 반환합니다: the entity is in water. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_in_water() | |
is_touching_water_or_rain(): Double | 1.0을 반환합니다: the entity is touching water or rain. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_touching_water_or_rain() | |
is_touching_water(): Double | 1.0을 반환합니다: the entity is touching water. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_touching_water() | |
is_underwater(): Double | 1.0을 반환합니다: the entity is underwater. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_under_water() | |
is_in_lava(): Double | 1.0을 반환합니다: the entity is in lava. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_in_lava() | |
is_on_fire(): Double | 1.0을 반환합니다: the entity is on fire. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_on_fire() | |
is_invisible(): Double | 1.0을 반환합니다: the entity is invisible. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_invisible() | |
is_sleeping(): Double | 1.0을 반환합니다: the entity is sleeping. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_sleeping() | |
is_riding(): Double | 1.0을 반환합니다: the entity is riding. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_riding() | |
health(): Double | 엔티티의 현재 체력을 반환합니다. | v.entity.health() | |
distance_to_pos(x: Double, y: Double, z: Double): Double | 엔티티에서 x, y, z 위치까지의 거리를 반환합니다. 피타고라스입니다. | v.entity.distance_to_pos(0, 0, 0) | |
max_health(): Double | 엔티티의 최대 체력을 반환합니다. | v.entity.max_health() | |
name(): String | 엔티티의 이름을 반환합니다. | v.entity.name() | |
type(): MoValue | 등록되어 있다면 엔티티의 타입을 문자열로 반환합니다. 그렇지 않으면 0.0을 반환합니다. | v.entity.type() | |
yaw(): Double | 엔티티의 yaw 값을 반환합니다. | v.entity.yaw() | |
pitch(): Double | 엔티티의 pitch 값을 반환합니다. | v.entity.pitch() | |
x(): Double | 엔티티의 x 위치를 반환합니다. | v.entity.x() | |
y(): Double | 엔티티의 y 위치를 반환합니다. | v.entity.y() | |
z(): Double | 엔티티의 z 위치를 반환합니다. | v.entity.z() | |
velocity_x(): Double | 엔티티의 x 속도를 반환합니다. | v.entity.velocity_x() | |
velocity_y(): Double | 엔티티의 y 속도를 반환합니다. | v.entity.velocity_y() | |
velocity_z(): Double | 엔티티의 z 속도를 반환합니다. | v.entity.velocity_z() | |
width(): Double | 엔티티의 너비를 반환합니다. | v.entity.width() | |
height(): Double | 엔티티의 높이를 반환합니다. | v.entity.height() | |
entity_size(): Double | 엔티티의 x 크기와 y 크기 중 더 큰 값을 반환합니다. | v.entity.entity_size() | |
entity_width(): Double | 엔티티의 너비를 반환합니다. | v.entity.entity_width() | |
entity_height(): Double | 엔티티의 높이를 반환합니다. | v.entity.entity_height() | |
id_modulo(modValue: Double): Double | 엔티티 UUID를 modValue로 나눈 나머지 값을 반환합니다. | v.entity.id_modulo(32) | |
horizontal_velocity(): Double | 엔티티의 수평 속도를 반환합니다. | v.entity.horizontal_velocity() | |
vertical_velocity(): Double | 엔티티의 수직 속도를 반환합니다. | v.entity.vertical_velocity() | |
world(): ObjectValue<Holder<Level>> | 엔티티가 있는 월드를 ObjectValue<Holder<Level>>로 반환합니다. | v.entity.world() | |
biome(): ObjectValue<Holder<Biome>> | 엔티티가 있는 바이옴을 ObjectValue<Holder<Biome>>로 반환합니다. | v.entity.biome() | |
is_passenger(): Double | 1.0을 반환합니다: the entity is invisible. 그렇지 않으면 0.0을 반환합니다. | v.entity.is_passenger() | |
is_healer_in_use(position: ArrayStruct<Int>): Double | position 위치의 회복 장치이 사용 중인지 반환합니다. 엔티티의 레벨을 사용하며 1.0을 반환합니다. | v.entity.is_healer_in_use(0, 0, 0) | |
find_nearby_block(identifier: String, range: Double?): MoValue | 엔티티를 중심으로 한 크기 range의 정육면체 안에서 블록을 찾습니다. 기본값은 10이며, 식별자의 기본 네임스페이스는 minecraft입니다. 블록을 찾지 못하면 0.0을, 찾으면 블록 위치의 ArrayStruct<Int>를 반환합니다. | v.entity.find_nearby_block('cobblemon:restoration_tank') | |
get_nearby_entities(distance: Double): ArrayStruct<MoValue> | 엔티티를 중심으로 한 크기 distance의 정육면체 안에서 엔티티를 가져옵니다. ObjectValue<Player>, ObjectValue<NPCEntity>, ObjectValue<LivingEntity>처럼 가능한 한 가장 구체적인 타입의 ArrayStruct를 반환합니다. | v.entity.get_nearby_entities(10) | |
is_standing_on_blocks(depth: Int, blocks, ResourceLocation...): Double | 엔티티가 제공된 blocks 중 하나 위에 서 있으면 함수가 1.0을 반환하고, 그렇지 않으면 0.0을 반환합니다. | v.entity.is_standing_on_blocks(2, 'dirt', 'cobblemon:apricorn_log') | |
play_animation(animation: String, target: String?): DoubleValue | animation 이름의 애니메이션을 엔티티에서 재생합니다. target을 지정하지 않았거나 null이면 주변의 모든 엔티티가 애니메이션 패킷을 받습니다. target이 플레이어 이름 또는 UUID이면 해당 플레이어에게만 패킷을 보냅니다. 패킷이 전송되면 1.0을, 그렇지 않으면 0.0을 반환합니다. | v.entity.play_animation('sleep') | PoseableEntities |
spawn_bedrock_particles(effect: String, locator: String, player: MoValue?) | effect와 locator 리소스의 Bedrock 파티클을 엔티티 주변 플레이어 또는 player에게만 보냅니다. player는 UUID 또는 ObjectValue<Player>일 수 있습니다. 포즈를 취할 수 없는 엔티티에서 사용하지 않더라도 locator는 필요합니다. | q.entity.spawn_bedrock_particles('cobblemon:cherry_leaves_particle', 'middle') |