@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityLargeFireball.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityLargeFireball.java
|
||||
@@ -11,17 +11,21 @@
|
||||
@@ -10,17 +10,21 @@
|
||||
import net.minecraft.world.phys.MovingObjectPosition;
|
||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
|
||||
@@ -22,24 +22,24 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -30,7 +34,15 @@
|
||||
@@ -29,7 +33,15 @@
|
||||
if (!this.level.isClientSide) {
|
||||
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
|
||||
|
||||
- this.level.explode((Entity) null, this.getX(), this.getY(), this.getZ(), (float) this.explosionPower, flag, flag ? Explosion.Effect.DESTROY : Explosion.Effect.NONE);
|
||||
- this.level.explode(this, this.getX(), this.getY(), this.getZ(), (float) this.explosionPower, flag, World.a.MOB);
|
||||
+ // CraftBukkit start - fire ExplosionPrimeEvent
|
||||
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) this.getBukkitEntity());
|
||||
+ this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (!event.isCancelled()) {
|
||||
+ // give 'this' instead of (Entity) null so we know what causes the damage
|
||||
+ this.level.explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), flag ? Explosion.Effect.DESTROY : Explosion.Effect.NONE);
|
||||
+ this.level.explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), World.a.MOB);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.discard();
|
||||
}
|
||||
|
||||
@@ -61,7 +73,8 @@
|
||||
@@ -60,7 +72,8 @@
|
||||
public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
|
||||
super.readAdditionalSaveData(nbttagcompound);
|
||||
if (nbttagcompound.contains("ExplosionPower", 99)) {
|
||||
|
||||
Reference in New Issue
Block a user