用户:
ZCH幻影深渊查看:9 回复:8 评论:9 创建时间:2020-05-11T22:48:11
// 血量可以修改,数字
$.getEntityByName('你要坑的人').hurt(1);})();
// 设置别人的血量,0可以修改
$.getEntityByName('你要坑的人').hp=0;
})();
速度可以修改
$.getEntityByName('你要坑的人').velocity=new Box3Vector3(0,0,0,);
})();
移动其他人
function sjs(){this.getEntityByName=function(l){if(v={res:null,name:l},world.querySelectorAll("player").forEach(l=>{l.player.name==v.name&&(v.res=l)}),v.res)return v.res;this.enabledWarning&&console.warn('警告:无法找到玩家名为 "'+l+'" 的玩家')},this.replaceBlock=function(l,t){for(count=0,x=0;x<128;x++)for(z=0;z<128;z++)for(y=0;y<喵;y++)voxels.getVoxel(x,y,z)==l&&(voxels.setVoxel(x,y,z,t),count+=1);this.enabledInfo&&console.log("已替换"+count+"个方块")},this.enabledWarning=!0,this.enabledInfo=!0,this.initFallDamage=function(){this.fallDamageCount=1,this.minFallHeight=3,world.onPlayerJoin(({entity:l})=>{l.fallStart=-999,l.enableDamage=!0,l.showHealthBar=!0}),world.onTick(()=>{world.querySelectorAll("player").forEach(l=>{l.velocity.y>=0&&(l.fallStart-l.position.y>this.minFallHeight&&l.hurt((l.fallStart-l.position.y)*this.fallDamageCount),l.fallStart=-999),l.velocity.y<=0&&-999==l.fallStart&&(l.fallStart=l.position.y)})})}}$=new sjs,world.$=$;
(async function(){
$.getEntityByName('你要坑的人').position=new Box3Vector3(0,0,0);
})();