mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add block.model_name
This commit is contained in:
parent
1e4a7c8ea8
commit
e26ce0459b
3 changed files with 34 additions and 2 deletions
|
|
@ -119,13 +119,13 @@ block.seek_origin(x: int, y: int, z: int) -> int, int, int
|
|||
|
||||
Part of a voxel data used for scripting. Size: 8 bit.
|
||||
|
||||
```python
|
||||
```lua
|
||||
block.get_user_bits(x: int, y: int, z: int, offset: int, bits: int) -> int
|
||||
```
|
||||
|
||||
Get specified bits as an unsigned integer.
|
||||
|
||||
```python
|
||||
```lua
|
||||
block.set_user_bits(x: int, y: int, z: int, offset: int, bits: int, value: int) -> int
|
||||
```
|
||||
Set specified bits.
|
||||
|
|
@ -151,6 +151,21 @@ The function returns a table with the results or nil if the ray does not hit any
|
|||
|
||||
The result will use the destination table instead of creating a new one if the optional argument specified.
|
||||
|
||||
## Model
|
||||
|
||||
Block model information.
|
||||
|
||||
```lua
|
||||
-- returns block model type (block/aabb/custom/...)
|
||||
block.get_model(id: int) -> str
|
||||
|
||||
-- returns block model name
|
||||
block.model_name(id: int) -> str
|
||||
|
||||
-- returns array of 6 textures assigned to sides of block
|
||||
block.get_textures(id: int) -> string table
|
||||
```
|
||||
|
||||
## Data fields
|
||||
|
||||
```lua
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue