From 661b30a78571f8f02216de434519ab723806f0a3 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Sun, 18 Sep 2022 05:46:20 +0200 Subject: [PATCH] Missing some effect cause (#8307) --- patches/server/Missing-effect-cause.patch | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 patches/server/Missing-effect-cause.patch diff --git a/patches/server/Missing-effect-cause.patch b/patches/server/Missing-effect-cause.patch new file mode 100644 index 0000000000..91cc4d3242 --- /dev/null +++ b/patches/server/Missing-effect-cause.patch @@ -0,0 +1,45 @@ +From 0000000000000000000000000000000000000000 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 + + +diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java ++++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java +@@ -0,0 +0,0 @@ public class Axolotl extends Animal implements LerpingModel, Bucketable { + player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, i, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit + } + +- player.removeEffect(MobEffects.DIG_SLOWDOWN); ++ player.removeEffect(MobEffects.DIG_SLOWDOWN, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // Paper + } + + @Override +diff --git a/src/main/java/net/minecraft/world/item/HoneyBottleItem.java b/src/main/java/net/minecraft/world/item/HoneyBottleItem.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/item/HoneyBottleItem.java ++++ b/src/main/java/net/minecraft/world/item/HoneyBottleItem.java +@@ -0,0 +0,0 @@ public class HoneyBottleItem extends Item { + } + + if (!world.isClientSide) { +- user.removeEffect(MobEffects.POISON); ++ user.removeEffect(MobEffects.POISON, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper + } + + if (stack.isEmpty()) { +diff --git a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java ++++ b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java +@@ -0,0 +0,0 @@ public class SuspiciousStewItem extends Item { + + MobEffect mobEffect = MobEffect.byId(compoundTag2.getInt("EffectId")); + if (mobEffect != null) { +- user.addEffect(new MobEffectInstance(mobEffect, j)); ++ user.addEffect(new MobEffectInstance(mobEffect, j), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper + } + } + }