From 748ebae550002da7a0a6a611fcc737f57495f289 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Sun, 15 Apr 2012 09:16:43 -0500 Subject: Properly call EntityDeathEvent for mobs. Fixes BUKKIT-1519 --- src/main/java/net/minecraft/server/EntityLiving.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/main/java/net/minecraft/server/EntityLiving.java') diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index 726e5d51..8c279ec7 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -779,7 +779,18 @@ public abstract class EntityLiving extends Entity { if (!this.isBaby()) { this.dropDeathLoot(this.lastDamageByPlayerTime > 0, i); - // CraftBukkit - move rare item drop call to dropDeathLoot + /* CraftBukkit start - move rare item drop call to dropDeathLoot + if (this.lastDamageByPlayerTime > 0) { + int j = this.random.nextInt(200) - i; + + if (j < 5) { + this.b(j <= 0 ? 1 : 0); + } + } + // */ + } else { + CraftEventFactory.callEntityDeathEvent(this); + // CraftBukkit end } } -- cgit v1.2.3