summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2015-01-07 09:58:56 +1100
committermd_5 <git@md-5.net>2015-01-07 09:58:56 +1100
commit7bd9a5a243b926896dda39a97813110712ad33ba (patch)
tree12211afbf444e37376af913c550c5001e45a6991
parent0c4761140929fe6a5389679b54bf184651cc41a3 (diff)
downloadcraftbukkit-7bd9a5a243b926896dda39a97813110712ad33ba.tar
craftbukkit-7bd9a5a243b926896dda39a97813110712ad33ba.tar.gz
craftbukkit-7bd9a5a243b926896dda39a97813110712ad33ba.tar.lz
craftbukkit-7bd9a5a243b926896dda39a97813110712ad33ba.tar.xz
craftbukkit-7bd9a5a243b926896dda39a97813110712ad33ba.zip
SPIGOT-321: Fire damage event for EntityItem.
-rw-r--r--nms-patches/EntityItem.patch20
1 files changed, 16 insertions, 4 deletions
diff --git a/nms-patches/EntityItem.patch b/nms-patches/EntityItem.patch
index 4c58d403..2716ccd1 100644
--- a/nms-patches/EntityItem.patch
+++ b/nms-patches/EntityItem.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/EntityItem.java 2014-11-28 17:43:43.113707435 +0000
-+++ src/main/java/net/minecraft/server/EntityItem.java 2014-11-28 17:38:18.000000000 +0000
+--- ../work/decompile-8eb82bde/net/minecraft/server/EntityItem.java 2015-01-07 09:58:20.976505660 +1100
++++ src/main/java/net/minecraft/server/EntityItem.java 2015-01-07 09:58:20.976505660 +1100
@@ -4,6 +4,8 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -66,7 +66,19 @@
this.die();
}
-@@ -228,7 +247,18 @@
+@@ -183,6 +202,11 @@
+ } else if (this.getItemStack() != null && this.getItemStack().getItem() == Items.NETHER_STAR && damagesource.isExplosion()) {
+ return false;
+ } else {
++ // CraftBukkit start
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
++ return false;
++ }
++ // CraftBukkit end
+ this.ac();
+ this.e = (int) ((float) this.e - f);
+ if (this.e <= 0) {
+@@ -228,7 +252,18 @@
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Item");
@@ -86,7 +98,7 @@
if (this.getItemStack() == null) {
this.die();
}
-@@ -239,6 +269,26 @@
+@@ -239,6 +274,26 @@
if (!this.world.isStatic) {
ItemStack itemstack = this.getItemStack();
int i = itemstack.count;