summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorGJ <gjmcferrin@gmail.com>2013-12-13 12:11:30 -0500
committerNate Mortensen <nate.richard.mortensen@gmail.com>2013-12-13 22:21:11 -0700
commita0e50c36b96b46e8187213f8ab5ff8e586720d86 (patch)
tree7ba992a7a10f2648589e16e2ba649445c71c617a /src/main/java
parentae9cd0729e26b5f271989579c12f8fec38060a19 (diff)
downloadcraftbukkit-a0e50c36b96b46e8187213f8ab5ff8e586720d86.tar
craftbukkit-a0e50c36b96b46e8187213f8ab5ff8e586720d86.tar.gz
craftbukkit-a0e50c36b96b46e8187213f8ab5ff8e586720d86.tar.lz
craftbukkit-a0e50c36b96b46e8187213f8ab5ff8e586720d86.tar.xz
craftbukkit-a0e50c36b96b46e8187213f8ab5ff8e586720d86.zip
[Bleeding] Fix Blazes not firing death events. Fixes BUKKIT-4898
Previously, due to the way that death events were called, Blazes only fired death events when they dropped loot. This change fixes that, enabling death events for Blazes whenever they die, regardless of loot drops.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/EntityBlaze.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/net/minecraft/server/EntityBlaze.java b/src/main/java/net/minecraft/server/EntityBlaze.java
index ea428c33..fe040f46 100644
--- a/src/main/java/net/minecraft/server/EntityBlaze.java
+++ b/src/main/java/net/minecraft/server/EntityBlaze.java
@@ -122,18 +122,19 @@ public class EntityBlaze extends EntityMonster {
}
protected void dropDeathLoot(boolean flag, int i) {
+ // CraftBukkit start
+ java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();
+
if (flag) {
- // CraftBukkit start
- java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();
int j = this.random.nextInt(2 + i);
if (j > 0) {
loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(Items.BLAZE_ROD), j));
}
-
- org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, loot);
- // CraftBukkit end
}
+
+ org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, loot);
+ // CraftBukkit end
}
public boolean bX() {