diff options
author | Jake Potrebic <[email protected]> | 2024-05-29 13:58:57 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-29 22:58:57 +0200 |
commit | a31dc90741ed9c121a13a3c124c9ebf5bafd0da7 (patch) | |
tree | 81963bd94fe7772ee08bd21710230de21b6b25da /patches/server/0754-Missing-effect-cause.patch | |
parent | ed85aac53cfd93d29fa24e6071dbdddd0e49624b (diff) | |
download | Paper-a31dc90741ed9c121a13a3c124c9ebf5bafd0da7.tar.gz Paper-a31dc90741ed9c121a13a3c124c9ebf5bafd0da7.zip |
Several fixes and new api for experience merging/stacking (#9242)
Diffstat (limited to 'patches/server/0754-Missing-effect-cause.patch')
-rw-r--r-- | patches/server/0754-Missing-effect-cause.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/patches/server/0754-Missing-effect-cause.patch b/patches/server/0754-Missing-effect-cause.patch new file mode 100644 index 0000000000..17172c3b36 --- /dev/null +++ b/patches/server/0754-Missing-effect-cause.patch @@ -0,0 +1,45 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Lulu13022002 <[email protected]> +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 0a6ebd5c5fcad420659f3ade3280beaf6ac115f2..a8cc6ddbf45370fe632e5c5fb7ceef3d299e62a4 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 +@@ -407,7 +407,7 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo + 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, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // Paper - Add missing effect cause + } + + @Override +diff --git a/src/main/java/net/minecraft/world/item/HoneyBottleItem.java b/src/main/java/net/minecraft/world/item/HoneyBottleItem.java +index d6715103e264eb7b345e19ea486d83f2ce289ca4..55c21d394734230e10e32e0e10de6ff7b20decc9 100644 +--- a/src/main/java/net/minecraft/world/item/HoneyBottleItem.java ++++ b/src/main/java/net/minecraft/world/item/HoneyBottleItem.java +@@ -28,7 +28,7 @@ public class HoneyBottleItem extends Item { + } + + if (!world.isClientSide) { +- user.removeEffect(MobEffects.POISON); ++ user.removeEffect(MobEffects.POISON, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper - Add missing effect cause + } + + 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 c980abc27fb14b207d35d08a0c4557b1e525f1b9..3019122ad653ed8a5da64f3ab7b81169c4d9e9c6 100644 +--- a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java ++++ b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java +@@ -37,7 +37,7 @@ public class SuspiciousStewItem extends Item { + SuspiciousStewEffects suspiciousStewEffects = stack.getOrDefault(DataComponents.SUSPICIOUS_STEW_EFFECTS, SuspiciousStewEffects.EMPTY); + + for (SuspiciousStewEffects.Entry entry : suspiciousStewEffects.effects()) { +- user.addEffect(entry.createEffectInstance()); ++ user.addEffect(entry.createEffectInstance(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper - Add missing effect cause + } + + super.finishUsingItem(stack, world, user); |