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/TileEntityConduit.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/TileEntityConduit.patch')
-rw-r--r-- | nms-patches/TileEntityConduit.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nms-patches/TileEntityConduit.patch b/nms-patches/TileEntityConduit.patch new file mode 100644 index 00000000..23d9e0fa --- /dev/null +++ b/nms-patches/TileEntityConduit.patch @@ -0,0 +1,31 @@ +--- a/net/minecraft/server/TileEntityConduit.java ++++ b/net/minecraft/server/TileEntityConduit.java +@@ -154,7 +154,7 @@ + EntityHuman entityhuman = (EntityHuman) iterator.next(); + + if (this.position.m(new BlockPosition(entityhuman)) <= (double) j && entityhuman.ao()) { +- entityhuman.addEffect(new MobEffect(MobEffects.CONDUIT_POWER, 260, 0, true, true)); ++ entityhuman.addEffect(new MobEffect(MobEffects.CONDUIT_POWER, 260, 0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONDUIT); // CraftBukkit + } + } + +@@ -171,8 +171,8 @@ + this.j = this.l(); + this.k = null; + } else if (this.j == null) { +- List list = this.world.a(EntityLiving.class, this.k(), (entityliving) -> { +- return entityliving instanceof IMonster && entityliving.ao(); ++ List list = this.world.a(EntityLiving.class, this.k(), (Predicate<EntityLiving>) (entitylivingx) -> { // CraftBukkit - decompile error ++ return entitylivingx instanceof IMonster && entitylivingx.ao(); // CraftBukkit - decompile error + }); + + if (!list.isEmpty()) { +@@ -217,7 +217,7 @@ + + @Nullable + private EntityLiving l() { +- List list = this.world.a(EntityLiving.class, this.k(), (entityliving) -> { ++ List list = this.world.a(EntityLiving.class, this.k(), (Predicate<EntityLiving>) (entityliving) -> { // CraftBukkit - decompile error + return entityliving.getUniqueID().equals(this.k); + }); + |