Skip to content

Zig: Actors

Entity

Zig
1
2
3
4
pub const Entity = struct {
    actor_id: i64,
    // ...
};

One actor, named by its unique id, the uid of event payloads.

Entity.of

Zig
pub fn of(actor_id_value: i64) Entity
  • Parameters:
    • actor_id_value : i64
  • Return type: Entity

Entity.posX

Zig
pub fn posX(self: Entity) core.Error!f64

PIER_APROP_POS_X: (G) Actor::getPosition().x (feet: getFeetPos for players; POS_* uses getPosition)

Entity.posY

Zig
pub fn posY(self: Entity) core.Error!f64

PIER_APROP_POS_Y: (G)

Entity.posZ

Zig
pub fn posZ(self: Entity) core.Error!f64

PIER_APROP_POS_Z: (G)

Entity.rotPitch

Zig
pub fn rotPitch(self: Entity) core.Error!f64

PIER_APROP_ROT_PITCH: (G) Actor::getRotation().x

Entity.rotYaw

Zig
pub fn rotYaw(self: Entity) core.Error!f64

PIER_APROP_ROT_YAW: (G) Actor::getRotation().y

Entity.dimension

Zig
pub fn dimension(self: Entity) core.Error!f64

PIER_APROP_DIMENSION: (G) Actor::getDimensionId

Entity.health

Zig
pub fn health(self: Entity) core.Error!f64

PIER_APROP_HEALTH: (G) Actor::getHealth; heal/hurt via actions

Entity.maxHealth

Zig
pub fn maxHealth(self: Entity) core.Error!f64

PIER_APROP_MAX_HEALTH: (G) Actor::getMaxHealth

Entity.isAlive

Zig
pub fn isAlive(self: Entity) core.Error!bool

PIER_APROP_IS_ALIVE: (G) Actor::isAlive

Entity.isOnGround

Zig
pub fn isOnGround(self: Entity) core.Error!bool

PIER_APROP_IS_ON_GROUND: (G) Actor::isOnGround

Entity.isInWater

Zig
pub fn isInWater(self: Entity) core.Error!bool

PIER_APROP_IS_IN_WATER: (G) Actor::isInWater

Entity.isInLava

Zig
pub fn isInLava(self: Entity) core.Error!bool

PIER_APROP_IS_IN_LAVA: (G) Actor::isInLava

Entity.isOnFire

Zig
pub fn isOnFire(self: Entity) core.Error!bool

PIER_APROP_IS_ON_FIRE: (G) Actor::isOnFire

Entity.isInvisible

Zig
pub fn isInvisible(self: Entity) core.Error!bool

PIER_APROP_IS_INVISIBLE: (G) Actor::isInvisible

Entity.isSneaking

Zig
pub fn isSneaking(self: Entity) core.Error!bool

PIER_APROP_IS_SNEAKING: (G) Actor::isSneaking

Entity.isBaby

Zig
pub fn isBaby(self: Entity) core.Error!bool

PIER_APROP_IS_BABY: (G) Actor::isBaby

Entity.isRiding

Zig
pub fn isRiding(self: Entity) core.Error!bool

PIER_APROP_IS_RIDING: (G) Actor::isRiding

Entity.isTame

Zig
pub fn isTame(self: Entity) core.Error!bool

PIER_APROP_IS_TAME: (G) Actor::isTame

Entity.speed

Zig
pub fn speed(self: Entity) core.Error!f64

PIER_APROP_SPEED: (G) Actor::getSpeedInMetersPerSecond

Entity.viewX

Zig
pub fn viewX(self: Entity) core.Error!f64

PIER_APROP_VIEW_X: (G) Actor::getViewVector().x

Entity.viewY

Zig
pub fn viewY(self: Entity) core.Error!f64

PIER_APROP_VIEW_Y: (G) Actor::getViewVector().y

Entity.viewZ

Zig
pub fn viewZ(self: Entity) core.Error!f64

PIER_APROP_VIEW_Z: (G) Actor::getViewVector().z

Entity.velX

Zig
pub fn velX(self: Entity) core.Error!f64

PIER_APROP_VEL_X: (G) Actor::getVelocity().x

Entity.velY

Zig
pub fn velY(self: Entity) core.Error!f64

PIER_APROP_VEL_Y: (G) Actor::getVelocity().y

Entity.velZ

Zig
pub fn velZ(self: Entity) core.Error!f64

PIER_APROP_VEL_Z: (G) Actor::getVelocity().z

Entity.headX

Zig
pub fn headX(self: Entity) core.Error!f64

PIER_APROP_HEAD_X: (G) Actor::getHeadPos().x

Entity.headY

Zig
pub fn headY(self: Entity) core.Error!f64

PIER_APROP_HEAD_Y: (G) Actor::getHeadPos().y

Entity.headZ

Zig
pub fn headZ(self: Entity) core.Error!f64

PIER_APROP_HEAD_Z: (G) Actor::getHeadPos().z

Entity.feetX

Zig
pub fn feetX(self: Entity) core.Error!f64

PIER_APROP_FEET_X: (G) Actor::getFeetPos().x

Entity.feetY

Zig
pub fn feetY(self: Entity) core.Error!f64

PIER_APROP_FEET_Y: (G) Actor::getFeetPos().y

Entity.feetZ

Zig
pub fn feetZ(self: Entity) core.Error!f64

PIER_APROP_FEET_Z: (G) Actor::getFeetPos().z

Entity.fallDistance

Zig
pub fn fallDistance(self: Entity) core.Error!f64

PIER_APROP_FALL_DISTANCE: (G) Actor::getFallDistance

Entity.isPersistent

Zig
pub fn isPersistent(self: Entity) core.Error!bool

PIER_APROP_IS_PERSISTENT: (G) Actor::isPersistent

Entity.isLeashed

Zig
pub fn isLeashed(self: Entity) core.Error!bool

PIER_APROP_IS_LEASHED: (G) Actor::isLeashed

Entity.isInvulnerable

Zig
pub fn isInvulnerable(self: Entity) core.Error!bool

PIER_APROP_IS_INVULNERABLE: (G) Actor::isInvulnerable

Entity.variant

Zig
pub fn variant(self: Entity) core.Error!f64

PIER_APROP_VARIANT: (G) Actor::getVariant

Entity.markVariant

Zig
pub fn markVariant(self: Entity) core.Error!f64

PIER_APROP_MARK_VARIANT: (G) Actor::getMarkVariant

Entity.scale

Zig
pub fn scale(self: Entity) core.Error!f64

PIER_APROP_SCALE: (G) Actor::getScaleFactor

Entity.brightness

Zig
pub fn brightness(self: Entity) core.Error!f64

PIER_APROP_BRIGHTNESS: (G) Actor::getBrightness

Entity.radius

Zig
pub fn radius(self: Entity) core.Error!f64

PIER_APROP_RADIUS: (G) Actor::getRadius

Entity.hasTotem

Zig
pub fn hasTotem(self: Entity) core.Error!bool

PIER_APROP_HAS_TOTEM: (G) Actor::hasTotemEquipped

Entity.isInRain

Zig
pub fn isInRain(self: Entity) core.Error!bool

PIER_APROP_IS_IN_RAIN: (G) Actor::isInRain

Entity.isInSnow

Zig
pub fn isInSnow(self: Entity) core.Error!bool

PIER_APROP_IS_IN_SNOW: (G) Actor::isInSnow

Entity.isInThunderstorm

Zig
pub fn isInThunderstorm(self: Entity) core.Error!bool

PIER_APROP_IS_IN_THUNDERSTORM: (G) Actor::isInThunderstorm

Entity.isFrozen

Zig
pub fn isFrozen(self: Entity) core.Error!bool

PIER_APROP_IS_FROZEN: (G) Actor::isFrozen

Entity.isInLove

Zig
pub fn isInLove(self: Entity) core.Error!bool

PIER_APROP_IS_IN_LOVE: (G) unsupported since BDS 1.26.40: Actor::isInLove is gone

Entity.deathTime

Zig
pub fn deathTime(self: Entity) core.Error!f64

PIER_APROP_DEATH_TIME: (G) Actor::getDeathTime

Entity.hasPassenger

Zig
pub fn hasPassenger(self: Entity) core.Error!bool

PIER_APROP_HAS_PASSENGER: (G) Actor::hasPassenger

Entity.isSprinting

Zig
pub fn isSprinting(self: Entity) core.Error!bool

PIER_APROP_IS_SPRINTING: Actor::isSprinting

Entity.isSwimming

Zig
pub fn isSwimming(self: Entity) core.Error!bool

