MCPE Builds to .js File Mod

This mod lets you copy your creations in Minecraft Pocket Edition to your very own ModPE script. Basically what it does is it generates a .js file from selections you make in-game and have the selection of builds turned into a .js file. Then with a little bit of tinkering with the code you can load the new .js file with BlockLauncher as with any other mod and have the build appear in-game when you tap a set item.

But really, what’s the point?

If the first few lines didn’t intrigue you enough then lets dive right into the core of the idea. Instead of having to write out every single Level.setTile(x,y,z,id,data); point you can build the things you want in-game, select the area in-game and then instantly have that build turned into a .js file.

Recommended Tools

Creator: androidKaghon

How to use the mod?

Below you will find an in-depth text guide and then in the very bottom a video guide.

Important note: If it’s not working try switching on ART runtime on Android. Settings > About Phone > Tap on the build number until it says you are a developer. Next, go to Settings > Developer Options > Make a switch from Dalvik to ART.

Text Guide

1. First off create the build which you want to turn into a .js file. The build can be of any size and can include any blocks you want to. In the example below we will demonstrate with a stone dungeon build.

2. Take out your shears item (which is normally used to cut the wool from a sheep) and then select the relative point which in the demonstration is the gold block.

ScreenShots000

3. Select the first corner of the build which outlines the area. Understand that this should be equal to the lowest point of the build, for example the ground block.

ScreenShots003

4. Select the second corner of the build which outlines the area. It should be equal to the highest point of the build and stretch diagonally from the first corner block, for example the roof block.

ScreenShots004

5. Now you have successfully outlined the area. The next thing you want to do is to save the file by using a seed item.

ScreenShots006

6. When you use the seed item it will ask you to name the file. In the example we will name it to Rad Dungeon. The default settings are usually set to all OFF. Let’s have a look at each meaning of the settings.

  • Include the air blocks? It’s not recommended because it drastically increases the file size. What it does is that it includes all of the air blocks above the build. In this case we will choose not to include it.
  • Do not include relative point block? It highly depends on the build. In our case the gold block is obviously not wanted to be included, but in some cases the relative point block is part of the build.
  • Do not include first corner block? In our case it was the dirt block and we want it included. In some builds it’s not wanted.
  • Do not include second corner block?  Same goes here, in our case we want the roof block included but for some builds it’s not wanted.

ScreenShots007

7. When you’ve selected each right option for your build then select Okay and the build will be saved to /games/com.mojang/ModPE/Rad Dungeon.

ScreenShots008

8. Quit Minecraft Pocket Edition and open up a file manager, e.g. Astro File Manager. Locate the Rad Dungeon folder in /games/com.mojang/ModPE/Rad Dungeon and open up the one file found in that folder. It’s recommended to use DroidEdit but you can use any other javascript or text editor that you want to.

ScreenShots010

It might be a bit laggy because there is a lot of code. To decrease the lag you can go to settings and turn of the Syntax Highlighting in DroidEdit or use a text editor instead of javascript editor to open the file with.

9. The first and most important step is to make the function name just one word. In our case it’s currently called Rad Dungeon but it needs to be edited to RadDungeon.

ScreenShots011

10. Below the first line create a new line and type the following code on that second line.

function useItem(x, y, z, itemId, blockId, side, data){
if (blockId==57){
RadDungeon(x,y,z);
}
}

11. Save the file and exit DroidEdit.

12. Open BlockLauncher. Select Manage ModPE Scripts. Select Import. Import from Local Storage. Select the Rad Dungeon.js file from /games/com.mojang/ModPE/Rad Dungeon.

13. Open Minecraft Pocket Edition and enter a world.

14. Take out a diamond block (block id = 57 which was set in the if statement code). Place it one level above ground (or in the same height as the relative point block was placed).

ScreenShots013

15. Then tap on the diamond block to spawn the dungeon.

ScreenShots014

Video Guide

download

You may also like...

Installation Guides

AndroidiOS

20 Responses

5 / 5 (1 vote)
  1. Anthony says:

    Doesn’t work

  2. Gene1024768 says:

    It doesn’t work well with big buildings,it will force cancel.
    can you fix it ?
    This is a really good Js!
    My mcpe version is 0.10.5
    Thank you!

  3. BorbingoBoy says:

    Looks great, gonna check it out later.

  4. NATHAN says:

    whenever i try to save it blocklaunchr shuts itself down

  5. lol says:

    if thats the problem just dont use the mod until its fixed

  6. TheMageplaysMC says:

    This is a great mod, but terible too

  7. FastByte22 says:

    SOOOOO HAPPY someone finally made one of these.
    I’ve been messing around with it for a couple weeks now and it is making building a castle so much easier.
    I have a couple questions/requests though.
    One thing i’ve noticed is that no matter what way you outline your area for copying, the pasted version will always orient in the same direction as the original; i.e if i have a row of ten blocks north to south, then no matter how i mess with it the copied row will always line up north to south. The way i’ve worked around this is to use my reference block somewhere in the central y axis of my builds and then just make sure my builds have perfect 360° symmetry. While this isn’t a bad thing, and I certainly don’t mind building like this because it makes for some interesting geography and planning, I would really appreciate it if there was a way to rotate your builds. If there is and I am just missing it, if someone could explain how to do that I would appreciate that a ton as well.
    Thanks for a great mod!
    FastByte22

  8. Victor says:

    Will this work with mcpe 0.11.1? It keeps force closing after i try to save the .js, will it move blocks added by mods or that have script associated to them? Im really glad i was able to find a mod that is able to do this in a desparate attempt to save my estate from a corrupt world, any help will be appreciated tons!

  9. Hei says:

    Can you upload the creation onto mcpe. And will it work as a MINECRAFT map

  10. Firemaster273 says:

    Everyone it works but you need blocklauncher PRO not blocklauncher.

Leave a Reply

Your email address will not be published.

Anti-Spam Quiz: