add new block.get_AXIS functions overloads & add rotation support to base:falling_block
This commit is contained in:
@@ -67,12 +67,15 @@ Following three functions return direction vectors based on block rotation.
|
||||
-- Returns X: integer direction vector of the block at specified coordinates.
|
||||
-- Example: no rotation: 1, 0, 0.
|
||||
block.get_X(x: int, y: int, z: int) -> int, int, int
|
||||
block.get_X(id: int, rotation: int) -> int, int, int
|
||||
|
||||
-- Same for axis Y. Default: 0, 1, 0.
|
||||
block.get_Y(x: int, y: int, z: int) -> int, int, int
|
||||
block.get_Y(id: int, rotation: int) -> int, int, int
|
||||
|
||||
-- Same for axis Z. Default: 0, 0, 1.
|
||||
block.get_Z(x: int, y: int, z: int) -> int, int, int
|
||||
block.get_Z(id: int, rotation: int) -> int, int, int
|
||||
|
||||
-- Returns block rotation index based on used profile.
|
||||
block.get_rotation(x: int, y: int, z: int) -> int
|
||||
|
||||
@@ -90,12 +90,15 @@ block.raycast(start: vec3, dir: vec3, max_distance: number, [опциональ
|
||||
-- Возвращает целочисленный единичный вектор X блока на указанных координатах с учётом его вращения (три целых числа).
|
||||
-- Если поворот отсутствует, возвращает 1, 0, 0
|
||||
block.get_X(x: int, y: int, z: int) -> int, int, int
|
||||
block.get_X(id: int, rotation: int) -> int, int, int
|
||||
|
||||
-- То же, но для оси Y (по-умолчанию 0, 1, 0)
|
||||
block.get_Y(x: int, y: int, z: int) -> int, int, int
|
||||
block.get_Y(id: int, rotation: int) -> int, int, int
|
||||
|
||||
-- То же, но для оси Z (по-умолчанию 0, 0, 1)
|
||||
block.get_Z(x: int, y: int, z: int) -> int, int, int
|
||||
block.get_Z(id: int, rotation: int) -> int, int, int
|
||||
|
||||
-- Возвращает индекс поворота блока в его профиле вращения (не превышает 7).
|
||||
block.get_rotation(x: int, y: int, z: int) -> int
|
||||
|
||||
Reference in New Issue
Block a user