diff options
Diffstat (limited to 'nms-patches/MobEffectList.patch')
-rw-r--r-- | nms-patches/MobEffectList.patch | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/nms-patches/MobEffectList.patch b/nms-patches/MobEffectList.patch index 5f8389c1..f9323cea 100644 --- a/nms-patches/MobEffectList.patch +++ b/nms-patches/MobEffectList.patch @@ -1,6 +1,6 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/MobEffectList.java 2014-11-28 17:43:43.257707431 +0000 -+++ src/main/java/net/minecraft/server/MobEffectList.java 2014-11-28 17:38:23.000000000 +0000 -@@ -6,6 +6,11 @@ +--- /home/matt/mc-dev-private//net/minecraft/server/MobEffectList.java 2015-02-26 22:40:22.883608136 +0000 ++++ src/main/java/net/minecraft/server/MobEffectList.java 2015-02-26 22:40:22.883608136 +0000 +@@ -7,6 +7,11 @@ import java.util.UUID; import java.util.Map.Entry; @@ -12,16 +12,15 @@ public class MobEffectList { public static final MobEffectList[] byId = new MobEffectList[32]; -@@ -63,6 +68,8 @@ +@@ -64,6 +69,7 @@ } this.L = j; + org.bukkit.potion.PotionEffectType.registerPotionEffectType(new org.bukkit.craftbukkit.potion.CraftPotionEffectType(this)); // CraftBukkit -+ } public static MobEffectList b(String s) { -@@ -94,11 +101,11 @@ +@@ -86,11 +92,11 @@ public void tick(EntityLiving entityliving, int i) { if (this.id == MobEffectList.REGENERATION.id) { if (entityliving.getHealth() < entityliving.getMaxHealth()) { @@ -35,10 +34,10 @@ } } else if (this.id == MobEffectList.WITHER.id) { entityliving.damageEntity(DamageSource.WITHER, 1.0F); -@@ -106,14 +113,25 @@ +@@ -98,14 +104,25 @@ ((EntityHuman) entityliving).applyExhaustion(0.025F * (float) (i + 1)); } else if (this.id == MobEffectList.SATURATION.id && entityliving instanceof EntityHuman) { - if (!entityliving.world.isStatic) { + if (!entityliving.world.isClientSide) { - ((EntityHuman) entityliving).getFoodData().eat(i + 1, 1.0F); + // CraftBukkit start + EntityHuman entityhuman = (EntityHuman) entityliving; @@ -53,8 +52,8 @@ + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutUpdateHealth(((EntityPlayer) entityhuman).getBukkitEntity().getScaledHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel)); + // CraftBukkit end } - } else if ((this.id != MobEffectList.HEAL.id || entityliving.bl()) && (this.id != MobEffectList.HARM.id || !entityliving.bl())) { - if (this.id == MobEffectList.HARM.id && !entityliving.bl() || this.id == MobEffectList.HEAL.id && entityliving.bl()) { + } else if ((this.id != MobEffectList.HEAL.id || entityliving.bm()) && (this.id != MobEffectList.HARM.id || !entityliving.bm())) { + if (this.id == MobEffectList.HARM.id && !entityliving.bm() || this.id == MobEffectList.HEAL.id && entityliving.bm()) { entityliving.damageEntity(DamageSource.MAGIC, (float) (6 << i)); } } else { @@ -63,7 +62,7 @@ } } -@@ -132,7 +150,7 @@ +@@ -124,7 +141,7 @@ } } else { j = (int) (d0 * (double) (4 << i) + 0.5D); |