It's possible; I don't have a script written up for it though. I'm not sure whether you can override the original drops, but if you listen to deathHook you can add additional drops.
It's possible; I don't have a script written up for it though. I'm not sure whether you can override the original drops, but if you listen to deathHook you can add additional drops.
ModPE.setCarriedItem(54, 276, 0) 54=zombie 276=diamond sword 0=how much damage the sword has. Is that right?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumModPE.setCarriedItem(54, 276, 0) 54=zombie 276=diamond sword 0=how much damage the sword has. Is that right?
function deathHook(attacker, victim) { if(Entity.getEntityTypeId(victim)==32) { Level.dropItem(Entity.getX(victim), Entity.getY(victim), Entity.getZ(victim), 1, 2, 1); } }This would make any zombie you kill drop an item with an Id of 2(grass block).
Thats confusing. What is 32 stand for? and what are the 1's for? I'm still new to this and learning by looking at other peoples scripts
I thought that to but zombie is 54
I just tried it and it didn't work
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI'm pretty sure zombies are 32. That's what the getEntityTypeId() returns. List: http://minecraft.gamepedia.com/Data_values_(Pocket_Edition)#Entity_IDs
The only person who knows why that 1 is there is MrARM, who implemented dropItem.
When I looked up entity ID I found the PC version thats why I thought it was 54. I tried it again and the zombies only drop feathers
ModPE!?
I'm using 1.4.5
You can use this site to know what is the items', blocks' and mobs' ids:
http://minecraft-ids.grahamedgecombe.com/entities