What is StructureJS?
Have you ever wanted that village you built to randomly generate in other worlds through a ModPE script? Now you can with StructureJS! Structure is a ModPE API Library that allows you to save and load selected structures.
Cool but how simple is it to use?
Too simple. StructureJS is designed to make things easier! Rather than using repeated setTile() functions, all you have to do is select the structure you want to use with your mod with the StructureJS Tool kit!
OK, so how do I use it?
First, make sure you download the StructureJS library and paste it before anything in your script so that the objects and methods are defined.
What does this library supply me with?
StructureJS supplies you with IO variables, Structure object, Vertex objects, and tools to help you create the structure files!
WIKI: Structures- Structures are a group of blocks.
Structure Files- Structure files are files that contain the data for a structure such as block coordinates and block ids. The file is just a text file with the .xtr extension.
Vertex- A vertex is an object that holds the three coordinates (x, y, z)
Can I have some sample code?
Sample code is also included in the StructureJS package if you need to come back to it.
//This is code not including the library script contents
//Basic useItem callback
function useItem(x, y, z, itemId, blockId)
{
var structFile = new File(android.os.Environment.getExternalStorageDirectory(), "sand_mountain.xtr"); //The file that holds the structure data (placed in the root of your sdcard)
var struct = new Structure(structFile); //The structure object that uses the structure file
setStructure(struct, x, y, z); //The method that set the structure at the coordinates!
}
Where can I get it?
The download is below. Please read the README.txt in the archive before using any of the files.
there is a way to get a mobs position Entity.getY(ent) and when selected a world clear an "mob" array, and in addEntityHook () (or something) make it add all entities
I'm so stupid.... thanks! I'll see what I can do witht this.
Make sure you follow me on twitter! @DarkDiaMiner IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
Make sure you follow me on twitter! @DarkDiaMiner IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
Make sure you follow me on twitter! @DarkDiaMiner IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
So StructureJS uses relative coordinates rather than exact because it is more useful. Let's say you wanted to set a structure at a certain coordinate. (128, 64, 128)
The blocks use relative coordinates to that point.
Block data:
1~2~3:5
StructureJS will place that block at (129, 68, 131)
So yes, its a coordinate. Are you using the tools? I wouldn't try to edit the structure file by hand as that would completely defeat the purpose of this API library.
I can be found on Freenode IRC channels #pocketmine, #ModPEScripts, #LegendOfMCPE, #pmplugins or #BeaconMine.
I am a PocketMine-MP plugin developer. I hate it when people think that I love stupid admin positions. Being an admin is nothing compared to being a plugin developer.
I am also a main developer of BlockServer, a work-in-progress MCPE server software. You are welcome to download it, but it so far onlly spawns you in the upther (above the world). You can chat, though.
I do not own this server but I just love to put this banner here:
What is StructureJS?
Have you ever wanted that village you built to randomly generate in other worlds through a ModPE script? Now you can with StructureJS! Structure is a ModPE API Library that allows you to save and load selected structures.
Cool but how simple is it to use?
Too simple. StructureJS is designed to make things easier! Rather than using repeated setTile() functions, all you have to do is select the structure you want to use with your mod with the StructureJS Tool kit!
OK, so how do I use it?
First, make sure you download the StructureJS library and paste it before anything in your script so that the objects and methods are defined.
What does this library supply me with?
StructureJS supplies you with IO variables, Structure object, Vertex objects, and tools to help you create the structure files!
WIKI:
Structures-
Structures are a group of blocks.
Structure Files-
Structure files are files that contain the data for a structure such as block coordinates and block ids. The file is just a text file with the .xtr extension.
Vertex-
A vertex is an object that holds the three coordinates (x, y, z)
Can I have some sample code?
Sample code is also included in the StructureJS package if you need to come back to it.
Where can I get it?
The download is below. Please read the README.txt in the archive before using any of the files.
Thanks!
Arjay07
DOWNLOADS:
Download StructureJS
Link Removed

Link Removed
Amazing.
*clap, clap, clap* +1
Willing to work on Android apps or multi-platform games, see profile bio for information.
Founder and CEO of Temena Development
Twitter: @TemenaPE
Instagram: @ItsLiterallyMath
Thanks! I'm glad you like it!
I'm hoping to add mob detection and implement that into the structure file but I don;t think there's a way to get an entities position at the moment.
Link Removed

Link Removed
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
I did this because of complications with a mod I'm going to make. Be prepared... xD
Link Removed

Link Removed
I'm so stupid.... thanks! I'll see what I can do witht this.
Link Removed

Link Removed
IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
...May be if you download it you'll see that it includes an example mod. That information was also in the post if you read it all.
The structure file holds data that include the block id and position of a structure. It starts the position count from zero.
That would be how the xtr file would look like if opened in a text editor.
Link Removed

Link Removed
IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
So StructureJS uses relative coordinates rather than exact because it is more useful. Let's say you wanted to set a structure at a certain coordinate. (128, 64, 128)
The blocks use relative coordinates to that point.
Block data:
StructureJS will place that block at (129, 68, 131)
So yes, its a coordinate. Are you using the tools? I wouldn't try to edit the structure file by hand as that would completely defeat the purpose of this API library.
Link Removed

Link Removed
*Exclude blocks
*Chest data
Link Removed

Link Removed
yet! Link: http://www.minecraft...in-at-any-time/
A world? You could select from point 0 to the end of the world but that takes a lot of memory and its a lot of data to write. Are you using the tool?
Link Removed

Link Removed
Why would you need this if you aren't a programmer?
Link Removed

Link Removed
Do not apologize for anything
Yes. It's the same as assigning an object to a var. Also packaves are just variables in Rhino. Can't you assign variables to variables?
Link Removed

Link Removed