net.minecraft.world.entity.projectile.windcharge

This commit is contained in:
Jake Potrebic
2024-12-13 17:52:29 -08:00
parent 5b0289a248
commit ce9d79a81b
2 changed files with 38 additions and 48 deletions

View File

@@ -0,0 +1,38 @@
--- a/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
+++ b/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
@@ -85,7 +_,7 @@
}
@Override
- public void push(double x, double y, double z) {
+ public void push(double x, double y, double z, @Nullable Entity pushingEntity) { // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
}
public abstract void explode(Vec3 pos);
@@ -98,7 +_,7 @@
Vec3 vec3 = Vec3.atLowerCornerOf(unitVec3i).multiply(0.25, 0.25, 0.25);
Vec3 vec31 = result.getLocation().add(vec3);
this.explode(vec31);
- this.discard();
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
}
@@ -106,7 +_,7 @@
protected void onHit(HitResult result) {
super.onHit(result);
if (!this.level().isClientSide) {
- this.discard();
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
}
@@ -140,7 +_,7 @@
public void tick() {
if (!this.level().isClientSide && this.getBlockY() > this.level().getMaxY() + 30) {
this.explode(this.position());
- this.discard();
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause
} else {
super.tick();
}