Simulated players¶
Section notes in abi.h
Β§I NBT binary, KvDb (thread-safe), system & server info
Slots¶
sim_spawn¶
| C | |
|---|---|
Group note
Simulated ("fake") players (additive, gated by struct_size). sim_spawn creates a real ServerPlayer with that name β every existing per-player entry (teleport, health, inventory, kick,β¦) works on it via the usual name selector. sim_do multiplexes the simulate* verb family: the action vocabulary grows bridge-side without new table slots (verbs: despawn stop jump attack interact use_item drop respawn move_to navigate_to look_at destroy_block destroy_look stop_destroy interact_block sneak fly chat β args as SNBT, see docs). Gated on isSimulatedPlayer(): a real player can never be puppeted. False on unknown verb, malformed args, offline/non-sim target.
- Call:
api->sim_spawn(name, dimension, x, y, z) - Parameters:
- name :
PierStr - dimension :
int32_t - x :
double - y :
double - z :
double
- name :
- Return type:
bool - Section of abi.h: Β§I NBT binary, KvDb (thread-safe), system & server info
- Position in the table: slot 85, counting from 0
- Callers in each binding:
- Rust:
sim::spawn - Go:
SimSpawn,Raw.SimSpawn
- Rust:
sim_do¶
| C | |
|---|---|
Group note
Simulated ("fake") players (additive, gated by struct_size). sim_spawn creates a real ServerPlayer with that name β every existing per-player entry (teleport, health, inventory, kick,β¦) works on it via the usual name selector. sim_do multiplexes the simulate* verb family: the action vocabulary grows bridge-side without new table slots (verbs: despawn stop jump attack interact use_item drop respawn move_to navigate_to look_at destroy_block destroy_look stop_destroy interact_block sneak fly chat β args as SNBT, see docs). Gated on isSimulatedPlayer(): a real player can never be puppeted. False on unknown verb, malformed args, offline/non-sim target.
- Call:
api->sim_do(sel, action, args_snbt) - Parameters:
- sel :
PierPlayerSel - action :
PierStr - args_snbt :
PierStr
- sel :
- Return type:
bool - Section of abi.h: Β§I NBT binary, KvDb (thread-safe), system & server info
- Position in the table: slot 86, counting from 0
- Callers in each binding:
- Rust:
SimPlayer::act,SimPlayer::despawn,SimPlayer::stop,SimPlayer::jump,SimPlayer::attack,SimPlayer::interactand more, 19 in all - Go:
SimDo,Raw.SimDo
- Rust:
sim_is¶
| C | |
|---|---|
Group note
Simulated ("fake") players (additive, gated by struct_size). sim_spawn creates a real ServerPlayer with that name β every existing per-player entry (teleport, health, inventory, kick,β¦) works on it via the usual name selector. sim_do multiplexes the simulate* verb family: the action vocabulary grows bridge-side without new table slots (verbs: despawn stop jump attack interact use_item drop respawn move_to navigate_to look_at destroy_block destroy_look stop_destroy interact_block sneak fly chat β args as SNBT, see docs). Gated on isSimulatedPlayer(): a real player can never be puppeted. False on unknown verb, malformed args, offline/non-sim target.
True if the selector resolves to a live simulated player. Lets a mod re-validate a bot after a restart (the SimulatedPlayer persists in the world, but in-memory handles don't).
- Call:
api->sim_is(sel) - Parameters:
- sel :
PierPlayerSel
- sel :
- Return type:
bool - Section of abi.h: Β§I NBT binary, KvDb (thread-safe), system & server info
- Position in the table: slot 87, counting from 0
- Callers in each binding:
sim_list¶
| C | |
|---|---|
Group note
Simulated ("fake") players (additive, gated by struct_size). sim_spawn creates a real ServerPlayer with that name β every existing per-player entry (teleport, health, inventory, kick,β¦) works on it via the usual name selector. sim_do multiplexes the simulate* verb family: the action vocabulary grows bridge-side without new table slots (verbs: despawn stop jump attack interact use_item drop respawn move_to navigate_to look_at destroy_block destroy_look stop_destroy interact_block sneak fly chat β args as SNBT, see docs). Gated on isSimulatedPlayer(): a real player can never be puppeted. False on unknown verb, malformed args, offline/non-sim target.
Enumerate the names of all live simulated players (sink receives each name). Rebuild a handle from a name to drive a bot that outlived the session that spawned it.
- Call:
api->sim_list(ctx, name_sink) - Parameters:
- ctx :
void* - name_sink :
PierStrSink
- ctx :
- Section of abi.h: Β§I NBT binary, KvDb (thread-safe), system & server info
- Position in the table: slot 88, counting from 0
- Callers in each binding:
- Rust:
sim::try_list,sim::list - Go:
SimList,Raw.SimList
- Rust: