From ce9d79a81b2741112ae618cc02f094519925e927 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Fri, 13 Dec 2024 17:52:29 -0800 Subject: [PATCH] net.minecraft.world.entity.projectile.windcharge --- .../windcharge/AbstractWindCharge.java.patch | 38 +++++++++++++++ .../windcharge/AbstractWindCharge.java.patch | 48 ------------------- 2 files changed, 38 insertions(+), 48 deletions(-) create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch delete mode 100644 paper-server/patches/unapplied/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch new file mode 100644 index 0000000000..a764fae4a2 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch @@ -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(); + } diff --git a/paper-server/patches/unapplied/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch b/paper-server/patches/unapplied/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch deleted file mode 100644 index 01844591e6..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java -+++ b/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java -@@ -24,6 +24,9 @@ - import net.minecraft.world.phys.EntityHitResult; - import net.minecraft.world.phys.HitResult; - import net.minecraft.world.phys.Vec3; -+// CraftBukkit start -+import org.bukkit.event.entity.EntityRemoveEvent; -+// CraftBukkit end - - public abstract class AbstractWindCharge extends AbstractHurtingProjectile implements ItemSupplier { - -@@ -98,7 +101,7 @@ - } - - @Override -- public void push(double deltaX, double deltaY, double deltaZ) {} -+ public void push(double deltaX, double deltaY, double deltaZ, @Nullable Entity pushingEntity) {} // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent - - public abstract void explode(Vec3 pos); - -@@ -111,7 +114,7 @@ - Vec3 vec3d1 = blockHitResult.getLocation().add(vec3d); - - this.explode(vec3d1); -- this.discard(); -+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause - } - - } -@@ -120,7 +123,7 @@ - protected void onHit(HitResult hitResult) { - super.onHit(hitResult); - if (!this.level().isClientSide) { -- this.discard(); -+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause - } - - } -@@ -155,7 +158,7 @@ - public void tick() { - if (!this.level().isClientSide && this.getBlockY() > this.level().getMaxY() + 30) { - this.explode(this.position()); -- this.discard(); -+ this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause - } else { - super.tick(); - }