Merge pull request #1040 from MihailRis/world-logic-configuration

world logic configuration
This commit is contained in:
MihailRis 2026-10-15 12:12:33 +03:00 • committed by GitHub
commit 4354896008
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 140 additions and 12 deletions

View file

@ -1,5 +1,12 @@
# *world* library
Existing world logic parameters:
| Parameter | Type | Default | Description |
| -------------- | ---- | ------- | ----------------------------- |
| `random_ticks` | bool | `true` | Enables random block ticking. |
| `block_ticks` | bool | `true` | Enables block ticking. |
```lua
-- Checks if world is open
world.is_open() -> bool
@ -33,6 +40,14 @@ world.get_total_time() -> number
-- Returns world seed.
world.get_seed() -> int
-- Returns a world logic parameter value by name.
-- Only predefined parameters are supported.
world.get_logic(name: str) -> any
-- Sets a world logic parameter by name.
-- Only predefined parameters are supported.
world.set_logic(name: str, value: any)
-- Returns generator name.
world.get_generator() -> str
@ -112,5 +127,3 @@ world.raycast(
length: number, -- ray length
normal: vec3, -- normal vector of the surface touched by the ray
} or nil if the ray did not touch a block or entity
```
```