The Meaning of Life, the Universe, and Everything.
Join Date:
2/18/2012
Posts:
204
Minecraft:
MacAndSwiss
Member Details
First of all, I would recommend beginning by learning some basic Javascript, just so you know the language and have a general idea of what's going on.
https://www.codecademy.com/tracks/javascript Might help a bit. You don't really need to memorize everything, just think about how the code is laid out, (For example, javascript is usually a lowercaseUppercase format)
And finally, after you tried out some code, you can explore further into the code by doing a dump of the MCPE functions. Go into BlockLauncher settings, nerdy stuff, scroll down and dump it.
You can use DroidEdit to make your code, the interface is quite nice, or you can code from your PC and port it over.
First of all, I would recommend beginning by learning some basic Javascript, just so you know the language and have a general idea of what's going on.
https://www.codecademy.com/tracks/javascript Might help a bit. You don't really need to memorize everything, just think about how the code is laid out, (For example, javascript is usually a lowercaseUppercase format)
And finally, after you tried out some code, you can explore further into the code by doing a dump of the MCPE functions. Go into BlockLauncher settings, nerdy stuff, scroll down and dump it.
You can use DroidEdit to make your code, the interface is quite nice, or you can code from your PC and port it over.
Thanks and once again, I'm so sorry that I replied so late. It is really responsible of me. Sure I'll do that MinecraftJr948 , thanks! I'm still ears to solution.
If you need any more help, I can try and teach you the basics of item dropping, probability, and textures if your having trouble with that. Just pm me if you need some help.
Well I only have time to show you the custom drops part sorry:
function destroyBlock(x, y, z, side){
if(getTile(x, y,z) == 4){ //Change 4 to your block ID
Level.dropItem(x, y, z, 265, 5, 0);
//Change 265 to what you want it to drop
//Change 5 to the amounts you want droped
//Keep adding more Level.dropItem for different stuff
}
}
He wants probability too, this is done MAth.random();
here is a good example:
function destroyBlock(x, y, z, side) {
//preventDefault(); //if you want to stop the normal from happening...
if(Level.getTile(x, y, z) == 1) {
var dropRate = Math.round(Math.random()*3); //0 - 2
if(dropRate == 2) {
Level.dropItem(x = 0.5, y, z + 0.5, 4, 1, 0);
}
}
}
I'm trying to a make new mod, but I'm still a noob with modding. It would be great if you explain the code, and an example. Thanks!
Any help will be great!
I'm all ears!
Are you using an android device, or an ios device?
forgive me for answering so late.
I'm on android.
It is possible.
I will listen to any post!
Though it may take awhile...
First of all, I would recommend beginning by learning some basic Javascript, just so you know the language and have a general idea of what's going on.
https://www.codecademy.com/tracks/javascript Might help a bit. You don't really need to memorize everything, just think about how the code is laid out, (For example, javascript is usually a lowercaseUppercase format)
Secondly, I personally learnt how to apply this knowledge to Blocklauncher with help from Arjay07, here's a link to his mod school playlist. https://www.youtube.com/playlist?list=PL4mDXcCCNR9Vuicvj0klpj7_dV7Aq9jaA
And finally, after you tried out some code, you can explore further into the code by doing a dump of the MCPE functions. Go into BlockLauncher settings, nerdy stuff, scroll down and dump it.
You can use DroidEdit to make your code, the interface is quite nice, or you can code from your PC and port it over.
Thanks and once again, I'm so sorry that I replied so late. It is really responsible of me. Sure I'll do that MinecraftJr948 , thanks! I'm still ears to solution.
If you need any more help, I can try and teach you the basics of item dropping, probability, and textures if your having trouble with that. Just pm me if you need some help.
Well I only have time to show you the custom drops part sorry:
function destroyBlock(x, y, z, side){
if(getTile(x, y,z) == 4){ //Change 4 to your block ID
Level.dropItem(x, y, z, 265, 5, 0);
//Change 265 to what you want it to drop
//Change 5 to the amounts you want droped
//Keep adding more Level.dropItem for different stuff
}
}
The heck is this for
He wants probability too, this is done MAth.random();
here is a good example:
function destroyBlock(x, y, z, side) {//preventDefault(); //if you want to stop the normal from happening...
if(Level.getTile(x, y, z) == 1) {
var dropRate = Math.round(Math.random()*3); //0 - 2
if(dropRate == 2) {
Level.dropItem(x = 0.5, y, z + 0.5, 4, 1, 0);
}
}
}
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
I'm so sorry for being late. The is help in this community is great. Thanks from the bottom of my heart!