
Lv.1
在 求助,返回存档点代码 中回复
world.onVoxelContact(({ x, y, z, voxel,entity }) => {
const voxelName = voxels.name(voxel); // 将方块id转换名称
if (voxelName === 'grass'){ // 如果方块名称是grass
entity.position.copy(entity.player.spawnPoint)
entity.position.y += 4
}
});2021-10-24T20:14:44 点赞:0