Lv.1
希望多一点人理解我多一点人懂我——————幕玄夜
签名:疯狂的打代码中.......
在 【代码岛3.0】挖方块代码 中回复
world.onPress(({button,raycast:{voxelIndex,hitEntity},entity})=>{ if(button=='action0'){ console.clear(); console.warn('position:'); console.log(`${voxelIndex.x},${voxelIndex.y},${voxelIndex.z}`); console.warn('clicker:'); console.log(entity.player.name); console.warn('hit player:'); try{ console.log(hitEntity.player.name); }catch(err){ console.log('nothing-'+err); } voxels.setVoxel(voxelIndex.x,voxelIndex.y,voxelIndex.z,'air'); return; }else if(button=='action1'){console.clear(); console.warn('position:'); console.log(`${voxelIndex.x},${voxelIndex.y},${voxelIndex.z}`); console.warn('clicker:'); console.log(entity.player.name); console.warn('hit player:'); try{ console.log(hitEntity.player.name); }catch(err){ console.log('nothing-'+err); } voxels.setVoxel(voxelIndex.x,voxelIndex.y + 1,voxelIndex.z,'dark_stone'); return; }
})
2020-06-22T11:36:49 点赞:0
在 【代码岛3.0】挖方块代码 中回复
world.onPress(({button,raycast:{voxelIndex,hitEntity},entity})=>{ if(button=='action0'){ console.clear(); console.warn('position:'); console.log(`${voxelIndex.x},${voxelIndex.y},${voxelIndex.z}`); console.warn('clicker:'); console.log(entity.player.name); console.warn('hit player:'); try{ console.log(hitEntity.player.name); }catch(err){ console.log('nothing-'+err); } voxels.setVoxel(voxelIndex.x,voxelIndex.y,voxelIndex.z,'air'); return; }else if(button=='action1'){console.clear(); console.warn('position:'); console.log(`${voxelIndex.x},${voxelIndex.y},${voxelIndex.z}`); console.warn('clicker:'); console.log(entity.player.name); console.warn('hit player:'); try{ console.log(hitEntity.player.name); }catch(err){ console.log('nothing-'+err); } voxels.setVoxel(voxelIndex.x,voxelIndex.y + 1,voxelIndex.z,'dark_stone'); return; }
})
2020-06-22T11:37:26 点赞:0