Skip to content

Commit

Permalink
Merge branch 'refs/heads/1.20.3' into 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Jun 13, 2024
2 parents 1cacd49 + ef1131c commit c54b6dd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,18 @@ public String takeNumber() {
if (!Character.isDigit(text.charAt(position)) && !Character.isDigit(text.charAt(position + 1))) {
break;
}
} else if (!Character.isDigit(text.charAt(position))) {
break;
}

position++;
}

// take any f float suffixes, if we have a number
if (position > 0 && position + 1 < text.length() && (text.charAt(position) == 'f' || text.charAt(position) == 'F')) {
position++;
}

try {
Float.parseFloat(text.substring(0, position));
} catch (Exception e) {
Expand Down

0 comments on commit c54b6dd

Please sign in to comment.