SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, #1008: Add EntityRemoveEvent
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
--- a/net/minecraft/world/entity/projectile/WindCharge.java
|
||||
+++ b/net/minecraft/world/entity/projectile/WindCharge.java
|
||||
@@ -81,7 +81,7 @@
|
||||
@@ -22,6 +22,10 @@
|
||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.event.entity.EntityRemoveEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class WindCharge extends EntityFireball implements ItemSupplier {
|
||||
|
||||
public static final WindCharge.a EXPLOSION_DAMAGE_CALCULATOR = new WindCharge.a();
|
||||
@@ -81,7 +85,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,3 +20,20 @@
|
||||
this.level().explode(this, (DamageSource) null, WindCharge.EXPLOSION_DAMAGE_CALCULATOR, this.getX(), this.getY(), this.getZ(), (float) (3.0D + this.random.nextDouble()), false, World.a.BLOW, Particles.GUST, Particles.GUST_EMITTER, SoundEffects.WIND_BURST);
|
||||
}
|
||||
|
||||
@@ -89,14 +93,14 @@
|
||||
protected void onHitBlock(MovingObjectPositionBlock movingobjectpositionblock) {
|
||||
super.onHitBlock(movingobjectpositionblock);
|
||||
this.explode();
|
||||
- this.discard();
|
||||
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onHit(MovingObjectPosition movingobjectposition) {
|
||||
super.onHit(movingobjectposition);
|
||||
if (!this.level().isClientSide) {
|
||||
- this.discard();
|
||||
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user