diff options
author | kaenganxt <kaenganxt@mc-anura.de> | 2018-07-20 16:04:37 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-07-20 16:06:34 +1000 |
commit | 814c742554e40554a30cee1915b42457081000c6 (patch) | |
tree | ab1cc74348447c556db92576fd282ab465c70f3d /nms-patches/ItemFood.patch | |
parent | fa6e97a8f8c57e0a5bbd046fe9af3d795a2c11b5 (diff) | |
download | craftbukkit-814c742554e40554a30cee1915b42457081000c6.tar craftbukkit-814c742554e40554a30cee1915b42457081000c6.tar.gz craftbukkit-814c742554e40554a30cee1915b42457081000c6.tar.lz craftbukkit-814c742554e40554a30cee1915b42457081000c6.tar.xz craftbukkit-814c742554e40554a30cee1915b42457081000c6.zip |
SPIGOT-840, SPIGOT-2522: [Draft] Add EntityPotionEffectChangeEvent
Discussion ongoing in PR #449
Diffstat (limited to 'nms-patches/ItemFood.patch')
-rw-r--r-- | nms-patches/ItemFood.patch | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nms-patches/ItemFood.patch b/nms-patches/ItemFood.patch new file mode 100644 index 00000000..06317732 --- /dev/null +++ b/nms-patches/ItemFood.patch @@ -0,0 +1,11 @@ +--- 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 + } + + } |