Lv.1
……
在 【BoxJS萌新教程】BoxJS 从入门到实战 第二期——变量原来是个盒子?! 中回复
1.console.log里不是114514我不是很理解(
2.把变量当成盒子我不是很理解(
3.不加关键字也能行
4.好短()
5.6
6.龙椅
2023-05-08T13:20:13 点赞:0
在 神奇代码岛代码师知识竞答() 中回复
C. JavaScript
D. console.log("Hello, world!")
C. /* 这是一个多行注释 */
B. function func()
C. func`Hello`
D. voxels.setVoxel(1,2,3,voxels.id('white'))
D. world.ambientSound.sample='audio/bgm.mp3'
B. world.onPlayerJoin({entity}=>{world.say("欢迎 "+entity.player.name+" 进入地图")})
D. ({}+{}==={}+{})
D. world.querySelectorAll('*').filter(function(e){return e.hasTag('a')||e.hasTag('b')})
D. 随机取指定范围内的一位小数
D. Math.max.apply(0,arr)
2023-05-08T13:35:16 点赞:0
在 【BOX3教程】如何做投掷物发射 中回复
const pl = world.querySelectorAll('player').find(e => e.player.name == entity.zhu) pl.position = new Box3Vector3(entity.voxelContacts[0].x, entity.voxelContacts[0].y + 2, entity.voxelContacts[0].z) 末影珍珠 去了onTick就是火焰弹了()()()()()()()()
2023-05-19T22:57:43 点赞:0
在 【BOX3教程】如何做投掷物发射 中回复
加上我之前的背包代码:
world.onPress(async ({ entity, raycast }) => {
let e = world.createEntity({
position: entity.position.add(new Box3Vector3(raycast.direction.x, raycast.direction.y, raycast.direction.z)),//生成位置
mesh: `mesh/投掷物名称.vb`,//投掷物名称
gravity: false,//取消下落
collides: true,//开启碰撞
meshScale: new Box3Vector3(0.05, 0.05, 0.05),//大小
meshOrientation: new Box3Quaternion(0,0,0,1).rotateY( Math.atan2( raycast.direction.z, raycast.direction.x)).rotateY(Math.PI / 2),
//按照MC那样,不考虑上下的旋转,我的模型是X X 1的,如果是1 X X的不用加第二个rotateY(应该吧我也没试过)
velocity: raycast.direction.mul(new Box3Vector3(2, 2, 2)),//设置velocity,mul里的数字随便搞,114514都可以()
fixed: false,//因为有velocity,所以要让实体能动起来
friction: 1.5,//也是,随便选,推荐1.2+,2-,这个期间的实体碰到东西后,会停止(或者向前滑行一段,大约1.4+(含1.4)会回弹一段())
})
findNum(entity,1)
})
function findNum(entity, type) {
if (type == 1) {
if (entity.setUp.onhand[0].slice(entity.setUp.onhand[0].indexOf('*') + 1) == 1) {
entity.setUp.bar[entity.setUp.onhand[1]] = '空'
entity.setUp.onhand[0] = '空'
} else {
let bar = entity.setUp.bar[entity.setUp.onhand[1]]
entity.setUp.bar[entity.setUp.onhand[1]] = bar.slice(0, bar.indexOf('*') + 1) + (Number(bar.slice(bar.indexOf('*') + 1)) - 1)
entity.setUp.onhand[0] = entity.setUp.bar[entity.setUp.onhand[1]]
}
}
//什么?不知道我之前做的什么?https://shequ.codemao.cn/community/539206
}2023-05-19T23:03:07 点赞:1
在 MC伤害计算代码(JE1.9+/BE1.19+) 中回复
万恶的屯格式
let protection =armor.includes('保护II') ? 2 : 0
let defense =armor.includes('钻石') ? 8 : 0
let toughness = armor.includes('钻石') ? 2 : 0
entity.hurt(takeDamage(伤害,defense,toughness,protection))2023-06-05T19:37:40 点赞:1
在 再看一眼就会爆炸! 中回复
伤害计算错了,这样距离越远伤害越高()正确的:
e.hurt(takeDamage(r * 2 - e.position.distance(new Box3Vector3(x, y, z)), defense, toughness, protection), { damageType: '爆炸了' })当然还是希望伤害计算自己写,因为这是我编的(2023-06-08T18:38:03 点赞:0
在 你现在在dao3还是在box3呢 中回复
之后就会发现dao3里出现了potPVP,bw,rbw,喵科技,纯生存,私服,还有万变不离其宗的氪金和觉醒哥
直接取代冈易mc()
2023-08-23T18:45:39 点赞:0