Skip to content

Conversation

@lightningik
Copy link
Contributor

No description provided.

Comment on lines +135 to +143
String line = StringUtils.cleanColour(tooltip.get(i));
if (line.startsWith("Stored:")) {

String[] sackTooltip = line.replace("Stored: ", "").split("/");
if (!(Integer.parseInt(sackTooltip[0]) == 0)){

shiftStackMultiplier = Integer.parseInt(sackTooltip[0]);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a regex for this to avoid potential number format exceptions. Also try to avoid parsing the int twice here. Please also be aware that numbers like 20,145 exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants