js制作大师吧 关注:351贴子:2,417

回复:[mcpe]算法

只看楼主收藏回复

setTile(x-2,y+50,z+1,98,1)
setTile(x-2,y+51,z+1,98,jf)
setTile(x-2,y+52,z+1,98,jf)
setTile(x-1,y+50,z+1,98,0)
setTile(x+1,y+49,z+1,98,1)
setTile(x+1,y+50,z+1,98,1)
setTile(x+1,y+51,z+1,98,jf)
setTile(x+1,y+52,z+1,98,1)
setTile(x,y+53,z+1,98,1)
setTile(x-1,y+53,z+1,98,0)
setTile(x,y+48,z+1,3,0)
setTile(x+1,y+48,z+1,3,0)
setTile(x,y+49,z+1,98,1)
setTile(x-1,y+49,z+1,98,1)
setTile(x,y+49,z,98,1)
setTile(x-1,y+49,z,98,jf)
setTile(x-2,y+49,z,98,1)
setTile(x+1,y+49,z,98,jf)
setTile(x,y+49,z-1,98,1)
setTile(x-1,y+49,z-1,98,jf)
setTile(x-2,y+49,z-1,98,jf)
setTile(x+1,y+49,z-1,98,1)
setTile(x,y+49,z-2,98,1)
setTile(x-1,y+49,z-2,98,jf)
setTile(x-2,y+49,z-2,98,jf)
setTile(x+1,y+49,z-2,98,1)
setTile(x,y+50,z,54,0)
setTile(x-3,y+49,z,98,jf)
setTile(x-3,y+49,z+1,98,jf)
setTile(x-3,y+49,z-1,98,jf)
setTile(x-3,y+49,z-2,98,jf)
setTile(x-3,y+49,z-3,98,jf)
Level.spawnMob(x,y+50,z-2,34)
if(Math.random()*100<80){
Level.setChestSlot(x,y+50,z,kk,ty,0,1)}
if(Math.random()*100<80){


IP属地:广东来自Android客户端22楼2016-01-28 17:50
回复
    Level.setChestSlot(x,y+50,z,kj,uy,0,1)}
    if(Math.random()*100<80){
    Level.setChestSlot(x,y+50,z,jk,yy,0,1)}
    if(Math.random()*100<80){
    Level.setChestSlot(x,y+50,z,jj,ii,0,1)}
    if(Math.random()*100<75){
    Level.setChestSlot(x,y+50,z,nn,mm,0,1)}
    if(Math.random()*100<75){
    Level.setChestSlot(x,y+50,z,gz,aa,dd,1)}
    if(Math.random()*100<30){
    Level.setChestSlot(x,y+50,z,gz,aa,dd,ny)
    }}}}}


    IP属地:广东来自Android客户端23楼2016-01-28 17:50
    回复
      这就是了,有个问题就是有时箱子里会出现物品0,但是可能性很小。


      IP属地:广东来自Android客户端24楼2016-01-28 17:52
      回复
        指定坐标生成算法
        function modTick(){
        for(var d=20;d<=35;d++){
        for(var t=-1;t<=5;t++){
        if(Math.random()*100<10){
        x= Player.getX()
        y= Player.getY()
        z= Player.getZ()
        if(getTile(x+d,y+t,z)==37){
        Level.setTile(x+d,y+t,z,41)}
        if(getTile(x-d,y+t,z)==37){
        Level.setTile(x-d,y+t,z,41)}
        if(getTile(x,y+t,z+d)==37){
        Level.setTile(x,y+t,z+d,41)}
        if(getTile(x,y+t,z-d)==37){
        Level.setTile(x,y+t,z-d,41)}}}}}


        IP属地:广东来自Android客户端27楼2016-01-29 19:14
        回复
          这个算法可以做到在指定坐标生成方块和生物。


          IP属地:广东来自Android客户端28楼2016-01-29 19:15
          回复
            棒棒哒,继续呀
            我相信我就是我(是个大水逼)
            我相信明天(就能18级)
            我相信我不是大水逼(谁信啊)
            在被爆的贴吧,在热闹的水楼()
            都是我水贴的乐园()
            I do 凤梨~()
               --来自QQ音乐[我相信]


            来自Android客户端29楼2016-02-05 16:15
            回复
              让世界中随机生成建筑完成,让世界中的村庄,地牢里的箱子里随机生成物品完成。


              IP属地:广东来自Android客户端32楼2016-02-06 11:09
              回复
                下个目标,让世界中出现新的地形,再来个难点的弄个自己的世界出来,全是各种羊毛的世界,别笑我,这是可以做到的。


                IP属地:广东来自Android客户端33楼2016-02-06 11:12
                收起回复
                  呵呵


                  来自Android客户端35楼2016-02-20 22:40
                  回复