用户:
严肃的狂电猴tSkb查看:13 回复:23 评论:13 创建时间:2020-08-28T15:55:03
月战老兵(async function(){var i, j;function mathRandomInt(a, b) { if (a > b) { var c = a; a = b; b = c; } return Math.floor(Math.random() * (b - a + 1) + a);}world.say('毁图炸弹即将爆炸!');console.warn('毁图炸弹即将爆炸!');for (i = 1; i <= 9; i++) { await sleep(1000); console.clear(); world.say(['当前还剩',10 - i,'秒爆炸!'].join('')); console.error((['当前还剩',10 - i,'秒爆炸!'].join('')));}await sleep(1000);console.clear();world.say('轰~~~');console.warn('你失败了~');for (j = 1; j <= 10000; j++) { voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("air"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("air"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("air"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("leaf_01"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("leaf_02"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("dirt"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("grass"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("stone"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("green_leaf"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("snowland"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("ice"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("polar_ice"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("polar_region"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("rock"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("water"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("wooden_box"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("glass"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("board_01"))); voxels.setVoxel((mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(mathRandomInt(0, 128)),(voxels.id("stainless_steel"))); await sleep(1);}console.log('你熬过了输入者对你的折磨');world.say('毁图结束');})();
还原
(async function(){var x, z, y;world.say('地图即将重置,可能会有点卡……');for (x = 0; x <= 128; x++) { for (z = 0; z <= 128; z++) { for (y = 9; y <= 128; y++) { voxels.setVoxel(x,y,z,(voxels.id("air"))); } }}for (x = 0; x <= 128; x++) { for (z = 0; z <= 128; z++) { y = 8; voxels.setVoxel(x,y,z,(voxels.id("grass"))); }}for (x = 0; x <= 128; x++) { for (z = 0; z <= 128; z++) { for (y = 2; y <= 7; y++) { voxels.setVoxel(x,y,z,(voxels.id("dirt"))); } }}for (x = 0; x <= 128; x++) { for (z = 0; z <= 128; z++) { y = 1; voxels.setVoxel(x,y,z,(voxels.id("stone"))); }}world.say('地图重置完毕');})();点赞0
评论
科技改变时代for (let i = 0; i < 137; i++) {
for (let j = 0; j < 128; j++) {
for (let k = 0; k < 128; k++) {
voxels.setVoxel(i, j, k, 'air')
}
}
}点赞0
评论
CodeStar_world.onPress(async({ button, entity, raycast }) => { //事件 if(button ==='action0'){ const ball =world.createEntity({//放个模型 mesh:"mesh/TNT.vb", collides:true, meshScale:[0.06,0.06,0.06], position:[entity.position.x+raycast.direction.x, entity.position.y+raycast.direction.y, entity.position.z+raycast.direction.z], }) ball.onVoxelContact(({ x, y, z, voxel }) => {//TNT碰到了方块 sphere('air',ball.position.x,ball.position.y,ball.position.z,100)//造一个空气球 ball.destroy()//删除TNT }); ball.velocity.x += raycast.direction.x*2; ball.velocity.y += raycast.direction.y*2; ball.velocity.z += raycast.direction.z*2; } })
点赞0
评论
CodeStar_world.onPress(async({ button, entity, raycast }) => { //事件
if(button ==='action0'){
const ball =world.createEntity({//放个模型
mesh:"mesh/TNT.vb",
collides:true,
meshScale:[0.06,0.06,0.06],
position:[entity.position.x+raycast.direction.x, entity.position.y+raycast.direction.y, entity.position.z+raycast.direction.z],
})
ball.onVoxelContact(({ x, y, z, voxel }) => {//TNT碰到了方块
sphere('air',ball.position.x,ball.position.y,ball.position.z,100)//造一个空气球
ball.destroy()//删除TNT
});
ball.velocity.x += raycast.direction.x*2; ball.velocity.y += raycast.direction.y*2; ball.velocity.z += raycast.direction.z*2;
}
})点赞0
评论
好奇的疾电猴422回复 @武夷岩:
你这个,我试了……
然后……:

……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
点赞0
评论