sapi-pro / ChunkUtils
有关区块的工具
staticgetChunkEntities(dimensionId,pos):Entity[]
获取指定位置的区块中,全部的实体和玩家的ID列表
维度Id
Vector3
指定位置的坐标
Entity[]
实体和玩家的ID的列表,当指定位置的区块不存在或尚未加载时,返回空数组
staticgetChunkMaxPos(chunkPos):Vector3
获取某区块最大点的坐标
VectorXZ
指定区块的坐标
Vector3
该区块最大点的坐标(y为319)
staticgetChunkMinMaxPos(pos):object
根据坐标获取区块的最小点与最大点,y不变
Vector3
指定位置坐标
object
max:
object
x:
number
X component of this vector.
y:
number=pos.y
z:
number
Z component of this vector.
min:
object
x:
number
X component of this vector.
y:
number=pos.y
z:
number
Z component of this vector.
staticgetChunkMinPos(chunkPos):Vector3
获取某区块最小点的坐标
VectorXZ
指定区块的坐标
Vector3
该区块最小点的坐标(y为-64)
staticgetChunkPosFromBlockPos(pos):VectorXZ
通过方块坐标获得该方块所在区块坐标
Vector3
方块的坐标
VectorXZ
该方块所在区块的坐标