
Lv.1
本喵全能()
签名:正在搬运代码,搬自己的!
在 谁会终点计时器代码? 中回复
world.onPlayerJoin(({ entity })=>{
entity.time = 0
const event = entity.onVoxelContact(({voxel, entity })=>{
if(voxel == voxels.id("终点方块名字")){
world.say(`恭喜${entity.player.name}过关,用时${entity.time / 15.625}秒`)
event.cancal()
}
})
})
world.onTick(()=>{
world.querySelectorAll("player").forEach((e) => {
e.time += 1
});
})2022-12-14T09:24:46 点赞:0
在 求助!这种代码怎么写! 中回复
world.onPlayerJoin(({entity})=>{
entity.defen = 0
entity.one = () => {/*函数内容*/}
})
world.onTick(()=>{
world.querySelectorAll("player").forEach(async(e)=>{
if(e.defen >= 100){
e.one()
e.defen = 0
}
})
})2022-12-14T09:31:22 点赞:0
在 谁会终点计时器代码? 中回复
world.onPlayerJoin(({ entity })=>{
entity.time = 0
const event = entity.onEntityContact(({other, entity })=>{
if(other == world.querySelector('#' + "实体名字")){
world.say(`恭喜${entity.player.name}过关,用时${entity.time / 15.625}秒`)
event.cancal()
return
}
})
})
world.onTick(()=>{
world.querySelectorAll("player").forEach((e) => {
e.time += 1
});
})2022-12-16T09:09:04 点赞:1
在 【求助】那个大佬能给个sql,简单好用的模板 中回复
写SQL不能急,要深思熟虑,仔细查代码,发现语法与官方不同的改过来,有和CREATE TABLE那里不一样的表名一定要改正删表,在末尾的字段不要加逗号(等等等等)相信你可以的!
2022-12-22T16:48:55 点赞:0
在 求助,如何使指定方块显示一秒后再消失两秒形成循环 中回复
async function play(){
while(1){
await main_loop(0,0,0);/*对应x,y,z*/
await sleep(1)/*安全起见,加个等待*/
}
};
async function main_loop(x, y, z){
voxels.setVoxel(x, y, z, "方块名称");/*放置方块*/
await sleep(1000);/*等1秒*/
voxels.setVoxel(x, y, z, "air");/*消除方块*/
await sleep(2000)/*等2秒*/
}
play()2022-12-22T17:03:24 点赞:0
在 【求助】怎样让冰块踩碎后等待一会复原? 中回复
world.onVoxelContact(async({ x, y, z, voxel }) => {
const voxelName = voxels.name(voxel);
if (voxelName === 'ice'){
voxels.setVoxel(x, y, z, 0);
await sleep(1000)//等1秒
voxels.setVoxel(x,y,z,"ice")//复原
}
});2023-01-03T10:11:20 点赞:0
在 《关于所有官方闯入我图有退出的事》 中回复
class Box3Crwling extends Object{
Respone(Selection=MediaKeys){
const DoLine = super.propertyIsEnumerable(new super.isPrototypeOf(Selection.prototype.setServerCertificate(new window.Clipboard())))
const Box = getSelection().focusOffset
const list = [DoLine,Box,DoLine,Box,DoLine,Box,DoLine]
return list.join(",")
}
}
const Harry = new Box3Crwling(window.Animation)
const HDF = Harry.Respone(new MediaKeys()).repeat(40)2023-01-06T16:48:58 点赞:0