[Bleeding] Account for new rare drops in EntityDeath events. Fixes BUKKIT-1105

This commit is contained in:
zerg960
2012-03-20 20:55:45 -05:00
committed by EvilSeph
parent 1c95413f49
commit 96c4bb7da6
4 changed files with 77 additions and 34 deletions

View File

@@ -75,22 +75,20 @@ public class EntityZombie extends EntityMonster {
return MonsterType.UNDEAD;
}
protected void b(int i) {
// CraftBukkit start - return rare dropped item instead of dropping it
protected ItemStack b(int i) {
switch (this.random.nextInt(4)) {
case 0:
this.b(Item.IRON_SWORD.id, 1);
break;
case 1:
this.b(Item.IRON_HELMET.id, 1);
break;
case 2:
this.b(Item.IRON_INGOT.id, 1);
break;
case 3:
this.b(Item.IRON_SPADE.id, 1);
case 0:
return new ItemStack(Item.IRON_SWORD.id, 1, 0);
case 1:
return new ItemStack(Item.IRON_HELMET.id, 1, 0);
case 2:
return new ItemStack(Item.IRON_INGOT.id, 1, 0);
case 3:
return new ItemStack(Item.IRON_SPADE.id, 1, 0);
default:
return null;
}
}
// CraftBukkit end
}