用户:
LOUISQII查看:372 回复:3 评论:13 创建时间:2022-11-15T08:28:21
到了冬天,我想把我的跑酷地面的水都弄成冰。用了代码之后,我以前的跑酷代码师碰到液体水才返回,现在的固体方块冰不行了。我在碰水喵的基础上改了一些: world.onPlayerJoin(({entity})=>{ world.onVoxelContact(({x,y,z,voxel})=>{ constvoxelName=voxels.name(voxel); if(voxelName==='ice'){ entity.position.copy(entity.player.spawnPoint) entity.position.y+=4 entity.player.directMessage('落冰回到最近的保存点') } }); }) 然后发布。结果,我发现地图的人多了好多。发布后我才知道(因为我这个图没有合作者),我这个代码一个人碰到了冰,其他人也跟着回到保存点。我试着这样: world.onPlayerJoin(({entity})=>{ if(!TEST_PLAYER.includes(entity.player.name))return world.onVoxelContact(({x,y,z,voxel})=>{ constvoxelName=voxels.name(voxel); if(voxelName==='ice'){ entity.position.copy(entity.player.spawnPoint) entity.position.y+=4 entity.player.directMessage('落冰回到最近的保存点') } }); }) 我不用发布都知道,这样肯定是不行的。 所以,我搞不出来和水一样效果的代码,请哪位大佬帮帮我。 被我用上的人我会给他所有的作品点赞,收藏;关注他的点猫和神岛账号 岛名:萌新代码师
盗码师我来,链接给我
点赞0
评论
又没让你当合作者 我的意思是只想要代码 你给我代码我可以给你点赞收藏关注
az
我帮你写完我就自己结束合作啊我
上面以前代码 你看看能不能在这基础上改一改
把第一次的world.onPlyaerjion删了
复活改一下
entity.player.forceRespawn();
什么改成什么 复活的代码是不是entity.position.copy(entity.player.spawnPoint)
你这是复制的吧……
呵呵。找吉吉喵的
LOUISQII又双叒叕被吃格式了。
代码如下:
第一次代码:
world.onPlayerJoin(({ entity }) => {
world.onVoxelContact(({ x, y, z, voxel }) => {
const voxelName = voxels.name(voxel);
if (voxelName === 'ice'){
entity.position.copy(entity.player.spawnPoint)
entity.position.y += 4
entity.player.directMessage('落冰回到最近的保存点')
}
});
})
第二次代码:
world.onPlayerJoin(({ entity }) => {
if (!TEST_PLAYER.includes(entity.player.name)) return
world.onVoxelContact(({ x, y, z, voxel }) => {
const voxelName = voxels.name(voxel);
if (voxelName === 'ice'){
entity.position.copy(entity.player.spawnPoint)
entity.position.y += 4
entity.player.directMessage('落冰回到最近的保存点')
}
});
})
点赞0
评论
哇塞头一次见这么狂的人,自己代码有问题还不肯承认,人家热心想去你地图修还怕人家毁图,这是个什么世道)
点赞0
评论
你可以举报我 也可以举报我的作品 甚至可以举报我要把代码用在我的图上的作品 链接:https://box3.codemao.cn/g/486062 我没有恶意
https://box3.codemao.cn/e/915ed61775b03b69267d?p=C0tPBAVlHzl75YJUOEkc8K喵wfiaf%2F%喵Wt36jUH1IFtA6eglnPHMAVndWVzdA%3D%3D
喵?