js制作大师吧 关注:352贴子:2,417
1L镇楼


IP属地:广东来自Android客户端1楼2016-01-10 15:46回复
    本贴会一直更新钩子函数的一些算法和一些新的启动器函数。


    IP属地:广东来自Android客户端2楼2016-01-10 15:48
    回复
      因为我对JS接触非常少,很少上贴吧, 一两天就对JS失去了乐趣, 只在觉得JS又非常有趣时才会继续更下去,所以更新非常之慢。


      IP属地:广东来自Android客户端3楼2016-01-10 15:54
      回复
        如有JS遇到问题,可来此贴求助,我会尽我最大能力,帮助你解决问题。


        IP属地:广东来自Android客户端4楼2016-01-10 15:55
        收起回复
          药水ID
          1—速度
          2—缓慢
          3—急迫
          4—挖掘疲劳
          5—力量
          6—瞬间治疗
          7—瞬间伤害
          8—跳跃提升
          9—反胃
          10—生命恢复
          11—抗性提升
          12—防火
          13—水下呼吸
          14—隐身
          15—失明
          16—夜视
          17—饥饿
          18—虚弱
          19—中毒
          20—凋零
          21—生命提升
          22—伤害吸收
          23—饱和


          IP属地:广东来自Android客户端6楼2016-01-10 16:11
          回复
            附魔ID
            装备附魔属性ID
            保护:0
            火焰保护:1
            摔落保护:2
            爆炸保护:3
            弹射物保护:4
            荆棘:5
            水下呼吸:6
            深海探索者:7
            水下速掘:8
            武器附魔属性ID
            锋利:9
            亡灵杀手:10
            载肢杀手:11
            击退:12
            火焰附加:13
            抢夺:14
            力量:19
            冲击:20
            火矢:21
            无限:22
            工具附魔属性ID
            效率:15
            精准采集:16
            耐久:17
            时运:18
            海之眷顾:23
            钩铒:24


            IP属地:广东来自Android客户端7楼2016-01-10 16:26
            回复
              吃食物钩子函数,获得药水效果算法
              function eatHook(kk,dd){
              kd=Player.getCarriedItem()
              if(kd==食物的ID){
              Entity.addEffect(getPlayerEnt(),3,60*20,0,false,true)}}


              IP属地:广东来自Android客户端8楼2016-01-10 17:36
              回复
                实体ID/模型ID
                鸡:10/5
                牛:11/6
                猪:12/8
                羊:13/9
                狼:14/11
                村民:15/12
                哞菇:16/7
                鱿鱼:17/34
                兔子: 18/
                蝙蝠:19/10
                铁傀儡: 20/
                雪傀儡: 21/
                豹猫: 22/
                僵尸:32/14
                爬行者:33/21
                骷髅:34/18
                蜘蛛:35/19
                僵尸猪人:36/15
                史莱姆:37/22
                末影人:38/23
                蠹虫:39/20
                洞穴蜘蛛:40/19
                恶魂:41/17
                岩浆怪:42/16
                烈焰人: 43/
                僵尸村民: 44/
                玩家:63/27 -无效
                点燃的TNT:65/2
                掉落的方块:66/31
                附魔瓶/药水: 68/69
                经验: 68/
                鱼钩:77/25
                射出去的箭矢:80/24
                丢出去的雪球:81/29
                丢出去的鸡蛋:82/28
                画:83/30
                矿车:84/32
                恶魂丢出去的火球:85/35
                鱼钩: 86/
                船:90/33
                丢出去的火球: 94/


                IP属地:广东来自Android客户端11楼2016-01-10 18:15
                回复
                  等我把自定义实体看会了,大部分的JS对我而言就没什么困难了之后在把那些因难的JS看会后,我就要退出JS了。


                  IP属地:广东来自Android客户端12楼2016-01-10 20:46
                  收起回复
                    如何获最新启动器的函数
                    先打开启动器,之后点上面那个gui会出现 之后点启动器设置,进去后一直下拖会看见 在点计算机迷的东西 进去后点重新启动程序下面那行英文就可以看见新的函数了,不过要自己翻译函数的作用,自己怎么翻译,我的办法是写上新的函数自己去测试它的作用。




                    IP属地:广东来自Android客户端14楼2016-01-10 21:04
                    回复
                      function
                      entityAddedHook(e){
                      gwfn(e)}
                      function gwfn(e){
                      if(Entity.getEntityTypeId(e)==10&&Entity.getAnimalAge(e)==0){
                      x= Entity.getX(e)+300*Math.random()
                      y= Entity.getY(e)
                      z= Entity.getZ(e)+300*Math.random()
                      cc=3*Math.random()
                      if(getTile(x,y-cc,z)==1||getTile(x,y-cc,z)==2||getTile(x,y-cc,z)==12||getTile(x,y-cc,z)==78){
                      jf=2*Math.random()
                      bp=36*Math.random()
                      tx=15*Math.random()
                      ny=3*Math.random()
                      kk=27*Math.random()
                      jj=27*Math.random()
                      kj=27*Math.random()
                      jk=27*Math.random()
                      nn=27*Math.random()
                      gz=27*Math.random()
                      aa=Player.getInventorySlot(bp)
                      dd=Player.getInventorySlotData(tx)
                      if(Math.random()*100<75){uy=263}
                      if(Math.random()*100<90){uy=295}
                      if(Math.random()*100<75){yy=320}
                      if(Math.random()*100<90){yy=296}
                      if(Math.random()*100<75){ty=265}
                      if(Math.random()*100<90){ty=266}
                      if(Math.random()*100<90){ii=297}
                      if(Math.random()*100<70){ii=388}
                      if(Math.random()*100<65){mm=264}
                      if(Math.random()*100<90){mm=260}
                      if(Math.random()*100<70){


                      IP属地:广东来自Android客户端20楼2016-01-28 17:46
                      回复
                        setTile(x,y+47,z,3,0)
                        setTile(x-1,y+47,z,3,0)
                        setTile(x-1,y+47,z-1,3,0)
                        setTile(x-2,y+47,z-1,3,0)
                        setTile(x-1,y+48,z-2,1,0)
                        setTile(x,y+48,z-2,1,0)
                        setTile(x+1,y+48,z-2,98,0)
                        setTile(x+1,y+48,z-3,1,0)
                        setTile(x-1,y+48,z-3,1,0)
                        setTile(x-2,y+48,z-3,1,0)
                        setTile(x,y+49,z-3,98,1)
                        setTile(x+1,y+49,z-3,98,1)
                        setTile(x-1,y+49,z-3,98,1)
                        setTile(x-2,y+49,z-3,98,1)
                        setTile(x+1,y+50,z-3,98,1)
                        setTile(x+1,y+51,z-3,98,1)
                        setTile(x+1,y+52,z-3,98,jf)
                        setTile(x+1,y+53,z-3,98,1)
                        setTile(x-2,y+50,z-3,98,jf)
                        setTile(x-2,y+51,z-3,98,jf)
                        setTile(x-2,y+52,z-3,98,1)
                        setTile(x-2,y+53,z-3,98,1)
                        setTile(x,y+53,z-3,98,0)
                        setTile(x-3,y+53,z-3,98,1)
                        setTile(x,y+53,z-2,98,1)
                        setTile(x-1,y+53,z-2,98,1)
                        setTile(x-3,y+53,z-2,98,1)
                        setTile(x-2,y+53,z-1,98,0)
                        setTile(x+1,y+53,z-2,98,0)
                        setTile(x+1,y+53,z-1,98,0)
                        setTile(x-2,y+52,z-1,98,jf)
                        setTile(x-2,y+51,z-1,98,1)
                        setTile(x-2,y+50,z-1,98,jf)
                        setTile(x+1,y+52,z-1,98,1)
                        setTile(x+1,y+51,z-1,98,1)
                        setTile(x+1,y+52,z-1,98,jf)
                        setTile(x-2,y+49,z+1,98,1)


                        IP属地:广东来自Android客户端21楼2016-01-28 17:49
                        回复
                          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
                              回复