mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
docs: block.get_rotation, block.set_rotation
This commit is contained in:
parent
a3d3c3a46b
commit
a8910888bc
2 changed files with 25 additions and 0 deletions
|
|
@ -213,6 +213,19 @@ block.get_Z(x: int, y: int, z: int) -> int, int, int
|
||||||
Returns Z: integer direction vector of the block at specified coordinates.
|
Returns Z: integer direction vector of the block at specified coordinates.
|
||||||
Example: no rotation: 0, 0, 1
|
Example: no rotation: 0, 0, 1
|
||||||
|
|
||||||
|
|
||||||
|
```python
|
||||||
|
block.get_rotation(x: int, y: int, z: int) -> int
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns block rotation index based on used profile.
|
||||||
|
|
||||||
|
```python
|
||||||
|
block.set_rotation(x: int, y: int, z: int, rotation: int)
|
||||||
|
```
|
||||||
|
|
||||||
|
Set block rotation by index.
|
||||||
|
|
||||||
### User bits
|
### User bits
|
||||||
|
|
||||||
Part of a voxel data used for scripting. Size: 8 bit.
|
Part of a voxel data used for scripting. Size: 8 bit.
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,18 @@ block.get_Z(x: int, y: int, z: int) -> int, int, int
|
||||||
Возвращает целочисленный единичный вектор Z блока на указанных координатах с учётом его вращения (три целых числа).
|
Возвращает целочисленный единичный вектор Z блока на указанных координатах с учётом его вращения (три целых числа).
|
||||||
Если поворот отсутствует, возвращает 0, 0, 1
|
Если поворот отсутствует, возвращает 0, 0, 1
|
||||||
|
|
||||||
|
```python
|
||||||
|
block.get_rotation(x: int, y: int, z: int) -> int
|
||||||
|
```
|
||||||
|
|
||||||
|
Возвращает индекс поворота блока в его профиле вращения.
|
||||||
|
|
||||||
|
```python
|
||||||
|
block.set_rotation(x: int, y: int, z: int, rotation: int)
|
||||||
|
```
|
||||||
|
|
||||||
|
Устанавливает вращение блока по индексу в его профиле вращения.
|
||||||
|
|
||||||
### Пользовательские биты
|
### Пользовательские биты
|
||||||
|
|
||||||
Выделенная под использования в скриптах часть поля `voxel.states` хранящего доп-информацию о вокселе, такую как вращение блока. На данный момент выделенная часть составляет 8 бит.
|
Выделенная под использования в скриптах часть поля `voxel.states` хранящего доп-информацию о вокселе, такую как вращение блока. На данный момент выделенная часть составляет 8 бит.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue