mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 09:50:51 +01:00
Merge branch 'patch-totem-extradata' into 'dev'
added remaining NumberFormatExceptions in totem interactions to try/catch block See merge request morningstar/Arcturus-Community!73
This commit is contained in:
commit
395cba2a5f
@ -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