检索指定坐标处方块的数字 ID。这是 getVoxel 的一个更高效的版本。
返回的方块 ID 是带旋转码的 ID。
En
Retrieves the numeric ID of the voxel at the specified coordinates.
This is a more performant version of getVoxel. The returned ID
includes rotation bits.
在指定坐标处设置一个带旋转信息的方块,并返回完整的数值 ID。
传入的 voxel 为基础方块 ID,最终返回的 ID 将包含旋转码。
En
Sets a voxel with rotation at the given coordinates and returns the full
numeric ID including rotation bits. The voxel argument is the base ID,
and the returned value includes the rotation.
Zh
x 坐标。
En
The x-coordinate.
Zh
y 坐标。
En
The y-coordinate.
Zh
z 坐标。
En
The z-coordinate.
Zh
基础方块数值 ID(不含旋转码)。
En
The base numeric voxel ID (without rotation bits).
Zh
旋转码,将编码进返回的 ID 中。
En
The rotation code that will be encoded into the returned ID.
在指定坐标处通过方块 ID 或方块名设置一个方块(不使用旋转,或旋转为 0),
并返回不带旋转码的 voxelId,否则返回 0。
En
Sets a voxel at the given coordinates using a voxelId or voxelName
without rotation (or with rotation 0) and returns a plain voxelId.
When rotation is not applicable, 0 is returned.
Zh
x 坐标。
En
The x-coordinate.
Zh
y 坐标。
En
The y-coordinate.
Zh
z 坐标。
En
The z-coordinate.
Zh
要设置的方块,可以是方块 ID 或方块名。
En
The voxel to set, either as a voxelId or a voxelName.
Zh
可选旋转码,为 0 或未传入时表示不使用旋转。
En
Optional rotation code. 0 or undefined means no rotation.
Zh
成功设置且不含旋转信息时返回 voxelId,否则返回 0。
En
Returns a voxelId when set without rotation; otherwise returns 0.
在指定坐标处通过数值 ID 设置一个方块,并返回最终写入的数值 ID。
此处 voxel 可以是带旋转码的 ID,返回值同样是带旋转码的 ID。
En
Sets a voxel at the given coordinates using a numeric ID and returns the
actual ID that is stored. The voxel argument may already include rotation
bits, and the returned value will also include them.
Zh
x 坐标。
En
The x-coordinate.
Zh
y 坐标。
En
The y-coordinate.
Zh
z 坐标。
En
The z-coordinate.
Zh
方块的数值 ID,可以包含旋转码。
En
The numeric voxel ID to set, which may include rotation bits.
Zh
实际写入的数值 ID(可能包含旋转码)。
En
The numeric ID actually stored (possibly including rotation bits).
Sets a voxel at the given coordinates using a voxelId.
If the provided ID is a plain voxelId without rotation bits, the
returned value is also a plain voxelId; otherwise 0 is returned.
Resolves the voxel name from a numeric voxel ID.
IDs that include rotation bits are also supported and will be
correctly mapped to the base voxel name.
Zh
方块的数值 ID,可以包含旋转码。
En
The numeric voxel ID, possibly including rotation bits.
GameVoxels 提供了游戏中所有方块的接口。您可以使用它来控制地形。
Link
https://docs.dao3.fun/arenapro/zh/difference/voxel.html