I'm adding a method to get all entities in the current world as an array. (Speaking of which, anyone want to suggest a name for it?)
Maybe
Level.getEntities(filtermode, filter); //Filters the entities you get so filtermode would be 1 (Entity Type) or something like that and you filter the type of entities in the filter parameter.
Also are these functions confirmed?
Entity.getMobSkin(ent);
Entity.getrenderType(ent);
Level.getEntityAtPosition(x, y, z, r);
Level.getEntities(filtermode, filter); //Filters the entities you get so filtermode would be 1 (Entity Type) or something like that and you filter the type of entities in the filter parameter.
Also are these functions confirmed?
Entity.getMobSkin(ent);
Entity.getrenderType(ent);
Level.getEntityAtPosition(x, y, z, r);
Plus:
public class MobFilter{// I don't think there is such annotation lol
protected mobIds;
public MobFilter(int[] mobIds){
this.mobIds=mobIds;
}
public int addId(int[] newIds){
int cnt=0;
for(int i=0; i<newIds.length; i++){
for(int j=0; j<mobIds.length; j++){
boolean dup=false;
if(mobIds[j]==newIds[i]){
dup=true;
break;
}
}
if(!dup){
mobIds[mobIds.length]=newIds[i];
cnt++;
}
}
}
}
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:
For anyone who needs Entity.getEntityAtPosition() immediately here is some code:
var ents = new Array();
function entityAddedHook(ent){
ents.push(ent);
}
function entityRemovedHook(ent){
if(ents.indexOf(ent) != -1)ents.splice(ents.indexOf(ent));
}
Entity.getEntityAtPosition = function(x, y, z, r){
var ent = null;
for(var i = 0; i < ents.length; i++){
var e = ents[i];
var ex = Math.floor(Entity.getX(e));
var ey = Math.floor(Entity.getY(e));
var ez = Math.floor(Entity.getZ(e));
var rx = Math.max(ex, x) - Math.min(ex, x);
var ry = Math.max(ey, y) - Math.min(ey, y);
var rz = Math.max(ez, z) - Math.min(ez, z);
if(rx == r || ry == r || rz == r){
ent = e;
break;
}
}
return ent;
}
Just copy that to your script and you should be able to use Entity.getEntityAtPosition. Use this until the next beta comes out with the function
Also if you want to save entities I had an idea. I was working on a library but I thought I'd share the concept first.
First, you need to create an array of entities. For each entity store their entity id, skin, rendertype, etc... If those are possible yet. Afterwards you can store the data in a file and you can then remove all entities when you leave the game or join the game, your choice. Then spawn all entities. So technically all you're doing is creating a file that replaced the job of the entities.dat file.
First, I didn't steal from anything. Honestly, I've never looked at the risk script. That was part of a library I've been working on... So don't things like that. I've never stolen code ever. So just don't...
Entity.getRider() would be for the mob that is getting ridden, but what is Entity.getRiding()? Does it return a boolean on whether it is riding, or does it return the mob that is riding on another mob?
I guess a player parameter would be great for BlockLauncher's server api. It already has send server message. Why not create a whole API? This would be better than PocketMine in some ways.
No, not the item name, I already know about that (but Item.setName would be pretty cool, give invisible bedrock a name), Item.setDescription as in the description of an item in the crafting menu.
You want to make the description of a custom item/block for custom crafting?
No, not the item name, I already know about that (but Item.setName would be pretty cool, give invisible bedrock a name), Item.setDescription as in the description of an item in the crafting menu.
I can add that, though behind the scenes it will just call
ModPE.langEdit("item.potato.description", "I LIEK POTATO LOL");
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI'm adding a method to get all entities in the current world as an array. (Speaking of which, anyone want to suggest a name for it?)
I can't tell what's easier... array.push() or Entity.getAll().....
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 think it would have to be converted. But he did make a non HD converter.
Help Me by clicking above links and skipping ad!
I support:
Maybe Also are these functions confirmed?
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]
Plus:
public class MobFilter{// I don't think there is such annotation lol protected mobIds; public MobFilter(int[] mobIds){ this.mobIds=mobIds; } public int addId(int[] newIds){ int cnt=0; for(int i=0; i<newIds.length; i++){ for(int j=0; j<mobIds.length; j++){ boolean dup=false; if(mobIds[j]==newIds[i]){ dup=true; break; } } if(!dup){ mobIds[mobIds.length]=newIds[i]; cnt++; } } } }you..... you stole this from risk...
Follow @Darth377Apps
Please check out my Twitter account!

I have been working on a few games!
Give me ALL THE INTERNETS!
Is it the exact same? I think in your script you used var ___ = [] instead of var ___ = new Array();, but apart from that, is it the same?
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]
Is it that much of a problem? It's just temporarily, till BL gets released with it added.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumFixed the first problem.
I also tried to add:
I haven't tested them yet, though.
Beta download: http://tinyw.in/bl
First, I didn't steal from anything. Honestly, I've never looked at the risk script. That was part of a library I've been working on... So don't things like that. I've never stolen code ever. So just don't...
Downloading now.
Entity.getRider() would be for the mob that is getting ridden, but what is Entity.getRiding()? Does it return a boolean on whether it is riding, or does it return the mob that is riding on another mob?
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 guess a player parameter would be great for BlockLauncher's server api. It already has send server message. Why not create a whole API? This would be better than PocketMine in some ways.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIf the custom item's original name is Evil Stick,
ModPE.langEdit("item.Evil Stick.name", "peaceful stick")Huh, how about that. I totally missed this. Thanks.
http://www.minecraftforum.net/forums/minecraft-pocket-edition/mcpe-mods-tools/2610428-0-13-emeraldcraft-metalurgic-gems-alchemy
Just look at this hot logo! :3
You want to make the description of a custom item/block for custom crafting?
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]
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI can add that, though behind the scenes it will just call
ModPE.langEdit("item.potato.description", "I LIEK POTATO LOL");I haven't tried it but how about doing one of the following?
Add an item description using your item name.
ModPE.langEdit("desc.Custom Item". "Description");or
ModPE.langEdit("desc.sword", "Deals more damage than by hand.\ndesc.Custom Item=The description");