mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 12:11:47 +01:00
45 lines
2.7 KiB
Diff
45 lines
2.7 KiB
Diff
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 c1b95715a1ae8c89ce98848332b1e9e1c905a6f5..aa850cfaa0534d57e83f37360724da2428a48a18 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
|
|
@@ -424,7 +424,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
|
|
}
|
|
|
|
@Override
|
|
diff --git a/src/main/java/net/minecraft/world/item/HoneyBottleItem.java b/src/main/java/net/minecraft/world/item/HoneyBottleItem.java
|
|
index a50c3785bcd4374008aed35e27978de5dbd78fae..2232ad471a1f03eadc2c1503c723559a62761e8c 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
|
|
}
|
|
|
|
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 f4e195fa7336804bd43652d2c246160e6a1fa4f3..0c2e5d536e8c3bed9def9cc07beb4498ff0e8bab 100644
|
|
--- a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
|
|
+++ b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
|
|
@@ -66,7 +66,7 @@ public class SuspiciousStewItem extends Item {
|
|
public ItemStack finishUsingItem(ItemStack stack, Level world, LivingEntity user) {
|
|
ItemStack itemStack = super.finishUsingItem(stack, world, user);
|
|
listPotionEffects(itemStack, (effect) -> {
|
|
- user.addEffect(effect.createEffectInstance());
|
|
+ user.addEffect(effect.createEffectInstance(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper
|
|
});
|
|
return user instanceof Player && ((Player)user).getAbilities().instabuild ? itemStack : new ItemStack(Items.BOWL);
|
|
}
|