From f8bf600375fed91a712993d1c3dc6329042c8274 Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Mon, 23 Dec 2024 04:51:58 +0100 Subject: Fix potion effect type removal (#11778) An incorrectly updated hunk attempted to remove the MobEffectInstance from the active effect map instead of the Holder as the parameter name was changed from holder to effect during hardfork. --- .../patches/sources/net/minecraft/world/entity/LivingEntity.java.patch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch index 6e41390320..15811ba3c8 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch @@ -388,7 +388,6 @@ @Nullable public MobEffectInstance removeEffectNoUpdate(Holder effect) { -- return this.activeEffects.remove(effect); + // CraftBukkit start + return this.removeEffectNoUpdate(effect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN); + } @@ -410,7 +409,7 @@ + return null; + } + -+ return this.activeEffects.remove(effectInstance); + return this.activeEffects.remove(effect); } public boolean removeEffect(Holder effect) { -- cgit v1.2.3