mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-27 02:31:43 +01:00
64cd2b148a
By: DerFrZocker <derrieple@gmail.com>
40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
--- a/net/minecraft/world/entity/projectile/WindCharge.java
|
|
+++ b/net/minecraft/world/entity/projectile/WindCharge.java
|
|
@@ -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 @@
|
|
}
|
|
}
|
|
|
|
- private void explode() {
|
|
+ public void explode() { // PAIL private -> public
|
|
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
|
|
}
|
|
|
|
}
|