update doc/*/scripting/builtins/libworld.md
This commit is contained in:
parent
fc9c096873
commit
cafaa3a168
@ -47,4 +47,18 @@ world.is_night() -> bool
|
|||||||
|
|
||||||
-- Returns the total number of chunks loaded into memory
|
-- Returns the total number of chunks loaded into memory
|
||||||
world.count_chunks() -> int
|
world.count_chunks() -> int
|
||||||
|
|
||||||
|
-- Returns the compressed chunk data to send.
|
||||||
|
-- Currently includes:
|
||||||
|
-- 1. Voxel data (id and state)
|
||||||
|
-- 2. Voxel metadata (fields)
|
||||||
|
world.get_chunk_data(x: int, z: int) -> Bytearray
|
||||||
|
|
||||||
|
-- Modifies the chunk based on the compressed data.
|
||||||
|
-- Returns true if the chunk exists.
|
||||||
|
world.set_chunk_data(
|
||||||
|
x: int, z: int,
|
||||||
|
-- compressed chunk data
|
||||||
|
data: Bytearray
|
||||||
|
) -> bool
|
||||||
```
|
```
|
||||||
|
|||||||
@ -46,4 +46,18 @@ world.is_night() -> bool
|
|||||||
|
|
||||||
-- Возвращает общее количество загруженных в память чанков
|
-- Возвращает общее количество загруженных в память чанков
|
||||||
world.count_chunks() -> int
|
world.count_chunks() -> int
|
||||||
|
|
||||||
|
-- Возвращает сжатые данные чанка для отправки.
|
||||||
|
-- На данный момент включает:
|
||||||
|
-- 1. Данные вокселей (id и состояние)
|
||||||
|
-- 2. Метаданные (поля) вокселей
|
||||||
|
world.get_chunk_data(x: int, z: int) -> Bytearray
|
||||||
|
|
||||||
|
-- Изменяет чанк на основе сжатых данных.
|
||||||
|
-- Возвращает true если чанк существует.
|
||||||
|
world.set_chunk_data(
|
||||||
|
x: int, z: int,
|
||||||
|
-- сжатые данные чанка
|
||||||
|
data: Bytearray
|
||||||
|
) -> bool
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user