Fix rubber plates in modular armor boots

This commit is contained in:
Blood-Asp 2017-03-08 17:52:28 +01:00
parent 9c7e95b245
commit 48d7a1ee5d
2 changed files with 11 additions and 2 deletions

View file

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

View file

@ -78,7 +78,7 @@ public class ArmorPlating extends ArmorComponent{
@Override
public void calculateArmor(ArmorData aArmorData) {
calDef(StatType.FALLDEFENCE, aArmorData);
calDefAdd(StatType.FALLDEFENCE, aArmorData);
calDef(StatType.PHYSICALDEFENCE, aArmorData);
calDef(StatType.PROJECTILEDEFENCE, aArmorData);
calDef(StatType.FIREDEFENCE, aArmorData);
@ -99,5 +99,14 @@ public class ArmorPlating extends ArmorComponent{
float tComponentDef = mStat.get(aType);
aArmorData.mStat.put(aType, tArmorDef + ((1.0f -tArmorDef) * tComponentDef));
}
public void calDefAdd(StatType aType, ArmorData aArmorData){
float tArmorDef = 0.0f;
if(aArmorData.mStat.containsKey(aType)){
tArmorDef = aArmorData.mStat.get(aType);
aArmorData.mStat.remove(aType);}
float tComponentDef = mStat.get(aType);
aArmorData.mStat.put(aType, tArmorDef + tComponentDef);
}
}