• 2

    posted a message on Basic Modding Question

    1. As of now, I don't think there is any reference to those keys, but I hope the minecraft team can make one sooner or later.


    2. You don't need to use Java or C++ to redefine behaviours (but might be added, I don't know). Instead it just uses JSON files, which is basically a configurable file to change how an entity would behave (like changing a creeper's blast radius, etc, what AI would the entity use, etc). But when it comes to modding (the unofficial one, back in the days), you can either use a Javascript file (runnable through different mcpe launchers, like MCPE Master and Block Launcer), a .modpkg file (Still uses JS, but now compressed together with textures), and the old mcpe addons (Uses C or C++ (native code), much more complicated but has endless possibilities, runnable through Blocklauncher, somewhat the same as PC modding).


    3. An mcworld file contains the level/world files (level.dat and things like that), the behaviour pack, the textures, and the models of the mobs all compressed into one.


    I hope this can help you a bit :)

    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on [MOD] DesnoGuns Mod | more than 50 weapons | r025 | by Desno365
    Quote from Saccy701»

    Hello, I am creating a new mod that will be called Pocket Apocalypse, Like the Crafting Dead, but for PE, I would be grateful for just one basic thing, How would I make a projectile (eg: Arrow) go in the direction the player is facing, I know how velocity X,Y and Z works and the way Angles of direction work. All I need is a formula of Direction angles(Euler I think) to Velocity XY and Z. I would be very grateful for the formula. Code is not needed, just a formula. Please.


    Imma be pretty straight forward. Here it is:

    function getVector(yaw, pitch)
    {
    	var vector = {};
    	vector.y = -Math.sin(java.lang.Math.toRadians(pitch));
    	vector.x = -Math.sin(java.lang.Math.toRadians(yaw)) * Math.cos(java.lang.Math.toRadians(pitch));
    	vector.z = Math.cos(java.lang.Math.toRadians(yaw)) * Math.cos(java.lang.Math.toRadians(pitch));
    	return vector;
    }

    I actually found this from the Portal 2 mod (lol but still most mods use this formula. maybe not exactly but its still the same).

    Maybe this can help too: http://stackoverflow.com/questions/1568568/how-to-convert-euler-angles-to-directional-vector



    If you' ve got more questions like these check out stack overflow. It' s a great site for programmers.

    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on How to make a creeper explode but don't destroy the terrain
    Quote from ironhead65»

    I think you missed removing the mob. Aside from that, probably the best solution!


    Well, you dont actually need to remove the mob, since they are removed when they explode. I've tested it and it works.. :)
    Posted in: MCPE: Mods / Tools
  • 1

    posted a message on How to make a creeper explode but don't destroy the terrain

    Its pretty easy, but this method is a bit lame. But it works..

    Since we can use preventDefault() in the hook function explodeHook, this is what we are gonna do


    function explodeHook(entity, x, y, z, power, onFire) // the hook
    {
         if(Entity.getEntityTypeId(entity) == EntityType.CREEPER) // checks if the entity that exploded is a creeper
         {
              preventDefault(); // prevents the explosion. Note that this will also prevent the sound and particles to play/appear, so we are gonna use a little trick
              Level.addParticle(ParticleType.hugeexplosion, x, y, z, 0, 0, 0); // creates the particle effects which will appear in explosion coordinates, with 0 velocities and uses default particle size
              Level.playSoundEnt(entity, "random.explode", 100, 0); // plays the explosion sound where the creeper is
         }
    }

    I hope this helps :)

    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on help

    There are a lot of errors btw..


    First of all why did you put an if statement at code startup? Place the code inside the useItem() hook:

    function useItem(x, y, z)
    {
    var i = getCarriedItem();
    if(i==2014){
    eb = Level.spawnMob(x, y, z, EntityType.PIG,"mob/eb.png");
    Entity.setRenderType(eb, ebRenderer.renderType); 
    Entity.setNameTag(eb, "Ebon Hawk");
    Entity.setHealth(eb, 9999999);
    Entity.setMaxHealth(eb, 9999999);
    }
    }



    Next is the render functions... (this is where you got it all wrong)


    The first error I saw is the name of the function. At the end of the script you called addebToRenderer, but then you did not name the main Model Making function with it. Replace the "ebModelMaker" with "addebToRenderer".


    Next, var model = renderer.getModel() will not work since you did not define "renderer". Change the "variable" inside the parenthesis with renderer.


    And lastly, the var Renderer. in the addebToRenderer, the parameters you entered (the variable in the parenthesis) was "ebRenderer", which you did not define. Change "Renderer" with ebRenderer, or vice versa.


    If you dont have time to correct it yourself, here is the fixed version:


    ModPE.setItem(2014,"eb",0," ebon hawk");
    Player.addItemCreativeInv(2014, 1, 0);
    
    function useItem(x, y, z)
    {
    var i = getCarriedItem();
    if(i==2014){
    eb = Level.spawnMob(x, y + 1, z, EntityType.PIG,"mob/eb.png"); // I did y + 1 so that it would spawn at the top of the block
    Entity.setRenderType(eb, ebRenderer.renderType); 
    Entity.setNameTag(eb, "Ebon Hawk");
    Entity.setHealth(eb, 9999999);
    Entity.setMaxHealth(eb, 9999999);
    }
    }
    
    var eb;
    function addebToRenderer(renderer) {
    var model = renderer.getModel();
    var bipedBody = model.getPart("body").clear();
    model.getPart("head").clear();
    model.getPart("body").clear();
    model.getPart("rightArm").clear();
    model.getPart("leftArm").clear();
    model.getPart("rightLeg").clear();
    model.getPart("leftLeg").clear();
    body = model.getPart("body");
    bipedBody.setTextureOffset(1, 1);
    bipedBody.addBox(9.0, 0.0, 5.0, 16, 29, 34, 0);
    bipedBody.addBox(8.0, 0.0, 4.0, 55, 145, 300, 0);
    bipedBody.addBox(7.0, 0.0, 4.0, 9, 145, 6, 0);
    bipedBody.addBox(9.0, -35.0, 4.0, 30, 72, 55, 0);
    bipedBody.addBox(9.0, 35.0, 4.0, 30, 72, 55, 0);
    }
    var ebRenderer = Renderer.createHumanoidRenderer();
    addebToRenderer(ebRenderer);


    Note that the custom item (ebon Hawk) will cause an error, since the texture "eb" is not in the current texture pack. I recommend you use .modpkg format for this mod. Anyways good luck!

    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on ModPE CodeX - ModPE Code Editor for ModPE ( Powerfull, Light&Fast, Base4 encode&decode,syntax highlighting,auto complete etc...)

    About the bracket highlighting..


    You know the dotted lines in Notepad++ that links { and } (i suck at explaining)


    Something like:


    var abc = false;
    
    function something()
    {
    .
    .
    .
    .    if(abc == false)
    .    {
    .    .
    .    .
    .    .    abc = true;
    .    .
    .    .
    .    }
    .
    .
    .
    }


    Here is a better example: (notepad++)

    Posted in: MCPE: Mods / Tools
  • 1

    posted a message on ModPE CodeX - ModPE Code Editor for ModPE ( Powerfull, Light&Fast, Base4 encode&decode,syntax highlighting,auto complete etc...)

    This would be REALLY cool and convenient if you could add auto-completing (with all ModPE functions), find-replace, encode-decode (like base64 images) features, debugger, obfuscation, bracket highlighting and much more..


    I always use Notepad++ when I make mods, but I think I would switch to this once you get your program to have more features, maybe not all, but at least the auto-complete and bracket stuff would do...

    Posted in: MCPE: Mods / Tools
  • 1

    posted a message on Get help from someone who understands JAVA (Problem solved.)

    Try indenting your code to make it more understandable..


    Anyway I think the problem is with the:

    egunceleme.split(" ")[0];


    Split is a function. You can not push something on a function.

    Try removing the [0], or moving to the eguncleme (I dont know what it even means)

    eguncleme[0].split(" ");
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on [MCPE 0.14 / 0.15] The Manipulator Mod! - 8000+ downloads! [version 0.4]
    Quote from DLJohn»

    v0.4 is a little bugged for me. The block texture looks messed up. It's like it is loading the wrong textures and it looks really weird.


    I am using the latest BlockLauncher beta for 0.15.4: https://t.co/wBArbX1rg7


    Edit: Here's an example of one bugged block: http://i.imgur.com/CktRANx.jpg




    Its probably because BlockLauncher (for 0.15) is still in beta. I actually made this mod in 0.14, and it works just fine. Let' s just wait until the next official BL update (which is coming very soon).

    I think imma try to send the script to him. Thanks for your response :)

    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on [LIB] Minecraft Button Library | Easily create Minecraft style buttons in your mod | For modders

    Can you make a minecraft-styled popup with this too?

    If yes, how?

    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on [MCPE 0.14 / 0.15] The Manipulator Mod! - 8000+ downloads! [version 0.4]

    After 2 years of being in my secret lab, I

    have finally resurfaced, bringing you my mod,


    The Manipulator!


    Items and Blocks in the Mod:


    Items:
    - Chronomatrix: Freezes all entities in place, even ARROWS!

    - Polarity Inverser: Changes the gravity, making all except you fly up!

    - Atomic Deconstructor: Alters the atomic structure of all entities, making them EXPLODE!

    - Phantom Drive: Since blowing up stuff makes a lot of mess, this thing will remove all dropped entities!

    - Pyrokinetic Repulsor: Is it too cold in your world? Then use this to set all mobs on FIRE!

    - Magnetic Drive: Too lazy to get that roasted beef after burning everything? This one attracts all drops to you!

    - Timewinder: So far this is the most fun to play with. Tap a tile to record that timeline, and press again to go BACK!

    - Voltezla: Smite all mobs with the fury of the Thunder!

    - Arachnocyper: No one can escape from you now! Spawn webs on mobs and creep to them like a spider!

    Blocks:
    - Nanovoid: Places a void block, which attracts all mobs into it. It also comes with cool particle effects!
    - Compressed Xor: A special block which can store Xor inside. Tap some Xor to it to fill. You can also use this block to repair damaged Manipulator items, consuming 1 Xor. You can also extract all Xor inside it by tap and holding the block with a Magnetic Drive.
    - Degraded Compressed Xor: An empty CX block. You can tap it with Xor just like the CX block to fill it again.


    How to play:


    All items are in the creative inventory.

    Tap the "Use" button to activate an item's effect. Some effects are toggle-able.

    All items can be crafted by an unstable element I named Xor, which randomly drops when mining stone.


    How to Install:

    - Download the .modpkg file
    - Import it on BlockLauncher (just like .js mods)
    - Restart and its done!


    Screenshots:


    Chronomatrix freeze time - Chronomatrix freezing projectiles in place

    Gravity flipped - Polarity Inverser making everyone fly

    Pyro fire - Pyrokinetic Repulsor setting mobs on fire

    Voltezla fired - Voltezla zapping pigs, turning them into pigmen


    Download it HERE:


    Version 0.1 - http://www.mediafire.com/download/3m7edy500puwbp7

    ~Initial Release

    Version 0.2 - http://www.mediafire.com/download/0hd6vkiguvpsld8
    ~Changed mod format to .modpkg
    ~Tweaked Timewider and Chronomatrix (These items are still unstable. I haven't fully harnesed the power of Xor).

    ~Xor now drops more frequent (the last time it was almost impossible).
    ~Added Voltezla and Arachnocyper.
    ~Added a custom GUI to use items, with the help of Desno365' s MC button lib. Full credits for it goes to him.

    ~Code rewritten

    Version 0.3 - http://www.mediafire.com/download/ahp0030p2ay1oku

    ~Added the Nanovoid and Compressed Xor.

    ~Fixed Chronomatrix glitch where sometimes it does not unfreeze mobs.

    ~Made Timewinder a bit accurate.

    ~Both time items can now affect the time (day and night)

    ~Timewinder now affects blocks

    Version 0.4 - https://www.mediafire.com/?oazbpqw9i55bqaw
    ~Added more functionality to Compressed Xor blocks.
    ~Added Degraded Compressed Xor
    ~Made Manipulator items take damage when used/in use
    ~Chronomatrix now resumes projectile motion when unpaused
    ~Some Timewinder tweaks
    ~Fixed the glitchy Xor drop bug

    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on Multi-Purpose Stick! By KervyDragon
    Hello MC Forums! I am presenting you my 2nd mod, the Multi-Purpose Stick Mod! It adds more things a normal stick could do. From hoeing dirt to blowing up blocks, this mod will help you in your survival. Or griefing too. Hehehe. Joke.

    Features:
    Hoe Mode - Acts like a hoe

    Fire Mode - Acts like flint and steel

    Insta-kill - One hit kill

    Block Picker - Takes the block you tap

    Random Block - Turns blocks into a random block

    Explode Mode - Makes blocks explode

    These are also shown in-game.

    Download:

    Enjoy! I will update this, more like weekly maybe.
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on How to make an entity to look at you? Please give me the code!
    Can someone give me the code on how to set an entity rotation according to certain coordinates? I need it for my mod. I will give credits to the one with the code I really need. I hope someone would reply. Pls!
    Posted in: MCPE: Mod / Tool Help & Requests
  • To post a comment, please or register a new account.