Catch login armor crash
This commit is contained in:
parent
6398c06506
commit
40304ed2f5
2 changed files with 5 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
minecraft.version=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
|
||||
applecore.version=1.7.10-1.2.1+107.59407
|
||||
|
|
|
@ -89,6 +89,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg
|
|||
data = fillArmorData((EntityPlayer) player, armor);
|
||||
}
|
||||
if (player != null && armor != null && source != null) {
|
||||
try{
|
||||
double tmp = 0.0d;
|
||||
if (source.isMagicDamage()) {
|
||||
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);
|
||||
}
|
||||
return new ISpecialArmor.ArmorProperties(0, data.getBaseAbsorptionRatio() * tmp, 1000);
|
||||
}catch(Exception e){System.err.println(e);
|
||||
return new ISpecialArmor.ArmorProperties(0, 0, 0);
|
||||
}
|
||||
|
||||
} else {
|
||||
return new ISpecialArmor.ArmorProperties(0, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue