PaperMC/paper-server/nms-patches/ItemFood.patch
CraftBukkit/Spigot 15a21299da SPIGOT-840, SPIGOT-2522: [Draft] Add EntityPotionEffectChangeEvent
Discussion ongoing in PR #449

By: kaenganxt <kaenganxt@mc-anura.de>
2018-07-20 16:04:37 +10:00

11 lines
489 B
Diff

--- a/net/minecraft/server/ItemFood.java
+++ b/net/minecraft/server/ItemFood.java
@@ -36,7 +36,7 @@
protected void a(ItemStack itemstack, World world, EntityHuman entityhuman) {
if (!world.isClientSide && this.l != null && world.random.nextFloat() < this.m) {
- entityhuman.addEffect(new MobEffect(this.l));
+ entityhuman.addEffect(new MobEffect(this.l), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // CraftBukkit
}
}