1: Is it possible to add a custom named item to the player's inventory? I know that you can do it in the PC version using a cheat like: /give RedAnt2600 minecraft:paper 1 0 {display: {Name:"SECURITY CARD"}}
But I don't know if I could do it in a ModPE script. I know there's the Player.addItemInventory(ID,amount,damage);
So could I do something like Player.addItemInventory(339,1,0 {display: {Name:"SECURITY CARD"}}); ?
2: I need to know how to target a single mob. I'm working on a mod that spawns a zombie with a custom skin. But I need to give this mob (and not any other zombies) an upgraded amount of health.
I'm currently using this as my code to spawn the zombie: Level.spawnMob(x,y+3,z,32,"images/mob/clockwork.png");
Thank you for all of your support! XD If you want to be a mod tester, I would love to have your opinion. Just message me and we'll talk. Thanks!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
1: Is it possible to add a custom named item to the player's inventory? I know that you can do it in the PC version using a cheat like: /give RedAnt2600 minecraft:paper 1 0 {display: {Name:"SECURITY CARD"}}
But I don't know if I could do it in a ModPE script. I know there's the Player.addItemInventory(ID,amount,damage);
So could I do something like Player.addItemInventory(339,1,0 {display: {Name:"SECURITY CARD"}}); ?
2: I need to know how to target a single mob. I'm working on a mod that spawns a zombie with a custom skin. But I need to give this mob (and not any other zombies) an upgraded amount of health.
I'm currently using this as my code to spawn the zombie: Level.spawnMob(x,y+3,z,32,"images/mob/clockwork.png");
Thank you for all of your support! XD If you want to be a mod tester, I would love to have your opinion. Just message me and we'll talk. Thanks!