ModPE.setItem(407, 6, 6, "New Item"); // this adds a new item (id, x, y, "name");
ModPE.setFoodItem (408, 6, 7, 5, "New Food"); //this adds a new food, (id, x, y, health gained, "name");
//the x and y, is the coordinates on the texture.png every single 1 coordinate is 16 pixels.
function useItem (x, y, z,itemId, blockId, side)//useItem Code goes here
{
if(itemId == 280)//If the item used is a stick
{
addItemInventory(407, 1); //add the item into you inventory
addItemInventory(408, 1); //add the new food into your inventory
clientMessage("Gained Custom Items!"); //client message sent when you tap a stick anywhere (when you gain new items)
}
}
Here +1 If i helped
Basically it is possible, the code above shows you how to add a new Item, and a new food item
Use it if you want.
ModPE.setItem(407, 6, 6, "New Item"); // this adds a new item (id, x, y, "name");
ModPE.setFoodItem (408, 6, 7, 5, "New Food"); //this adds a new food, (id, x, y, health gained, "name");
//the x and y, is the coordinates on the texture.png every single 1 coordinate is 16 pixels.
function useItem (x, y, z,itemId, blockId, side)//useItem Code goes here
{
if(itemId == 280)//If the item used is a stick
{
addItemInventory(407, 1); //add the item into you inventory
addItemInventory(408, 1); //add the new food into your inventory
clientMessage("Gained Custom Items!"); //client message sent when you tap a stick anywhere (when you gain new items)
}
}
Here +1 If i helped
Basically it is possible, the code above shows you how to add a new Item, and a new food item
Use it if you want.
Somdo you have to add the textures yourself? If so, where?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
why would you want this?
I am not sure, but you can pm to 500ISE for help
function destroyBlock(x,y,z,side){if(getCarriedItem()==0 && getTile(x,y,z)==2){ setTile(getPlayerX(),getPlayerY()-2,getPlayerZ(),blockid here); }}Hope this helped.function destroyBlock(x, y, z, side) { if(Player.getCarriedItem() == 0 && Level.getTile(x, y, z) == 2) { Level.setTile(Player.getX(), Player.getY() - 1.7, Player.getZ(), *insert block here*); } }Back to modding! Follow me on Twitter @byteandahalf
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumModPE.setItem(407, 6, 6, "New Item"); // this adds a new item (id, x, y, "name"); ModPE.setFoodItem (408, 6, 7, 5, "New Food"); //this adds a new food, (id, x, y, health gained, "name"); //the x and y, is the coordinates on the texture.png every single 1 coordinate is 16 pixels. function useItem (x, y, z,itemId, blockId, side)//useItem Code goes here { if(itemId == 280)//If the item used is a stick { addItemInventory(407, 1); //add the item into you inventory addItemInventory(408, 1); //add the new food into your inventory clientMessage("Gained Custom Items!"); //client message sent when you tap a stick anywhere (when you gain new items) } }Here +1 If i helped
Basically it is possible, the code above shows you how to add a new Item, and a new food item
Use it if you want.
Check out my game! It's an open-world, sandbox text adventure.
Follow @hexdro_
Hexdro © 2012-2015
Somdo you have to add the textures yourself? If so, where?