mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
rename events + fix
This commit is contained in:
parent
518d5d5ae4
commit
acf8112644
6 changed files with 35 additions and 46 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue