catch most modular armor crashes
This commit is contained in:
parent
d41d3cd2b3
commit
7beabd163a
1 changed files with 9 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue