rename events + fix

This commit is contained in:
Xertis 2026-04-08 21:44:17 +03:00
parent 518d5d5ae4
commit acf8112644
6 changed files with 35 additions and 46 deletions

View file

@ -153,15 +153,15 @@ function on_block_interact(blockid, x, y, z, playerid) -> bool
Called on block RMB click interaction. Prevents block placing if **true** returned.
```lua
function on_entity_spawned(uid)
function on_entity_spawn(uid)
```
Called after an entity is spawned.
```lua
function on_entity_despawned(uid)
function on_entity_despawn(uid)
```
Called after an entity is removed. At the time of the call, the entity with the given uid has already been deleted.
Called before an entity is despawned.
### Chunk Events (world.lua)

View file

@ -157,16 +157,16 @@ function on_block_interact(blockid, x, y, z, playerid) -> bool
Вызывается при нажатии на блок ПКМ. Предотвращает установку блоков, если возвращает `true`
```lua
function on_entity_spawned(uid)
function on_entity_spawn(uid)
```
Вызывается после спавна сущности
```lua
function on_entity_despawned(uid)
function on_entity_despawn(uid)
```
Вызывается после удаления сущности, на момент вызова события сущность с переданным uid уже удалена
Вызывается перед удалением сущности
```lua
function on_player_tick(playerid: int, tps: int)