mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
added remaining NumberFormatExceptions in totem interactions to try/catch block
This commit is contained in:
parent
df2c7ee8a8
commit
8d6010fde3
@ -35,7 +35,12 @@ public class InteractionTotemHead extends InteractionDefault {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public TotemColor getTotemColor() {
|
public TotemColor getTotemColor() {
|
||||||
int extraData = Integer.parseInt(this.getExtradata());
|
int extraData;
|
||||||
|
try {
|
||||||
|
extraData = Integer.parseInt(this.getExtradata());
|
||||||
|
}catch(NumberFormatException ex) {
|
||||||
|
extraData = 0;
|
||||||
|
}
|
||||||
if(extraData < 3) {
|
if(extraData < 3) {
|
||||||
return TotemColor.NONE;
|
return TotemColor.NONE;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,12 @@ public class InteractionTotemLegs extends InteractionDefault {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public TotemColor getTotemColor() {
|
public TotemColor getTotemColor() {
|
||||||
int extraData = Integer.parseInt(this.getExtradata());
|
int extraData;
|
||||||
|
try {
|
||||||
|
extraData = Integer.parseInt(this.getExtradata());
|
||||||
|
} catch(NumberFormatException ex) {
|
||||||
|
extraData = 0;
|
||||||
|
}
|
||||||
return TotemColor.fromInt(extraData - (4 * (getTotemType().type - 1)));
|
return TotemColor.fromInt(extraData - (4 * (getTotemType().type - 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user