From 973fe2a945acbf0c77d4c6a6a61518a33b120de4 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Sat, 14 Dec 2024 16:38:13 -0500 Subject: [PATCH] net/minecraft/world/entity/monster/creaking --- .../monster/creaking/Creaking.java.patch | 35 +++++++++++ .../monster/creaking/Creaking.java.patch | 60 ------------------- 2 files changed, 35 insertions(+), 60 deletions(-) create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch delete mode 100644 paper-server/patches/unapplied/net/minecraft/world/entity/monster/creaking/Creaking.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch new file mode 100644 index 0000000000..3c8cc3d167 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch @@ -0,0 +1,35 @@ +--- a/net/minecraft/world/entity/monster/creaking/Creaking.java ++++ b/net/minecraft/world/entity/monster/creaking/Creaking.java +@@ -190,9 +_,9 @@ + } + + @Override +- public void push(double x, double y, double z) { ++ public void push(double x, double y, double z, @Nullable Entity pushingEntity) { // Paper - add push source entity param + if (this.canMove()) { +- super.push(x, y, z); ++ super.push(x, y, z, pushingEntity); // Paper - add push source entity param + } + } + +@@ -317,7 +_,7 @@ + } + + this.makeSound(this.getDeathSound()); +- this.remove(Entity.RemovalReason.DISCARDED); ++ this.remove(Entity.RemovalReason.DISCARDED, null); // CraftBukkit - add Bukkit remove cause + } + + public void creakingDeathEffects(DamageSource damageSource) { +@@ -480,9 +_,9 @@ + } + + @Override +- public void knockback(double strength, double x, double z) { ++ public void knockback(double strength, double x, double z, @Nullable Entity attacker, io.papermc.paper.event.entity.EntityKnockbackEvent.Cause cause) { // Paper - knockback events + if (this.canMove()) { +- super.knockback(strength, x, z); ++ super.knockback(strength, x, z, attacker, cause); // Paper - knockback events + } + } + diff --git a/paper-server/patches/unapplied/net/minecraft/world/entity/monster/creaking/Creaking.java.patch b/paper-server/patches/unapplied/net/minecraft/world/entity/monster/creaking/Creaking.java.patch deleted file mode 100644 index d3d16a6b28..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/entity/monster/creaking/Creaking.java.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- a/net/minecraft/world/entity/monster/creaking/Creaking.java -+++ b/net/minecraft/world/entity/monster/creaking/Creaking.java -@@ -198,15 +198,15 @@ - } - - @Override -- public void push(double deltaX, double deltaY, double deltaZ) { -+ public void push(double deltaX, double deltaY, double deltaZ, @Nullable Entity pushingEntity) { // Paper - add push source entity param - if (this.canMove()) { -- super.push(deltaX, deltaY, deltaZ); -+ super.push(deltaX, deltaY, deltaZ, pushingEntity); // Paper - add push source entity param - } - } - - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain) super.getBrain(); // CraftBukkit - decompile error - } - - @Override -@@ -329,7 +329,7 @@ - } - - this.makeSound(this.getDeathSound()); -- this.remove(Entity.RemovalReason.DISCARDED); -+ this.remove(Entity.RemovalReason.DISCARDED, null); // CraftBukkit - add Bukkit remove cause - } - - public void creakingDeathEffects(DamageSource damageSource) { -@@ -476,7 +476,7 @@ - - @Override - protected SoundEvent getHurtSound(DamageSource source) { -- return this.isHeartBound() ? SoundEvents.CREAKING_SWAY : super.getHurtSound(source); -+ return SoundEvents.CREAKING_SWAY; - } - - @Override -@@ -502,9 +502,9 @@ - } - - @Override -- public void knockback(double strength, double x, double z) { -+ public void knockback(double strength, double x, double z, @Nullable Entity attacker, io.papermc.paper.event.entity.EntityKnockbackEvent.Cause cause) { // Paper - knockback events - if (this.canMove()) { -- super.knockback(strength, x, z); -+ super.knockback(strength, x, z, attacker, cause); // Paper - knockback events - } - } - -@@ -549,7 +549,7 @@ - } - - public void activate(Player player) { -- this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, (Object) player); -+ this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, player); // CraftBukkit - decompile error - this.gameEvent(GameEvent.ENTITY_ACTION); - this.makeSound(SoundEvents.CREAKING_ACTIVATE); - this.setIsActive(true);