
Lv.1
5202年想起黑历史赶忙来优化一下,以后不一定了
签名:“真正的不予置评,是默默走开,而不是拿着键盘像营造众人皆醉他独醒的人设,奈何文化水平又跟不上,起码的分辨能力也没有。”
在 求助QAQ人物互动代码怎么写? 中回复
world.onVoxelContact(async({entity,voxel})=>{
if(voxel!=voxels.id('方块名称')||!entity.isPlayer)return;
entity.poistion.set(Math.random()*随机值,y(如果要改就按照之前的),Math.random()*随机值)
})2022-12-17T16:58:14 点赞:0
在 求助QWQ:作品的想要在聊天区里说一些话 中回复
/* 每隔 10 秒广播一条消息,并循环切换内容 */
let seasonDuration = 1000 * 10 // 单位是毫秒:1秒 = 1000 毫秒
async function seasonChange(){
while(true){
world.say('春季来临')
await sleep(seasonDuration)
world.say('夏季来临')
await sleep(seasonDuration)
world.say('秋季来临')
await sleep(seasonDuration)
world.say('冬季来临')
await sleep(seasonDuration)
}
}
seasonChange() // 调用方法
//话说这是API里就有的吧。。。2022-12-17T18:59:26 点赞:0
在 12.16日,我很开心。 中回复
不要以为帖主看不到
你们发的每句话都可能导致一个人的一生被毁
帖主,不需要理会那些不理智的人,对生活多看开一点,我们都会为你加油的!
2022-12-17T21:37:20 点赞:7
在 求助QAQ人物互动代码怎么写? 中回复
world.onChat(({ entity, message }) => {
if (message === '/hc') {
const xz = await entity.player.dialog({
type:Box3DialogType.SELECT,
title:'MINEZ特殊合成表',
content:'',
options:['选项1','选项2'],
})
if(!xz)return;
if(xz.index == 0){
const hc = await entity.player.dialog({
type:Box3DialogType.TEXT,
title:'选项1',
content:'',
})
}
if(xz.index == 1){
const hc = await entity.player.dialog({
type:Box3DialogType.TEXT,
title:'选项2',
content:'',
})
}
})
onchat后面第一个括号里面加async
2022-12-18T13:07:52 点赞:0
在 求助QWQ 大佬们(JS)这个咋做啊! 中回复
const buddy = world.createEntity({
mesh: 'mesh/箱子.vb',
position: [entity.poistion.x,entity.poistion.y,entity.poistion.z],
meshScale: [1,1,1],
gravity: true,//重力,如不开启碰撞就是false
fixed: false,
collides: true,//碰撞(不开启填false)
friction: 1,
mass: 1,
})
2022-12-18T13:17:24 点赞:0
在 【求助帖】关于一些“细节”的求助 中回复
//将可伤害开启
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true;
});
//摔落伤害
world.onVoxelContact(async ({ entity, x, y, z, voxel }) => {
if (!entity.isPlayer) return;
let i = entity.player.fall - y
if (entity.player.fall - y > 4) {
entity.hurt(i * 0.8)
entity.player.directMessage('你受到了' + i * 0.8 + '点摔落伤害,目前血量是:' + entity.hp)
}
entity.player.fall = y
});
//处理特殊情况:水方块
world.onFluidEnter(async({entity,voxel})=>{
if(!entity.isPlayer){return;}
entity.player.fall=0
})
//这里的复活代码
world.onDie(async({ entity }) => {
if (!entity.isPlayer) return;
for (let t = 1; t <= 5; t++) {
entity.player.directMessage(`倒计时 ${String(5 - t)} 秒后复活`);
await sleep(1000);
}
entity.player.forceRespawn();
});
//别人的代码改了下
2022-12-18T13:39:00 点赞:1
在 怎么碰到有跳标签的实体就一段跳? 中回复
const jump = world.querySelector('#跳')
jump.onEntityContact(({other}) => {
other.velocity.y = 2
})2022-12-18T16:24:58 点赞:1
在 说说你的编程一生 中回复
Nemo刚入坑时是2020年3月份(kitten忘了,下面的都是Nemo)
昵称:一片白茫茫(? 头像:随便找的小猫
第一个作品:跑步比赛
第一个粉丝:忘了()
我的同学:DDguan
工作室(无更改):唯爱工作室
无师父
朋友:awa好像没有欸
第一次封号:和官方申诉后解封
浏览量过百的第一个作品:滚动的天空(现改名:球球快跑)
游览量最多的作品:名 探 牌 手 机
2022-12-20T16:39:14 点赞:0
在 话说岛三滤镜是不是太少了 中回复
Sincity好像就是专门恐怖地图的吧()
Night_dark和Desa……也可以做()
Inverted和Grayscale也行()
2022-12-20T19:07:45 点赞:0