PIER_APROP_IS_SWIMMING: Actor::isSwimming

Entity.isSleeping

Zig
pub fn isSleeping(self: Entity) core.Error!bool

PIER_APROP_IS_SLEEPING: Actor::isSleeping

Entity.isSitting

Zig
pub fn isSitting(self: Entity) core.Error!bool

PIER_APROP_IS_SITTING: Actor::isSitting

Entity.isAngry

Zig
pub fn isAngry(self: Entity) core.Error!bool

PIER_APROP_IS_ANGRY: Actor::isAngry

Entity.strength

Zig
pub fn strength(self: Entity) core.Error!f64

PIER_APROP_STRENGTH: Actor::getStrength

Entity.isPlayer

Zig
pub fn isPlayer(self: Entity) core.Error!bool

PIER_APROP_IS_PLAYER: Actor::isPlayer

Entity.isSimulatedPlayer

Zig
pub fn isSimulatedPlayer(self: Entity) core.Error!bool

PIER_APROP_IS_SIMULATED_PLAYER: Actor::isSimulatedPlayer

Entity.entityType

Zig
pub fn entityType(self: Entity) core.Error!f64

PIER_APROP_ENTITY_TYPE: Actor::getEntityTypeId, the bits of an entity entry of registry_list

Entity.canFly

Zig
pub fn canFly(self: Entity) core.Error!bool

PIER_APROP_CAN_FLY: Actor::canFly

Entity.typeName

Zig
pub fn typeName(self: Entity, allocator: std.mem.Allocator) core.Error![]u8

PIER_ASTR_TYPE_NAME: Actor::getTypeName

  • Parameters:
    • allocator : std.mem.Allocator
  • Return type: core.Error![]u8
  • Slots: actor_get_str

Entity.nameTag

Zig
pub fn nameTag(self: Entity, allocator: std.mem.Allocator) core.Error![]u8

PIER_ASTR_NAME_TAG: Actor::getNameTag

  • Parameters:
    • allocator : std.mem.Allocator
  • Return type: core.Error![]u8
  • Slots: actor_get_str

Entity.scoreTag

Zig
pub fn scoreTag(self: Entity, allocator: std.mem.Allocator) core.Error![]u8

PIER_ASTR_SCORE_TAG: Actor::getScoreTag

  • Parameters:
    • allocator : std.mem.Allocator
  • Return type: core.Error![]u8
  • Slots: actor_get_str

Entity.filteredName

Zig
pub fn filteredName(self: Entity, allocator: std.mem.Allocator) core.Error![]u8

PIER_ASTR_FILTERED_NAME: Actor::getFilteredNameTag

  • Parameters:
    • allocator : std.mem.Allocator
  • Return type: core.Error![]u8
  • Slots: actor_get_str

Entity.tags

Zig
pub fn tags(self: Entity, allocator: std.mem.Allocator) core.Error![]u8

PIER_ASTR_TAGS: Actor::getTags as a JSON array of strings

  • Parameters:
    • allocator : std.mem.Allocator
  • Return type: core.Error![]u8
  • Slots: actor_get_str

Entity.ownerId

Zig
pub fn ownerId(self: Entity, allocator: std.mem.Allocator) core.Error![]u8

PIER_ASTR_OWNER_ID: Actor::getOwnerId as a decimal actor id, -1 when it has none

  • Parameters:
    • allocator : std.mem.Allocator
  • Return type: core.Error![]u8
  • Slots: actor_get_str

Entity.kill

