summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityPotion.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-20 13:42:12 +1100
committermd_5 <git@md-5.net>2016-03-20 13:42:12 +1100
commit6cac62c64d8f851e0ed7c4c989cfe21cc46e7050 (patch)
treed41e898547ba799f720d3677f43e555c738c5448 /nms-patches/EntityPotion.patch
parent549962feaf4e17b1eab1092fe4d5a61ca5b13b59 (diff)
downloadcraftbukkit-6cac62c64d8f851e0ed7c4c989cfe21cc46e7050.tar
craftbukkit-6cac62c64d8f851e0ed7c4c989cfe21cc46e7050.tar.gz
craftbukkit-6cac62c64d8f851e0ed7c4c989cfe21cc46e7050.tar.lz
craftbukkit-6cac62c64d8f851e0ed7c4c989cfe21cc46e7050.tar.xz
craftbukkit-6cac62c64d8f851e0ed7c4c989cfe21cc46e7050.zip
Fix strange potion diff
Diffstat (limited to 'nms-patches/EntityPotion.patch')
-rw-r--r--nms-patches/EntityPotion.patch30
1 files changed, 15 insertions, 15 deletions
diff --git a/nms-patches/EntityPotion.patch b/nms-patches/EntityPotion.patch
index e7574eba..471800d4 100644
--- a/nms-patches/EntityPotion.patch
+++ b/nms-patches/EntityPotion.patch
@@ -61,7 +61,20 @@
+ }
+ }
+ }
-+
+
+- while (iterator2.hasNext()) {
+- MobEffect mobeffect1 = (MobEffect) iterator2.next();
+- MobEffectList mobeffectlist = mobeffect1.getMobEffect();
+-
+- if (mobeffectlist.isInstant()) {
+- mobeffectlist.applyInstantEffect(this, this.getShooter(), entityliving, mobeffect1.getAmplifier(), d1);
+- } else {
+- int i = (int) (d1 * (double) mobeffect1.getDuration() + 0.5D);
+-
+- if (i > 20) {
+- entityliving.addEffect(new MobEffect(mobeffectlist, i, mobeffect1.getAmplifier()));
+- }
+- }
+ org.bukkit.event.entity.PotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPotionSplashEvent(this, affected);
+ if (!event.isCancelled() && list != null && !list.isEmpty()) { // do not process effects if there are no effects to process
+ for (LivingEntity victim : event.getAffectedEntities()) {
@@ -91,20 +104,7 @@
+ mobeffectlist.applyInstantEffect(this, this.getShooter(), entityliving, mobeffect1.getAmplifier(), d1);
+ } else {
+ int i = (int) (d1 * (double) mobeffect1.getDuration() + 0.5D);
-
-- while (iterator2.hasNext()) {
-- MobEffect mobeffect1 = (MobEffect) iterator2.next();
-- MobEffectList mobeffectlist = mobeffect1.getMobEffect();
--
-- if (mobeffectlist.isInstant()) {
-- mobeffectlist.applyInstantEffect(this, this.getShooter(), entityliving, mobeffect1.getAmplifier(), d1);
-- } else {
-- int i = (int) (d1 * (double) mobeffect1.getDuration() + 0.5D);
--
-- if (i > 20) {
-- entityliving.addEffect(new MobEffect(mobeffectlist, i, mobeffect1.getAmplifier()));
-- }
-- }
++
+ if (i > 20) {
+ entityliving.addEffect(new MobEffect(mobeffectlist, i, mobeffect1.getAmplifier()));
}