Catch login armor crash

This commit is contained in:
Blood-Asp 2017-05-31 18:09:30 +02:00
parent 6398c06506
commit 40304ed2f5
2 changed files with 5 additions and 1 deletions

View file

@ -1,7 +1,7 @@
minecraft.version=1.7.10 minecraft.version=1.7.10
forge.version=10.13.4.1566-1.7.10 forge.version=10.13.4.1566-1.7.10
gt.version=5.09.29 gt.version=5.09.30pre1
ae2.version=rv2-beta-33 ae2.version=rv2-beta-33
applecore.version=1.7.10-1.2.1+107.59407 applecore.version=1.7.10-1.2.1+107.59407

View file

@ -89,6 +89,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg
data = fillArmorData((EntityPlayer) player, armor); data = fillArmorData((EntityPlayer) player, armor);
} }
if (player != null && armor != null && source != null) { if (player != null && armor != null && source != null) {
try{
double tmp = 0.0d; double tmp = 0.0d;
if (source.isMagicDamage()) { if (source.isMagicDamage()) {
tmp = data.mStat.get(StatType.MAGICDEFENCE); tmp = data.mStat.get(StatType.MAGICDEFENCE);
@ -127,6 +128,9 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg
tmp = 1.0f - ((1.0f - tmp) / 2.0f); tmp = 1.0f - ((1.0f - tmp) / 2.0f);
} }
return new ISpecialArmor.ArmorProperties(0, data.getBaseAbsorptionRatio() * tmp, 1000); return new ISpecialArmor.ArmorProperties(0, data.getBaseAbsorptionRatio() * tmp, 1000);
}catch(Exception e){System.err.println(e);
return new ISpecialArmor.ArmorProperties(0, 0, 0);
}
} else { } else {
return new ISpecialArmor.ArmorProperties(0, 0, 0); return new ISpecialArmor.ArmorProperties(0, 0, 0);