
Lv.1
在 求跑酷代码师,建筑师 中回复
imgsrc="https://static.codemao.cn/emotion/thunder_monkey/%E9%9B%B7%E7%94%B5%E7%8C%B4-%E4%B8%BE%E6%89%8B1.gif"alt="emotion_雷电猴_举手"
2024-01-29T17:45:55 点赞:0
在 代码岛跑酷代码 中回复
这是整理后的代码(不含注释):
for(let x=0; x<256; x++){
for(let z=0; z<256; z++){
voxels.setVoxel(x, 8, z, 'water')
}
}
world.onPlayerJoin(({ entity }) => {
entity.onFluidEnter(() => {
entity.position.copy(entity.player.spawnPoint)
entity.position.y += 2
})
})
for (const e of world.querySelectorAll('*')) {
if (e.id.startsWith('跑酷存档点')) {
e.collides = true
e.fixed = true
if (e.position !== other.player.spawnPoint) {
other.player.directMessage('存档成功!')
other.player.spawnPoint = e.position
}
}
}2024-07-01T20:18:18 点赞:1