diff --git a/src/main/java/net/irisshaders/iris/shaderpack/parsing/ParsedString.java b/src/main/java/net/irisshaders/iris/shaderpack/parsing/ParsedString.java index dfad869035..7014d57de6 100644 --- a/src/main/java/net/irisshaders/iris/shaderpack/parsing/ParsedString.java +++ b/src/main/java/net/irisshaders/iris/shaderpack/parsing/ParsedString.java @@ -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) {