catch most modular armor crashes

This commit is contained in:
Blood-Asp 2017-03-31 22:24:36 +02:00
parent d41d3cd2b3
commit 7beabd163a

View file

@ -55,6 +55,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg
public int openGuiNr;
public ArmorData data;
public int jumpticks;
public int fail = 0;
// public int maxEU;
@ -193,6 +194,11 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg
@Override
public void onArmorTick(World aWorld, EntityPlayer aPlayer, ItemStack aStack) {
if(fail>0){
fail--;
return;
}
try{
if (data == null) {
data = fillArmorData(aPlayer, aStack);
}
@ -359,6 +365,9 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg
}
}
}
}catch(Exception e){System.err.print(e);
fail = 200;
}
}
public void setEntityMotionFromVector(Entity entity, Vector3 originalPosVector, float modifier) {