Zig
pub fn kill(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_KILL: Actor::kill

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.despawn

Zig
pub fn despawn(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_DESPAWN: Actor::despawn

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.heal

Zig
pub fn heal(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_HEAL: a=amount Actor::heal

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setOnFire

Zig
pub fn setOnFire(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_ON_FIRE: a=seconds Actor::setOnFire

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.teleport

Zig
pub fn teleport(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_TELEPORT: a,b,c=pos, sarg=dim ("0".."2") Actor::teleport

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setNameTag

Zig
pub fn setNameTag(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_NAME_TAG: sarg=name Actor::setNameTag

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.addTag

Zig
pub fn addTag(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_ADD_TAG: sarg=tag β†’ out "0"/"1" Actor::addTag

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.removeTag

Zig
pub fn removeTag(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_REMOVE_TAG: sarg=tag β†’ out "0"/"1" Actor::removeTag

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.hasTag

Zig
pub fn hasTag(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_HAS_TAG: sarg=tag β†’ out "0"/"1" Actor::hasTag

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.addEffect

Zig
pub fn addEffect(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_ADD_EFFECT: sarg=effect name, a=ticks, b=amplifier, c=visible(0/1) MobEffect::getByName + Actor::addEffect

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.removeEffect

Zig
pub fn removeEffect(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_REMOVE_EFFECT: sarg=effect name Actor::removeEffect(id)

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.clearEffects

Zig
pub fn clearEffects(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_CLEAR_EFFECTS: Actor::removeAllEffects

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.hurt

Zig
pub fn hurt(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_HURT: a=damage (generic damage source) Actor::hurt

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.attributeGet

Zig
pub fn attributeGet(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_ATTRIBUTE_GET: sarg=attribute name ("minecraft:health"…) β†’ out value

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setVariant

Zig
pub fn setVariant(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_VARIANT: a=variant Actor::setVariant

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setMarkVariant

Zig
pub fn setMarkVariant(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_MARK_VARIANT: a=variant Actor::setMarkVariant

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setPersistent

Zig
pub fn setPersistent(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_PERSISTENT: Actor::setPersistent

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setLeashHolder

Zig
pub fn setLeashHolder(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_LEASH_HOLDER: a=holder ActorUniqueID Actor::setLeashHolder

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setInvisible

Zig
pub fn setInvisible(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_INVISIBLE: a=0/1 Actor::setInvisible

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setSneaking

Zig
pub fn setSneaking(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_SNEAKING: a=0/1 Actor::setSneaking

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setNameTagVisible

Zig
pub fn setNameTagVisible(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_NAME_TAG_VISIBLE: a=0/1 Actor::setNameTagVisible

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setTarget

Zig
pub fn setTarget(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_TARGET: a=target ActorUniqueID Actor::setTarget

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setOwner

Zig
pub fn setOwner(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_OWNER: a=owner ActorUniqueID Actor::setOwner

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.burn

Zig
pub fn burn(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_BURN: a=damage Actor::burn

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.stopFire

Zig
pub fn stopFire(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_STOP_FIRE: Actor::extinguishFire

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setVelocity

Zig
pub fn setVelocity(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_VELOCITY: a,b,c=vel Actor::setVelocity

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.applyImpulse

Zig
pub fn applyImpulse(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_APPLY_IMPULSE: a,b,c=impulse Actor::applyImpulse

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setScoreTag

Zig
pub fn setScoreTag(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_SCORE_TAG: sarg=text Actor::setScoreTag

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setSkinId

Zig
pub fn setSkinId(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_SKIN_ID: a=skin id Actor::setSkinID

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setStrength

Zig
pub fn setStrength(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_STRENGTH: a=strength Actor::setStrength

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.removeAllPassengers

Zig
pub fn removeAllPassengers(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_REMOVE_ALL_PASSENGERS: Actor::removeAllPassengers

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.executeEvent

Zig
pub fn executeEvent(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_EXECUTE_EVENT: sarg=event name Actor::executeEvent

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setRotation

Zig
pub fn setRotation(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_ROTATION: a=pitch b=yaw Actor::setRotationWrapped

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.setSitting

Zig
pub fn setSitting(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_SET_SITTING: a: non-zero sits. Actor::setSitting

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.startRiding

Zig
pub fn startRiding(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_START_RIDING: sarg: the vehicle actor id in decimal, a: non-zero forces. Actor::startRiding

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.attributeSet

Zig
pub fn attributeSet(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_ATTRIBUTE_SET: sarg: attribute name, a: value. BaseAttributeMap::setCurrentValue

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.attributeSetMax

Zig
pub fn attributeSetMax(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_ATTRIBUTE_SET_MAX: sarg: attribute name, a: maximum. BaseAttributeMap::setMaxValue

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.attributeSetDefault

Zig
pub fn attributeSetDefault(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_ATTRIBUTE_SET_DEFAULT: sarg: attribute name, a: default. BaseAttributeMap::setDefaultValue

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.attributeList

Zig
pub fn attributeList(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_ATTRIBUTE_LIST: out: a JSON array of the attribute names this actor has, of the ones the attribute verbs know

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.attributeInfo

Zig
pub fn attributeInfo(self: Entity, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_AACT_ATTRIBUTE_INFO: sarg: attribute name; out: JSON {current, min, max, default}

The output, when the verb has one, is returned; abi.h names each argument.

  • Parameters:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • Return type: core.Error![]u8
  • Slots: actor_action

Entity.snapshot

Zig
pub fn snapshot(self: Entity, allocator: std.mem.Allocator) core.Error![]u8

The whole actor as SNBT, owned by the caller.

  • Parameters:
    • allocator : std.mem.Allocator
  • Return type: core.Error![]u8
  • Slots: actor_snapshot

Entity.cloneAt

Zig
pub fn cloneAt(self: Entity, dim: i32, x: f64, y: f64, z: f64) core.Error!Entity

Clones this actor to a given position.

  • Parameters:
    • dim : i32
    • x : f64
    • y : f64
    • z : f64
  • Return type: core.Error!Entity
  • Slots: actor_clone

Entity.distanceTo

Zig
pub fn distanceTo(self: Entity, other: Entity) core.Error!f64

The distance between two actors. The host refuses across dimensions.

Entity.aabb

Zig
pub fn aabb(self: Entity, allocator: std.mem.Allocator) core.Error!types.Aabb

The bounding box.

  • Parameters:
    • allocator : std.mem.Allocator
  • Return type: core.Error!types.Aabb
  • Slots: actor_get_aabb

Entity.effects

Zig
pub fn effects(self: Entity, allocator: std.mem.Allocator) core.Error!types.Owned(types.Effect)

Every status effect on this actor.

  • Parameters:
    • allocator : std.mem.Allocator
  • Return type: core.Error!types.Owned(types.Effect)
  • Slots: actor_get_effects

Entity.equippedItem

Zig
pub fn equippedItem(self: Entity, allocator: std.mem.Allocator, slot: types.EquipSlot) core.Error![]u8

What is equipped in one slot, as item SNBT owned by the caller.

  • Parameters:
    • allocator : std.mem.Allocator
    • slot : types.EquipSlot
  • Return type: core.Error![]u8
  • Slots: actor_get_equipped_item

Entity.setEquippedItem

Zig
pub fn setEquippedItem(self: Entity, slot: types.EquipSlot, item_snbt: []const u8) core.Error!void
  • Parameters:
    • slot : types.EquipSlot
    • item_snbt : []const u8
  • Return type: core.Error!void
  • Slots: actor_set_equipped_item

Entity.vehicle

Zig
pub fn vehicle(self: Entity) core.Error!?Entity

The vehicle being ridden. Riding nothing gives null and only a missing slot is an error.

  • Return type: core.Error!?Entity

Entity.firstPassenger

Zig
pub fn firstPassenger(self: Entity) core.Error!?Entity
  • Return type: core.Error!?Entity

Entity.owner

Zig
pub fn owner(self: Entity) core.Error!?Entity
  • Return type: core.Error!?Entity

Entity.target

Zig
pub fn target(self: Entity) core.Error!?Entity
  • Return type: core.Error!?Entity

Entity.statusFlag

Zig
pub fn statusFlag(self: Entity, flag_index: i32) core.Error!bool

Reads one bit of ActorFlags.

Entity.setStatusFlag

Zig
pub fn setStatusFlag(self: Entity, flag_index: i32, value: bool) core.Error!void

Entity.traceRay

Zig
pub fn traceRay(self: Entity, allocator: std.mem.Allocator, max_dist: f32, include_actors: bool, include_blocks: bool) core.Error!types.RayHit

Casts a ray along the line of sight of this actor and reports what it hits. A block hit carries a name owned by allocator; RayHit.deinit frees it.

  • Parameters:
    • allocator : std.mem.Allocator
    • max_dist : f32
    • include_actors : bool
    • include_blocks : bool
  • Return type: core.Error!types.RayHit
  • Slots: actor_trace_ray

Entity.traceRayBlocks

Zig
pub fn traceRayBlocks(self: Entity, allocator: std.mem.Allocator, max_dist: f32, include_actors: bool, include_blocks: bool) core.Error!types.RayHit

As traceRay, reporting the hit as a block cell and carrying the face that was hit.

  • Parameters:
    • allocator : std.mem.Allocator
    • max_dist : f32
    • include_actors : bool
    • include_blocks : bool
  • Return type: core.Error!types.RayHit
  • Slots: edit_trace_ray