Go:实体¶
函数¶
ListActors¶
| Go | |
|---|---|
列出一个维度里的所有实体。只能在服务器线程调用。
- 参数:
- dim :
int32
- dim :
- 返回值类型:
([]ActorInfo, error) - 对应槽位:
list_actors
EntityByID¶
| Go | |
|---|---|
这个唯一 id 的实体,id 就是事件载荷里的 uid。
- 参数:
- id :
ActorID
- id :
- 返回值类型:
Entity
SpawnMob¶
| Go | |
|---|---|
生成一个生物,并返回它。
- 参数:
- dim :
int32 - typeName :
string - x :
float64 - y :
float64 - z :
float64
- dim :
- 返回值类型:
(Entity, error) - 对应槽位:
spawn_mob
Entity¶
一个实体,由它的唯一 id 指定。
Entity.Snapshot¶
| Go | |
|---|---|
这个实体完整的 NBT,以 SNBT 给出。
- 返回值类型:
(string, error) - 对应槽位:
actor_snapshot
Entity.Vehicle¶
| Go | |
|---|---|
这个实体骑着的东西。
- 返回值类型:
(Entity, error) - 对应槽位:
actor_get_vehicle
Entity.Owner¶
| Go | |
|---|---|
这个实体的主人,用于驯服的或召唤出来的实体。
- 返回值类型:
(Entity, error) - 对应槽位:
actor_get_owner
Entity.Target¶
| Go | |
|---|---|
这个实体当前的目标。
- 返回值类型:
(Entity, error) - 对应槽位:
actor_get_target
Entity.DistanceTo¶
| Go | |
|---|---|
到另一个实体的距离。
- 参数:
- other :
Entity
- other :
- 返回值类型:
(float64, error) - 对应槽位:
actor_distance_to
Entity.Clone¶
| Go | |
|---|---|
把这个实体复制到一个位置,返回复制出来的实体。
- 参数:
- dim :
int32 - x :
float64 - y :
float64 - z :
float64
- dim :
- 返回值类型:
(Entity, error) - 对应槽位:
actor_clone
Entity.PosX¶
| Go | |
|---|---|
读取 PIER_APROP_POS_X:(G) Actor::getPosition().x(玩家的脚下位置要用 getFeetPos;POS_* 用的是 getPosition)
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.PosY¶
| Go | |
|---|---|
读取 PIER_APROP_POS_Y:(G)
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.PosZ¶
| Go | |
|---|---|
读取 PIER_APROP_POS_Z:(G)
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.RotPitch¶
| Go | |
|---|---|
读取 PIER_APROP_ROT_PITCH:(G) Actor::getRotation().x
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.RotYaw¶
| Go | |
|---|---|
读取 PIER_APROP_ROT_YAW:(G) Actor::getRotation().y
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.Dimension¶
| Go | |
|---|---|
读取 PIER_APROP_DIMENSION:(G) Actor::getDimensionId
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.Health¶
| Go | |
|---|---|
读取 PIER_APROP_HEALTH:(G) Actor::getHealth;治疗和伤害用动作完成
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.MaxHealth¶
| Go | |
|---|---|
读取 PIER_APROP_MAX_HEALTH:(G) Actor::getMaxHealth
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.IsAlive¶
| Go | |
|---|---|
读取 PIER_APROP_IS_ALIVE:(G) Actor::isAlive
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsOnGround¶
| Go | |
|---|---|
读取 PIER_APROP_IS_ON_GROUND:(G) Actor::isOnGround
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsInWater¶
| Go | |
|---|---|
读取 PIER_APROP_IS_IN_WATER:(G) Actor::isInWater
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsInLava¶
| Go | |
|---|---|
读取 PIER_APROP_IS_IN_LAVA:(G) Actor::isInLava
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsOnFire¶
| Go | |
|---|---|
读取 PIER_APROP_IS_ON_FIRE:(G) Actor::isOnFire
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsInvisible¶
| Go | |
|---|---|
读取 PIER_APROP_IS_INVISIBLE:(G) Actor::isInvisible
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsSneaking¶
| Go | |
|---|---|
读取 PIER_APROP_IS_SNEAKING:(G) Actor::isSneaking
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsBaby¶
| Go | |
|---|---|
读取 PIER_APROP_IS_BABY:(G) Actor::isBaby
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsRiding¶
| Go | |
|---|---|
读取 PIER_APROP_IS_RIDING:(G) Actor::isRiding
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsTame¶
| Go | |
|---|---|
读取 PIER_APROP_IS_TAME:(G) Actor::isTame
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.Speed¶
| Go | |
|---|---|
读取 PIER_APROP_SPEED:(G) Actor::getSpeedInMetersPerSecond
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.ViewX¶
| Go | |
|---|---|
读取 PIER_APROP_VIEW_X:(G) Actor::getViewVector().x
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.ViewY¶
| Go | |
|---|---|
读取 PIER_APROP_VIEW_Y:(G) Actor::getViewVector().y
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.ViewZ¶
| Go | |
|---|---|
读取 PIER_APROP_VIEW_Z:(G) Actor::getViewVector().z
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.VelX¶
| Go | |
|---|---|
读取 PIER_APROP_VEL_X:(G) Actor::getVelocity().x
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.VelY¶
| Go | |
|---|---|
读取 PIER_APROP_VEL_Y:(G) Actor::getVelocity().y
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.VelZ¶
| Go | |
|---|---|
读取 PIER_APROP_VEL_Z:(G) Actor::getVelocity().z
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.HeadX¶
| Go | |
|---|---|
读取 PIER_APROP_HEAD_X:(G) Actor::getHeadPos().x
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.HeadY¶
| Go | |
|---|---|
读取 PIER_APROP_HEAD_Y:(G) Actor::getHeadPos().y
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.HeadZ¶
| Go | |
|---|---|
读取 PIER_APROP_HEAD_Z:(G) Actor::getHeadPos().z
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.FeetX¶
| Go | |
|---|---|
读取 PIER_APROP_FEET_X:(G) Actor::getFeetPos().x
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.FeetY¶
| Go | |
|---|---|
读取 PIER_APROP_FEET_Y:(G) Actor::getFeetPos().y
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.FeetZ¶
| Go | |
|---|---|
读取 PIER_APROP_FEET_Z:(G) Actor::getFeetPos().z
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.FallDistance¶
| Go | |
|---|---|
读取 PIER_APROP_FALL_DISTANCE:(G) Actor::getFallDistance
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.IsPersistent¶
| Go | |
|---|---|
读取 PIER_APROP_IS_PERSISTENT:(G) Actor::isPersistent
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsLeashed¶
| Go | |
|---|---|
读取 PIER_APROP_IS_LEASHED:(G) Actor::isLeashed
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsInvulnerable¶
| Go | |
|---|---|
读取 PIER_APROP_IS_INVULNERABLE:(G) Actor::isInvulnerable
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.Variant¶
| Go | |
|---|---|
读取 PIER_APROP_VARIANT:(G) Actor::getVariant
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.MarkVariant¶
| Go | |
|---|---|
读取 PIER_APROP_MARK_VARIANT:(G) Actor::getMarkVariant
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.Scale¶
| Go | |
|---|---|
读取 PIER_APROP_SCALE:(G) Actor::getScaleFactor
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.Brightness¶
| Go | |
|---|---|
读取 PIER_APROP_BRIGHTNESS:(G) Actor::getBrightness
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.Radius¶
| Go | |
|---|---|
读取 PIER_APROP_RADIUS:(G) Actor::getRadius
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.HasTotem¶
| Go | |
|---|---|
读取 PIER_APROP_HAS_TOTEM:(G) Actor::hasTotemEquipped
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsInRain¶
| Go | |
|---|---|
读取 PIER_APROP_IS_IN_RAIN:(G) Actor::isInRain
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsInSnow¶
| Go | |
|---|---|
读取 PIER_APROP_IS_IN_SNOW:(G) Actor::isInSnow
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsInThunderstorm¶
| Go | |
|---|---|
读取 PIER_APROP_IS_IN_THUNDERSTORM:(G) Actor::isInThunderstorm
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsFrozen¶
| Go | |
|---|---|
读取 PIER_APROP_IS_FROZEN:(G) Actor::isFrozen
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.IsInLove¶
| Go | |
|---|---|
读取 PIER_APROP_IS_IN_LOVE:(G) 从 BDS 1.26.40 起不再支持:Actor::isInLove 已被移除
在当前所有的引擎版本上,宿主读这一项都没有结果:(G) 从 BDS 1.26.40 起不再支持:Actor::isInLove 已被移除
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.DeathTime¶
| Go | |
|---|---|
读取 PIER_APROP_DEATH_TIME:(G) Actor::getDeathTime
- 返回值类型:
(float64, error) - 对应槽位:
actor_get_num
Entity.HasPassenger¶
| Go | |
|---|---|
读取 PIER_APROP_HAS_PASSENGER:(G) Actor::hasPassenger
- 返回值类型:
(bool, error) - 对应槽位:
actor_get_num
Entity.TypeName¶
| Go | |
|---|---|
读取 PIER_ASTR_TYPE_NAME:取自 Actor::getTypeName
- 返回值类型:
(string, error) - 对应槽位:
actor_get_str
Entity.NameTag¶
| Go | |
|---|---|
读取 PIER_ASTR_NAME_TAG:取自 Actor::getNameTag
- 返回值类型:
(string, error) - 对应槽位:
actor_get_str
Entity.ScoreTag¶
| Go | |
|---|---|
读取 PIER_ASTR_SCORE_TAG:取自 Actor::getScoreTag
- 返回值类型:
(string, error) - 对应槽位:
actor_get_str
Entity.FilteredName¶
| Go | |
|---|---|
读取 PIER_ASTR_FILTERED_NAME:取自 Actor::getFilteredNameTag
- 返回值类型:
(string, error) - 对应槽位:
actor_get_str
Entity.Kill¶
| Go | |
|---|---|
执行 PIER_AACT_KILL:调用 Actor::kill
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.Despawn¶
| Go | |
|---|---|
执行 PIER_AACT_DESPAWN:调用 Actor::despawn
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.Heal¶
| Go | |
|---|---|
执行 PIER_AACT_HEAL:a 为治疗量,调用 Actor::heal
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetOnFire¶
| Go | |
|---|---|
执行 PIER_AACT_SET_ON_FIRE:a 为秒数,调用 Actor::setOnFire
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.Teleport¶
| Go | |
|---|---|
执行 PIER_AACT_TELEPORT:a、b、c 为坐标,sarg 为维度("0" 到 "2"),调用 Actor::teleport
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetNameTag¶
| Go | |
|---|---|
执行 PIER_AACT_SET_NAME_TAG:sarg 为名字,调用 Actor::setNameTag
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.AddTag¶
| Go | |
|---|---|
执行 PIER_AACT_ADD_TAG:sarg 为标签,输出 "0" 或 "1",调用 Actor::addTag
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.RemoveTag¶
| Go | |
|---|---|
执行 PIER_AACT_REMOVE_TAG:sarg 为标签,输出 "0" 或 "1",调用 Actor::removeTag
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.HasTag¶
| Go | |
|---|---|
执行 PIER_AACT_HAS_TAG:sarg 为标签,输出 "0" 或 "1",调用 Actor::hasTag
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.AddEffect¶
| Go | |
|---|---|
执行 PIER_AACT_ADD_EFFECT:sarg 为效果名,a 为刻数,b 为效果等级,c 为是否显示粒子(0 或 1),经 MobEffect::getByName 和 Actor::addEffect 完成
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.RemoveEffect¶
| Go | |
|---|---|
执行 PIER_AACT_REMOVE_EFFECT:sarg 为效果名,调用 Actor::removeEffect(id)
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.ClearEffects¶
| Go | |
|---|---|
执行 PIER_AACT_CLEAR_EFFECTS:调用 Actor::removeAllEffects
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.Hurt¶
| Go | |
|---|---|
执行 PIER_AACT_HURT:a 为伤害值(通用伤害来源),调用 Actor::hurt
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.AttributeGet¶
| Go | |
|---|---|
执行 PIER_AACT_ATTRIBUTE_GET:sarg 为属性名("minecraft:health" 等),输出属性值
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetVariant¶
| Go | |
|---|---|
执行 PIER_AACT_SET_VARIANT:a 为变种值,调用 Actor::setVariant
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetMarkVariant¶
| Go | |
|---|---|
执行 PIER_AACT_SET_MARK_VARIANT:a 为变种值,调用 Actor::setMarkVariant
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetPersistent¶
| Go | |
|---|---|
执行 PIER_AACT_SET_PERSISTENT:调用 Actor::setPersistent
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetLeashHolder¶
| Go | |
|---|---|
执行 PIER_AACT_SET_LEASH_HOLDER:a 为牵引者的 ActorUniqueID,调用 Actor::setLeashHolder
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetInvisible¶
| Go | |
|---|---|
执行 PIER_AACT_SET_INVISIBLE:a 为 0 或 1,调用 Actor::setInvisible
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetSneaking¶
| Go | |
|---|---|
执行 PIER_AACT_SET_SNEAKING:a 为 0 或 1,调用 Actor::setSneaking
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetNameTagVisible¶
| Go | |
|---|---|
执行 PIER_AACT_SET_NAME_TAG_VISIBLE:a 为 0 或 1,调用 Actor::setNameTagVisible
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetTarget¶
| Go | |
|---|---|
执行 PIER_AACT_SET_TARGET:a 为目标的 ActorUniqueID,调用 Actor::setTarget
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetOwner¶
| Go | |
|---|---|
执行 PIER_AACT_SET_OWNER:a 为主人的 ActorUniqueID,调用 Actor::setOwner
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.Burn¶
| Go | |
|---|---|
执行 PIER_AACT_BURN:a 为伤害值,调用 Actor::burn
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.StopFire¶
| Go | |
|---|---|
执行 PIER_AACT_STOP_FIRE:调用 Actor::extinguishFire
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetVelocity¶
| Go | |
|---|---|
执行 PIER_AACT_SET_VELOCITY:a、b、c 为速度,调用 Actor::setVelocity
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.ApplyImpulse¶
| Go | |
|---|---|
执行 PIER_AACT_APPLY_IMPULSE:a、b、c 为冲量,调用 Actor::applyImpulse
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetScoreTag¶
| Go | |
|---|---|
执行 PIER_AACT_SET_SCORE_TAG:sarg 为文本,调用 Actor::setScoreTag
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetSkinId¶
| Go | |
|---|---|
执行 PIER_AACT_SET_SKIN_ID:a 为皮肤 id,调用 Actor::setSkinID
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetStrength¶
| Go | |
|---|---|
执行 PIER_AACT_SET_STRENGTH:a 为强度,调用 Actor::setStrength
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.RemoveAllPassengers¶
| Go | |
|---|---|
执行 PIER_AACT_REMOVE_ALL_PASSENGERS:调用 Actor::removeAllPassengers
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.ExecuteEvent¶
| Go | |
|---|---|
执行 PIER_AACT_EXECUTE_EVENT:sarg 为事件名,调用 Actor::executeEvent
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
Entity.SetRotation¶
| Go | |
|---|---|
执行 PIER_AACT_SET_ROTATION:a 为俯仰角,b 为偏航角,调用 Actor::setRotationWrapped
这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。
- 参数:
- sarg :
string - a :
float64 - b :
float64 - c :
float64
- sarg :
- 返回值类型:
(string, error) - 对应槽位:
actor_action
ActorInfo¶
一个维度里的一个实体:它的唯一 id 和类型名。
ActorID¶
| Go | |
|---|---|
实体的唯一 id,即事件载荷里的 uid。0 永远解析不到。
AProp*¶
| 名称 | 值 | 说明 |
|---|---|---|
APropPosX |
0 |
即 PIER_APROP_POS_X:(G) Actor::getPosition().x(玩家的脚下位置要用 getFeetPos;POS_* 用的是 getPosition) |
APropPosY |
1 |
即 PIER_APROP_POS_Y:(G) |
APropPosZ |
2 |
即 PIER_APROP_POS_Z:(G) |
APropRotPitch |
3 |
即 PIER_APROP_ROT_PITCH:(G) Actor::getRotation().x |
APropRotYaw |
4 |
即 PIER_APROP_ROT_YAW:(G) Actor::getRotation().y |
APropDimension |
5 |
即 PIER_APROP_DIMENSION:(G) Actor::getDimensionId |
APropHealth |
6 |
即 PIER_APROP_HEALTH:(G) Actor::getHealth;治疗和伤害用动作完成 |
APropMaxHealth |
7 |
即 PIER_APROP_MAX_HEALTH:(G) Actor::getMaxHealth |
APropIsAlive |
8 |
即 PIER_APROP_IS_ALIVE:(G) Actor::isAlive |
APropIsOnGround |
9 |
即 PIER_APROP_IS_ON_GROUND:(G) Actor::isOnGround |
APropIsInWater |
10 |
即 PIER_APROP_IS_IN_WATER:(G) Actor::isInWater |
APropIsInLava |
11 |
即 PIER_APROP_IS_IN_LAVA:(G) Actor::isInLava |
APropIsOnFire |
12 |
即 PIER_APROP_IS_ON_FIRE:(G) Actor::isOnFire |
APropIsInvisible |
13 |
即 PIER_APROP_IS_INVISIBLE:(G) Actor::isInvisible |
APropIsSneaking |
14 |
即 PIER_APROP_IS_SNEAKING:(G) Actor::isSneaking |
APropIsBaby |
15 |
即 PIER_APROP_IS_BABY:(G) Actor::isBaby |
APropIsRiding |
16 |
即 PIER_APROP_IS_RIDING:(G) Actor::isRiding |
APropIsTame |
17 |
即 PIER_APROP_IS_TAME:(G) Actor::isTame |
APropSpeed |
18 |
即 PIER_APROP_SPEED:(G) Actor::getSpeedInMetersPerSecond |
APropViewX |
19 |
即 PIER_APROP_VIEW_X:(G) Actor::getViewVector().x |
APropViewY |
20 |
即 PIER_APROP_VIEW_Y:(G) Actor::getViewVector().y |
APropViewZ |
21 |
即 PIER_APROP_VIEW_Z:(G) Actor::getViewVector().z |
APropVelX |
22 |
即 PIER_APROP_VEL_X:(G) Actor::getVelocity().x |
APropVelY |
23 |
即 PIER_APROP_VEL_Y:(G) Actor::getVelocity().y |
APropVelZ |
24 |
即 PIER_APROP_VEL_Z:(G) Actor::getVelocity().z |
APropHeadX |
25 |
即 PIER_APROP_HEAD_X:(G) Actor::getHeadPos().x |
APropHeadY |
26 |
即 PIER_APROP_HEAD_Y:(G) Actor::getHeadPos().y |
APropHeadZ |
27 |
即 PIER_APROP_HEAD_Z:(G) Actor::getHeadPos().z |
APropFeetX |
28 |
即 PIER_APROP_FEET_X:(G) Actor::getFeetPos().x |
APropFeetY |
29 |
即 PIER_APROP_FEET_Y:(G) Actor::getFeetPos().y |
APropFeetZ |
30 |
即 PIER_APROP_FEET_Z:(G) Actor::getFeetPos().z |
APropFallDistance |
31 |
即 PIER_APROP_FALL_DISTANCE:(G) Actor::getFallDistance |
APropIsPersistent |
32 |
即 PIER_APROP_IS_PERSISTENT:(G) Actor::isPersistent |
APropIsLeashed |
33 |
即 PIER_APROP_IS_LEASHED:(G) Actor::isLeashed |
APropIsInvulnerable |
34 |
即 PIER_APROP_IS_INVULNERABLE:(G) Actor::isInvulnerable |
APropVariant |
35 |
即 PIER_APROP_VARIANT:(G) Actor::getVariant |
APropMarkVariant |
36 |
即 PIER_APROP_MARK_VARIANT:(G) Actor::getMarkVariant |
APropScale |
37 |
即 PIER_APROP_SCALE:(G) Actor::getScaleFactor |
APropBrightness |
38 |
即 PIER_APROP_BRIGHTNESS:(G) Actor::getBrightness |
APropRadius |
39 |
即 PIER_APROP_RADIUS:(G) Actor::getRadius |
APropHasTotem |
40 |
即 PIER_APROP_HAS_TOTEM:(G) Actor::hasTotemEquipped |
APropIsInRain |
41 |
即 PIER_APROP_IS_IN_RAIN:(G) Actor::isInRain |
APropIsInSnow |
42 |
即 PIER_APROP_IS_IN_SNOW:(G) Actor::isInSnow |
APropIsInThunderstorm |
43 |
即 PIER_APROP_IS_IN_THUNDERSTORM:(G) Actor::isInThunderstorm |
APropIsFrozen |
44 |
即 PIER_APROP_IS_FROZEN:(G) Actor::isFrozen |
APropIsInLove |
45 |
这个常量在当前的引擎版本上取不到值:即 PIER_APROP_IS_IN_LOVE:(G) 从 BDS 1.26.40 起不再支持:Actor::isInLove 已被移除 |
APropDeathTime |
46 |
即 PIER_APROP_DEATH_TIME:(G) Actor::getDeathTime |
APropHasPassenger |
47 |
即 PIER_APROP_HAS_PASSENGER:(G) Actor::hasPassenger |
AStr*¶
| 名称 | 值 | 说明 |
|---|---|---|
AStrTypeName |
0 |
即 PIER_ASTR_TYPE_NAME:取自 Actor::getTypeName |
AStrNameTag |
1 |
即 PIER_ASTR_NAME_TAG:取自 Actor::getNameTag |
AStrScoreTag |
2 |
即 PIER_ASTR_SCORE_TAG:取自 Actor::getScoreTag |
AStrFilteredName |
3 |
即 PIER_ASTR_FILTERED_NAME:取自 Actor::getFilteredNameTag |
AAct*¶
| 名称 | 值 | 说明 |
|---|---|---|
AActKill |
0 |
即 PIER_AACT_KILL:调用 Actor::kill |
AActDespawn |
1 |
即 PIER_AACT_DESPAWN:调用 Actor::despawn |
AActHeal |
2 |
即 PIER_AACT_HEAL:a 为治疗量,调用 Actor::heal |
AActSetOnFire |
3 |
即 PIER_AACT_SET_ON_FIRE:a 为秒数,调用 Actor::setOnFire |
AActTeleport |
4 |
即 PIER_AACT_TELEPORT:a、b、c 为坐标,sarg 为维度("0" 到 "2"),调用 Actor::teleport |
AActSetNameTag |
5 |
即 PIER_AACT_SET_NAME_TAG:sarg 为名字,调用 Actor::setNameTag |
AActAddTag |
6 |
即 PIER_AACT_ADD_TAG:sarg 为标签,输出 "0" 或 "1",调用 Actor::addTag |
AActRemoveTag |
7 |
即 PIER_AACT_REMOVE_TAG:sarg 为标签,输出 "0" 或 "1",调用 Actor::removeTag |
AActHasTag |
8 |
即 PIER_AACT_HAS_TAG:sarg 为标签,输出 "0" 或 "1",调用 Actor::hasTag |
AActAddEffect |
9 |
即 PIER_AACT_ADD_EFFECT:sarg 为效果名,a 为刻数,b 为效果等级,c 为是否显示粒子(0 或 1),经 MobEffect::getByName 和 Actor::addEffect 完成 |
AActRemoveEffect |
10 |
即 PIER_AACT_REMOVE_EFFECT:sarg 为效果名,调用 Actor::removeEffect(id) |
AActClearEffects |
11 |
即 PIER_AACT_CLEAR_EFFECTS:调用 Actor::removeAllEffects |
AActHurt |
12 |
即 PIER_AACT_HURT:a 为伤害值(通用伤害来源),调用 Actor::hurt |
AActAttributeGet |
13 |
即 PIER_AACT_ATTRIBUTE_GET:sarg 为属性名("minecraft:health" 等),输出属性值 |
AActSetVariant |
14 |
即 PIER_AACT_SET_VARIANT:a 为变种值,调用 Actor::setVariant |
AActSetMarkVariant |
15 |
即 PIER_AACT_SET_MARK_VARIANT:a 为变种值,调用 Actor::setMarkVariant |
AActSetPersistent |
16 |
即 PIER_AACT_SET_PERSISTENT:调用 Actor::setPersistent |
AActSetLeashHolder |
17 |
即 PIER_AACT_SET_LEASH_HOLDER:a 为牵引者的 ActorUniqueID,调用 Actor::setLeashHolder |
AActSetInvisible |
18 |
即 PIER_AACT_SET_INVISIBLE:a 为 0 或 1,调用 Actor::setInvisible |
AActSetSneaking |
19 |
即 PIER_AACT_SET_SNEAKING:a 为 0 或 1,调用 Actor::setSneaking |
AActSetNameTagVisible |
20 |
即 PIER_AACT_SET_NAME_TAG_VISIBLE:a 为 0 或 1,调用 Actor::setNameTagVisible |
AActSetTarget |
21 |
即 PIER_AACT_SET_TARGET:a 为目标的 ActorUniqueID,调用 Actor::setTarget |
AActSetOwner |
22 |
即 PIER_AACT_SET_OWNER:a 为主人的 ActorUniqueID,调用 Actor::setOwner |
AActBurn |
23 |
即 PIER_AACT_BURN:a 为伤害值,调用 Actor::burn |
AActStopFire |
24 |
即 PIER_AACT_STOP_FIRE:调用 Actor::extinguishFire |
AActSetVelocity |
25 |
即 PIER_AACT_SET_VELOCITY:a、b、c 为速度,调用 Actor::setVelocity |
AActApplyImpulse |
26 |
即 PIER_AACT_APPLY_IMPULSE:a、b、c 为冲量,调用 Actor::applyImpulse |
AActSetScoreTag |
27 |
即 PIER_AACT_SET_SCORE_TAG:sarg 为文本,调用 Actor::setScoreTag |
AActSetSkinId |
28 |
即 PIER_AACT_SET_SKIN_ID:a 为皮肤 id,调用 Actor::setSkinID |
AActSetStrength |
29 |
即 PIER_AACT_SET_STRENGTH:a 为强度,调用 Actor::setStrength |
AActRemoveAllPassengers |
30 |
即 PIER_AACT_REMOVE_ALL_PASSENGERS:调用 Actor::removeAllPassengers |
AActExecuteEvent |
31 |
即 PIER_AACT_EXECUTE_EVENT:sarg 为事件名,调用 Actor::executeEvent |
AActSetRotation |
32 |
即 PIER_AACT_SET_ROTATION:a 为俯仰角,b 为偏航角,调用 Actor::setRotationWrapped |