I've seen other people add items that aren't in MCPE yet (cookies, golden apples, fish) and was wondering how can I do this? I want it to show the image of the item in the game also
The ID is the special ID for the item from 1-510 (But using non existent ids is recommended).
iconX and iconY are the location of the item image in the items.png.
The name is the item of it ingame.
For a food it there is an extra parameter:
ModPE.setFoodItem (id, icon X, icon Y, halfhearts healed, "name");
The halfhearts is how many half-hearts it heals when it is eaten.
I tried it out but its not working. I'm not sure what I'm doing wrong.
ModPE.setFoodItem (382, 9,8,12 "Glistering Melon");
function useItem(x,y,z, itemId, blockId){
if (itemId == 280){
addItemInventory(382,1);
}
}
I was looking at other peoples scripts and this is similar to there script but its not working for me
Edit: Never mind I figure it out
golden apple is 12,0 or try 12,1