update doc/*/scripting/builtins/libworld.md

This commit is contained in:
MihailRis 2025-01-12 03:43:35 +03:00
parent fc9c096873
commit cafaa3a168
2 changed files with 28 additions and 0 deletions

View File

@ -47,4 +47,18 @@ world.is_night() -> bool
-- Returns the total number of chunks loaded into memory
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
```

View File

@ -46,4 +46,18 @@ world.is_night() -> bool
-- Возвращает общее количество загруженных в память чанков
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
```