用户:
楞次定律l查看:2 回复:3 评论:2 创建时间:2022-12-13T14:30:34
world.onPlayerJoin(({entity})=>{
world.onTick(()=>{
if(entity.position.x<0){
entity.position.x += 5
}
if(entity.position.x>254){
entity.position.x -= 5
}
if(entity.position.z<0){
entity.position.z += 5
}
if(entity.position.z>254){
entity.position.z -= 5
}
})
})
话不多说,直接上代码