From b24b1878640fa064b1681046e308293eb6791252 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Tue, 16 Aug 2022 19:44:55 +0200 Subject: [PATCH] Missing effect cause --- .../net/minecraft/world/entity/animal/Bee.java.patch | 9 +++++++++ .../world/entity/animal/axolotl/Axolotl.java.patch | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch index 8f3ad1f8c..748c94de8 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch @@ -124,6 +124,15 @@ this.setFlag(2, nearTarget); } +@@ -602,7 +636,7 @@ + if (mobeffect != null) { + this.usePlayerItem(player, hand, itemstack); + if (!this.level().isClientSide) { +- this.addEffect(mobeffect); ++ this.addEffect(mobeffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper - Add missing effect cause + } + + return InteractionResult.SUCCESS; @@ -671,8 +705,14 @@ if (this.isInvulnerableTo(world, source)) { return false; diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch index 0b468a3ad..3923bd7b5 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch @@ -28,7 +28,7 @@ } @Override -@@ -414,7 +421,7 @@ +@@ -414,10 +421,10 @@ int i = mobeffect != null ? mobeffect.getDuration() : 0; int j = Math.min(2400, 100 + i); @@ -36,7 +36,11 @@ + player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit } - player.removeEffect(MobEffects.DIG_SLOWDOWN); +- player.removeEffect(MobEffects.DIG_SLOWDOWN); ++ player.removeEffect(MobEffects.DIG_SLOWDOWN, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // Paper - Add missing effect cause + } + + @Override @@ -464,7 +471,7 @@ @Override