• 0

    posted a message on LIST OF ANDROID MODPE FUNCTIONS
    Quote from BeATz_UnKNoWN

    So it is the same as function newLevel() ?

    just bit different. new level means your map gets loaded, and select level means you clicked(selected) your world
    Posted in: MCPE: Mod / Tool Help & Requests
  • 1

    posted a message on customblock

    I downloaded the script: see how many errors you can spot. (I saw three)
    function useItem(x,y,z,itemId255,blockId2,side)
    {
    	Block.defineBlock(501, "Oh Ya", [[4, 1]])//Your Code Here
    }
    function attackHook(attacker, victim)
    {
    	BlockdefineBlock(999, "test", [[9, 9]])//Your Code Here
    }
    function modTick()
    {
    	//Your Code Here
    }



    no problem with functions, but missing . after block, and I have to ask myself
    "can block Id exceed 255? doesnt day have only 00 to ff?"
    And I think no prob with ; cuz javascript will add it by it self,
    and Im not sure he is meaning if itemId==255&&blockId==2
    so I found two(blockId, missing.).
    Posted in: MCPE: Mod / Tool Discussion
  • 0

    posted a message on portalgun beta- (only pick block supported) move blocks smoothly where ever you want!
    Quote from BackupHero

    Wait a sec, the Portal Gun? Picking up blocks and stuff sound like the Gravity Gun from Half Life 2. Sure, the Portal Gun pick stuff up too, but it mainly does portals (hence the name).

    true. but its beta as you know...
    I want to make it to portal gun mod and gravity gun mod
    so it will split to two branches.
    I'll allow portal to portal gun, and gravity gun will get throwing feature instead.
    Posted in: MCPE: Mods / Tools
  • 1

    posted a message on portalgun beta- (only pick block supported) move blocks smoothly where ever you want!
    Quote from Teslam

    sorry i will delete it after i just wanted to edit out all the block movement script and get it on my phone faster.

    i only want to move entities i was not going to take credit and or commercialize your hard work.

    ah! tahts okay!
    sorry for bad words lol
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on portalgun beta- (only pick block supported) move blocks smoothly where ever you want!
    Quote from Teslam

    i put it on trble's repo it is 14303 but i am currently editing it so it doesn't move blocks because the block movement is in convenient for me and also the item that controls the gravity is not the hoe it is a stick.

    ... with no agree?
    I have to say you suck
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on portalgun beta- (only pick block supported) move blocks smoothly where ever you want!
    Quote from Thecactigod

    Also I just got a brilliant idea. Block hats! GUI to pick the block you want to use for a hat an viola! Hat!

    great idea!
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on portalgun beta- (only pick block supported) move blocks smoothly where ever you want!
    Quote from MrARM

    The mod itself isn't awesome. The method is.

    totally true
    Quote from Thecactigod

    I got it, removed the &s, and now I can pick up blocks but can't place them

    oops! fixed it!
    Quote from Hexdro
    Needs some more recognition, but this is awesome :3 everyone should check it out. c:
    Quote from Lambo_car16
    It is awesome

    thanks!
    Posted in: MCPE: Mods / Tools
  • 22

    posted a message on portalgun beta- (only pick block supported) move blocks smoothly where ever you want!
    here is little iron hoe which will make big difference.

    you can pick blocks, entities, and move them around.


    var blockArray=new Array();//saves ent of blocks
    var timer=-30;//what makes it work
    var pickedBlock=46;//Id of TNT by default
    var pickedDam=0;
    var pickedBool,pickedEnt,playerEnt;
    var readyFor=false;
    var portalGun=292;//can be changed easily
    var GUI=null;
    //events
    function newLevel()
    {var toAddAct=com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
    toAddAct.runOnUiThread(new java.lang.Runnable({run:function()
    {try{GUI=new android.widget.PopupWindow();
    var layout=new android.widget.RelativeLayout(toAddAct);
    var button=new android.widget.Button(toAddAct);
    button.setText("PUT");
    button.setOnClickListener(new android.view.View.OnClickListener({onClick:
    function(viewarg){putBlockOperator();}}));
    layout.addView(button);
    GUI.setContentView(layout);
    GUI.setWidth(100);
    GUI.setHeight(100);
    GUI.showAtLocation(toAddAct.getWindow().getDecorView(),android.view.Gravity.LEFT | android.view.Gravity.BOTTOM,0,0);
    GUI.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT));}
    catch(err){print("Error: "+err);}}})); //just making button
    timer=-30; //reseting
    }
    function modTick()
    {entityMover();startup();}
    function useItem(x,y,z,itemId)
    {if(itemId==portalGun&&!pickedBool&&readyFor)
    {preventDefault();
    if(getTile(x,y,z)<81)
    {pickedBlock=getTile(x,y,z);
    pickedDam=Level.getData(x,y,z);
    playerEnt=getPlayerEnt();
    pickedEnt=blockArray[80-pickedBlock];
    pickedBool=true;
    setTile(x,y,z,0);}
    else
    {clientMessage("this block can't be picked with portalgun");}
    }}
    function attackHook(attacker,victim)
    {playerEnt=attacker;
    var intype=Entity.getEntityTypeId(victim);
    if(intype==83)
    return;
    if(!pickedBool&&readyFor)
    {pickedEnt=victim;
    pickedBool=true;
    if(Entity.getEntityTypeId(victim)==65)
    {pickedBlock=46;
    pickedDam=0;}}
    else if(Entity.getX(pickedEnt)==Entity.getX(victim)&&Entity.getY(pickedEnt)==Entity.getY(victim)&&Entity.getZ(pickedEnt)==Entity.getZ(victim))
    {preventDefault();
    if(!getTile(Math.round(Entity.getX(victim)-0.5),Math.round(Entity.getY(victim)-0.5),Math.round(Entity.getZ(victim)-0.5)))
    {pickedBool=false;
    if(Entity.getEntityTypeId(victim)==65)
    putBlock(victim);}
    }}
    function deathHook(a,v)
    {if(!pickedBool)
    return;
    var intype=Entity.getEntityTypeId(v);
    if(intype==64||intype==80||intype==81||intype==82||intype==83)
    return;
    if(Entity.getX(pickedEnt)==Entity.getX(v)&&Entity.getY(pickedEnt)==Entity.getY(v)&&Entity.getZ(pickedEnt)==Entity.getZ(v)){
    pickedBool=false;}}
    function entityRemovedHook(ent)
    {if(!pickedBool)
    return;
    var intype=Entity.getEntityTypeId(ent);
    if(intype==64||intype==80||intype==81||intype==82||intype==83)
    return;
    if(Entity.getX(pickedEnt)==Entity.getX(ent)&&Entity.getY(pickedEnt)==Entity.getY(ent)&&Entity.getZ(pickedEnt)==Entity.getZ(ent)){
    pickedBool=false;}}
    function leaveGame()
    {var toAddAct = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
    toAddAct.runOnUiThread(new java.lang.Runnable({ run: function() {
    if(GUI != null){GUI.dismiss();}}})); //delete button
    blockArray=new Array();
    timer=-30;
    pickedBlock=46;
    pickedDam=0;
    readyFor=false;
    GUI=null;
    pickedBool=false; //reset
    }
    
    function startup() //make blocks when entering game
    {if(timer>100)
    return;
    timer++;
    if(!timer)
    {for(var i=0;i<80;i++)
    {blockArray[i]=Level.spawnMob(128,256,128,65);
    Entity.setRenderType(blockArray[i],20);}}
    if(timer<80&&timer>=0)
    {for(var i=0;i<80;i++)
    {stopper(blockArray[i]);
    Entity.setPosition(blockArray[i],128,256,128);}
    Entity.rideAnimal(blockArray[timer],blockArray[timer]);}
    if(timer==90)
    {readyFor=true;clientMessage("portal gun succesfully booted");}}
    
    function stopper(ent) //stop entity falling
    {setVelY(ent,0);
    setVelX(ent,0);
    setVelZ(ent,0);}
    function entityMover() //move entity
    {if(pickedBool)
    {var px,py,pz,dx,dy,dz,yaw,pit;
    px=Player.getX();
    py=Player.getY()-0.5;
    pz=Player.getZ();
    yaw=Math.PI*Entity.getYaw(playerEnt)/180;
    pit=Math.PI*Entity.getPitch(playerEnt)/180;
    dx=-1*Math.cos(pit)*Math.sin(yaw);
    dy=-1*Math.sin(pit);
    dz=Math.cos(pit)*Math.cos(yaw);
    if(Entity.getEntityTypeId(pickedEnt)==65)
    moveBlock(pickedEnt,px+2*dx,py+2*dy-0.5,pz+2*dz);
    else
    Entity.setPosition(pickedEnt,px+2*dx,py+2*dy,pz+2*dz);
    stopper(pickedEnt);
    }}
    function moveBlock(ent,x,y,z) //special moving method for rATNT
    {var newMob=Level.spawnMob(x,y,z,80);
    Entity.setRenderType(newMob,21);
    stopper(newMob);
    Entity.rideAnimal(ent,newMob);
    Entity.remove(newMob);
    Entity.rideAnimal(ent,ent);}
    function putBlock(ent) //put block and reset ent
    {setTile(Math.round(Entity.getX(ent)-0.5),Math.round(Entity.getY(ent)-0.5),Math.round(Entity.getZ(ent)-0.5),pickedBlock,pickedDam);
    moveBlock(ent,128,256,128);
    pickedBool=false;}
    function putBlockOperator() //put block if possible
    {if(!pickedBool)
    return;
    var inblock=getTile(Math.round(Entity.getX(pickedEnt)-0.5),Math.round(Entity.getY(pickedEnt)-0.5),Math.round(Entity.getZ(pickedEnt)-0.5));
    if(inblock==0||(inblock>7&&inblock<12)||inblock==51||inblock==78)
    {pickedBool=false;
    if(Entity.getEntityTypeId(pickedEnt)==65)
    putBlock(pickedEnt);}}

    (and I have to say somethings to somebody, I'M NOT DRUNK!!)
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on preview for portal gun's pick block on MCPE. (how to move block smoothlly where ever you want)

    He said it was TNT (which you can spawn with Level.spawnMob and change render type to falling block). I found that dropped item entities are better for this, though.

    true. dropped Item is way more easier to spawn/setblock.
    and with entityaddedhook, it works perfectly. but the problem is that it will be picked by player. well, I could make the distance a bit far so it cant be picked, but in multiplayer, it will be messy cuz other player can actually pick that.
    +item will be killed by lava/fire
    Posted in: MCPE: WIP Mods / Tools
  • 0

    posted a message on preview for portal gun's pick block on MCPE. (how to move block smoothlly where ever you want)
    Quote from Thecactigod

    You should make a gravity gun mod with this

    well actually Im making that. portalgun-gravitygun addition lol
    Quote from Thecactigod

    You think you could let mcpemodder use this in his gravity gun when its done?

    and about other people using this... ofcourse noproblem! but maybe after noticing me... cuz I wanna see how they can use this more cooler
    Quote from TheMCPEGamer__

    When do you think you'll be able to release it?

    after I make it throwable... hehehe
    Posted in: MCPE: WIP Mods / Tools
  • 0

    posted a message on preview for portal gun's pick block on MCPE. (how to move block smoothlly where ever you want)
    Quote from I_dont_know

    I started making a portal gun mod but not finished yet and I wanted to do this to but I'm not sure how. I have working portals, bouncing gel, speed gel, the emancipation grid, and jump pads. Still need to figure out how to make portals work with snowballs instead of a sword and fix the positioning a little bit

    hmm. I wanted to do that too, but I have no idea how I can make portal looks like portal...(sounds akward but true)
    and gels, Im planning on using snowcover with damage.
    and grid... its easy to do but hard to make it looks gridy(?)...

    but Im hoping that 0.8.0 comes out early so we can use orange/blue/black carpet for gel/gel/pad
    or maybe I can steal yor code...(just jocking!)
    Quote from ButtSlayer
    Can you throw blocks :)
    Quote from Ravisudewo123
    If he could actually throw blocks he would add that to his video.

    working on it. made some progress with mathmatical stuffs so it can fly in arc shape...
    Posted in: MCPE: WIP Mods / Tools
  • 0

    posted a message on preview for portal gun's pick block on MCPE. (how to move block smoothlly where ever you want)
    Quote from ButtSlayer

    Can you throw blocks :)

    Quote from Ravisudewo123

    If he could actually throw blocks he would add that to his video.

    well... thats POSSIBLE, but cuz it uses modTick to move it, It'll look a little bit derpy...
    I was planning to make water bomb or wither or slime and stuff like that, but I dont have enough time for it...
    Posted in: MCPE: WIP Mods / Tools
  • 5

    posted a message on preview for portal gun's pick block on MCPE. (how to move block smoothlly where ever you want)
    lol I want to close/delete this topic, but I dont know how...
    Posted in: MCPE: WIP Mods / Tools
  • 0

    posted a message on 3picture is enough
    Quote from MrARM

    Could I see your original source code?

    It was just TNT rendered as falling sand.
    I think It doesnt need any explanation...
    though, if you still want it, just let me know so I can give it to you
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on 3picture is enough
    Quote from Thecactigod

    Nvm, got it using setVelX and friends

    well, actually, I didnt use that cuz it will make it laggy cuz it have to do it every tick
    I used other thing :)
    Posted in: MCPE: Mods / Tools
  • To post a comment, please .