SPIGOT-506: Falling blocks are special too

This commit is contained in:
md_5 2015-02-01 16:13:17 +11:00
parent e87122e110
commit a956d73f10

View File

@ -1,5 +1,5 @@
--- ../work/decompile-8eb82bde/net/minecraft/server/Explosion.java 2015-01-28 08:50:50.364126925 +1100 --- ../work/decompile-8eb82bde/net/minecraft/server/Explosion.java 2015-02-01 16:12:57.784236937 +1100
+++ src/main/java/net/minecraft/server/Explosion.java 2015-01-28 08:50:50.368126914 +1100 +++ src/main/java/net/minecraft/server/Explosion.java 2015-02-01 16:12:57.788236936 +1100
@@ -8,6 +8,12 @@ @@ -8,6 +8,12 @@
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -60,7 +60,7 @@
+ CraftEventFactory.entityDamage = source; + CraftEventFactory.entityDamage = source;
+ boolean wasDamaged = entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 8.0D * (double) f3 + 1.0D))); + boolean wasDamaged = entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 8.0D * (double) f3 + 1.0D)));
+ CraftEventFactory.entityDamage = null; + CraftEventFactory.entityDamage = null;
+ if (!wasDamaged && !(entity instanceof EntityTNTPrimed)) { + if (!wasDamaged && !(entity instanceof EntityTNTPrimed || entity instanceof EntityFallingBlock)) {
+ continue; + continue;
+ } + }
+ // CraftBukkit end + // CraftBukkit end