True, I sometimes want to add classes. Idk how u do that in JS.
Very easy
All you need to do is create an object
//Name your class with a function
function Class(){
//Call the class functions with a this statement
this.printToConsole = clientMessage; //Name the function you want the class to use no parameters
}
//Call your class function
Class.printToConsole("Printed by a class");
Hmmm...my favourite language is objective C++.
But java would be also very cool.
Oh and arjay, thanks.
Now i know how to make classes
But probably to late...
My code is already messed up and it would take days until i would make it all in classes
Java is hardest than javascript. I will must learn java If you use java the ModPE script will be in java and have other name.* (i don't know name of *) and can you make option to make code of mod impossible to read?
You mean harder or hardest? C is worse. I still hadn't learnt it.
Really, I don't see the advantages or java except more annoying.
FileOutputStream oStream = new FileOutputStream()
instead of simply
var oStream=new FileOutputStream()
Rollback Post to RevisionRollBack
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:
Well I must admit I love the classes things in java. Even in some modpe scripts I add //public class LaserMod{ at the beginning, just for fun lol.
However in Android java we can't do switch(cmd[0]) because switching strings is not allowed in the java build in android.I think PHP is even better because there are functions like in_array() and file_get_contents()
Rollback Post to RevisionRollBack
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:
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:
If you do Java, just split it up like every other API would. Each object has its own class and methods.
import mcpeapi.MCPEAPI; //The main API
import mcpeapi.Blocks.Block;
import mcpeapi.Blocks.BlockListener; //Listens for different events from blocks
import mcpeapi.Entities.Player;
import mcpeapi.Textures.Texture; //Custom textures from file?
public class test extends MCPEAPI {
private static CustomBlock = new CustomBlock();
private Player player;
//Simple test, wasn't aiming for something fancy
public test(){
player = this.getActivePlayer();
player.setBlockInHand(new CustomBlock());
}
}
class CustomBlock extends Block implements BlockListener {
public CustomBlock(){
this.id = 230;
this.texture = new Texture(); //Blank, allow for custom images to be given?
}
@Override
public void onBlockDestroyed(){
Explosion exprosion = new Explosion(this.getPos());
exprosion.radius = 3;
exprosion.explode(); //Get revenge on that player!
}
}
If you do Java, just split it up like every other API would. Each object has its own class and methods.
import mcpeapi.MCPEAPI; //The main API
import mcpeapi.Blocks.Block;
import mcpeapi.Blocks.BlockListener; //Listens for different events from blocks
import mcpeapi.Entities.Player;
import mcpeapi.Textures.Texture; //Custom textures from file?
public class test extends MCPEAPI {
private static CustomBlock = new CustomBlock();
private Player player;
//Simple test, wasn't aiming for something fancy
public test(){
player = this.getActivePlayer();
player.setBlockInHand(new CustomBlock());
}
}
class CustomBlock extends Block implements BlockListener {
public CustomBlock(){
this.id = 230;
this.texture = new Texture(); //Blank, allow for custom images to be given?
}
@Override
public void onBlockDestroyed(){
Explosion exprosion = new Explosion(this.getPos());
exprosion.radius = 3;
exprosion.explode(); //Get revenge on that player!
}
}
If you do Java, just split it up like every other API would. Each object has its own class and methods.
import mcpeapi.MCPEAPI; //The main API
import mcpeapi.Blocks.Block;
import mcpeapi.Blocks.BlockListener; //Listens for different events from blocks
import mcpeapi.Entities.Player;
import mcpeapi.Textures.Texture; //Custom textures from file?
public class test extends MCPEAPI {
private static CustomBlock = new CustomBlock();
private Player player;
//Simple test, wasn't aiming for something fancy
public test(){
player = this.getActivePlayer();
player.setBlockInHand(new CustomBlock());
}
}
class CustomBlock extends Block implements BlockListener {
public CustomBlock(){
this.id = 230;
this.texture = new Texture(); //Blank, allow for custom images to be given?
}
@Override
public void onBlockDestroyed(){
Explosion exprosion = new Explosion(this.getPos());
exprosion.radius = 3;
exprosion.explode(); //Get revenge on that player!
}
}
I thinks that is a good idea or is it the Api that got me? Either way Java extends modding capabilities.
I like how everyone thinks the world is going to end due to the removal of Javascript, yet 500ISE never said anything about losing javascript support. So, to all those panicking people out there.... STOP!
Same with Temena. I only know javascript and the basis of it. Where would i go to learn Java (or C++ if anyone knows). Because I so far do not know any Java but know some JavaScript. Is it possible to make the mod API in Python? Python is extremely easy to learn for begginers like me. So bottom line. I am OK with u changing the API to Java, but please tell me where i can learn Java? I have been learning JavaScript at CodeAcademy but I dont think it teaches Java.
If you are adding I would prefer java because I think it is more fun (fun more than convenient or useful because, well, you know how I am crazy about the class things)
Rollback Post to RevisionRollBack
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:
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:
Very easy
All you need to do is create an object
Link Removed
Link Removed
But java would be also very cool.
Oh and arjay, thanks.
Now i know how to make classes
But probably to late...
My code is already messed up and it would take days until i would make it all in classes
I was learning Java but now I'm too busy (because of Hockey)
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
Come on, java is WAY more better than Javascript.
I need opengl...
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
Check out my game! It's an open-world, sandbox text adventure.
Follow @hexdro_
Hexdro © 2012-2015
God I hope so. I will be screwed if he removes JavaScript.
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
You mean harder or hardest? C is worse. I still hadn't learnt it.
Really, I don't see the advantages or java except more annoying. instead of simply
Check out my game! It's an open-world, sandbox text adventure.
Follow @hexdro_
Hexdro © 2012-2015
However in Android java we can't do switch(cmd[0]) because switching strings is not allowed in the java build in android.I think PHP is even better because there are functions like in_array() and file_get_contents()
Long time no see.
I thinks that is a good idea or is it the Api that got me? Either way Java extends modding capabilities.
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 may look into Python when I have free time.
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]
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]
The original idea of ModPE is for beginners.