mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-23 10:59:45 +00:00
update doc/*/entity-properties.md, doc/*/scripting/builtins/libentities.md
This commit is contained in:
parent
283e3c041e
commit
aab363cfb7
4 changed files with 34 additions and 0 deletions
|
|
@ -1,5 +1,17 @@
|
|||
# Entity properties
|
||||
|
||||
## User properties
|
||||
|
||||
Access to custom entity properties is provided through the table `entities.properties[id]["property"]`, where `id` is the entity definition index.
|
||||
|
||||
Custom properties follow the same pack inheritance and override rules as block and item properties, and must be declared in `pack:config/user-props.toml`:
|
||||
|
||||
```toml
|
||||
"pack:property_name" = {}
|
||||
```
|
||||
|
||||
This makes the property available in Lua scripts as `entities.properties[entities.def_index("pack:entity")]["property"]`.
|
||||
|
||||
## Logic
|
||||
|
||||
### *components*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue