@@ -12,7 +12,7 @@
|
||||
public class MobEffectList {
|
||||
|
||||
private final Map<IAttribute, AttributeModifier> a = Maps.newHashMap();
|
||||
@@ -24,7 +29,7 @@
|
||||
@@ -21,7 +26,7 @@
|
||||
}
|
||||
|
||||
public static int getId(MobEffectList mobeffectlist) {
|
||||
@@ -20,8 +20,8 @@
|
||||
+ return IRegistry.MOB_EFFECT.a(mobeffectlist); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
protected MobEffectList(boolean flag, int i) {
|
||||
@@ -46,11 +51,11 @@
|
||||
protected MobEffectList(MobEffectInfo mobeffectinfo, int i) {
|
||||
@@ -32,11 +37,11 @@
|
||||
public void tick(EntityLiving entityliving, int i) {
|
||||
if (this == MobEffects.REGENERATION) {
|
||||
if (entityliving.getHealth() < entityliving.getMaxHealth()) {
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
} else if (this == MobEffects.WITHER) {
|
||||
entityliving.damageEntity(DamageSource.WITHER, 1.0F);
|
||||
@@ -58,14 +63,25 @@
|
||||
@@ -44,14 +49,25 @@
|
||||
((EntityHuman) entityliving).applyExhaustion(0.005F * (float) (i + 1));
|
||||
} else if (this == MobEffects.SATURATION && entityliving instanceof EntityHuman) {
|
||||
if (!entityliving.world.isClientSide) {
|
||||
@@ -53,8 +53,8 @@
|
||||
+ ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutUpdateHealth(((EntityPlayer) entityhuman).getBukkitEntity().getScaledHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel));
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
} else if ((this != MobEffects.HEAL || entityliving.cp()) && (this != MobEffects.HARM || !entityliving.cp())) {
|
||||
if (this == MobEffects.HARM && !entityliving.cp() || this == MobEffects.HEAL && entityliving.cp()) {
|
||||
} else if ((this != MobEffects.HEAL || entityliving.cB()) && (this != MobEffects.HARM || !entityliving.cB())) {
|
||||
if (this == MobEffects.HARM && !entityliving.cB() || this == MobEffects.HEAL && entityliving.cB()) {
|
||||
entityliving.damageEntity(DamageSource.MAGIC, (float) (6 << i));
|
||||
}
|
||||
} else {
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -86,7 +102,7 @@
|
||||
@@ -72,7 +88,7 @@
|
||||
}
|
||||
} else {
|
||||
j = (int) (d0 * (double) (4 << i) + 0.5D);
|
||||
@@ -72,15 +72,3 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -215,6 +231,11 @@
|
||||
a(28, "slow_falling", (new MobEffectList(false, 16773073)).b(8, 0).l());
|
||||
a(29, "conduit_power", (new MobEffectList(false, 1950417)).b(9, 0).l());
|
||||
a(30, "dolphins_grace", (new MobEffectList(false, 8954814)).b(10, 0).l());
|
||||
+ // CraftBukkit start
|
||||
+ for (Object effect : IRegistry.MOB_EFFECT) {
|
||||
+ org.bukkit.potion.PotionEffectType.registerPotionEffectType(new org.bukkit.craftbukkit.potion.CraftPotionEffectType((MobEffectList) effect));
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
private static void a(int i, String s, MobEffectList mobeffectlist) {
|
||||
|
||||
Reference in New Issue
Block a user