SPIGOT-321: Fire damage event for EntityItem.
This commit is contained in:
parent
0c47611409
commit
7bd9a5a243
@ -1,5 +1,5 @@
|
|||||||
--- ../work/decompile-8eb82bde//net/minecraft/server/EntityItem.java 2014-11-28 17:43:43.113707435 +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 2014-11-28 17:38:18.000000000 +0000
|
+++ src/main/java/net/minecraft/server/EntityItem.java 2015-01-07 09:58:20.976505660 +1100
|
||||||
@@ -4,6 +4,8 @@
|
@@ -4,6 +4,8 @@
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -66,7 +66,19 @@
|
|||||||
this.die();
|
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");
|
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Item");
|
||||||
|
|
||||||
@ -86,7 +98,7 @@
|
|||||||
if (this.getItemStack() == null) {
|
if (this.getItemStack() == null) {
|
||||||
this.die();
|
this.die();
|
||||||
}
|
}
|
||||||
@@ -239,6 +269,26 @@
|
@@ -239,6 +274,26 @@
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isStatic) {
|
||||||
ItemStack itemstack = this.getItemStack();
|
ItemStack itemstack = this.getItemStack();
|
||||||
int i = itemstack.count;
|
int i = itemstack.count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user