2024-06-14 01:05:00 +10:00

41 lines
1.7 KiB
Diff

--- a/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
+++ b/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
@@ -25,6 +25,10 @@
import net.minecraft.world.phys.MovingObjectPositionEntity;
import net.minecraft.world.phys.Vec3D;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityRemoveEvent;
+// CraftBukkit end
+
public abstract class AbstractWindCharge extends EntityFireball implements ItemSupplier {
public static final ExplosionDamageCalculator EXPLOSION_DAMAGE_CALCULATOR = new SimpleExplosionDamageCalculator(true, false, Optional.empty(), BuiltInRegistries.BLOCK.getTag(TagsBlock.BLOCKS_WIND_CHARGE_EXPLOSIONS).map(Function.identity()));
@@ -113,7 +117,7 @@
Vec3D vec3d1 = movingobjectpositionblock.getLocation().add(vec3d);
this.explode(vec3d1);
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
}
@@ -122,7 +126,7 @@
protected void onHit(MovingObjectPosition movingobjectposition) {
super.onHit(movingobjectposition);
if (!this.level().isClientSide) {
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
}
@@ -157,7 +161,7 @@
public void tick() {
if (!this.level().isClientSide && this.getBlockY() > this.level().getMaxBuildHeight() + 30) {
this.explode(this.position());
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause
} else {
super.tick();
}