From 8f668cfe033ef9f128ef0331fff38cc7402032b7 Mon Sep 17 00:00:00 2001 From: IMS212 Date: Thu, 27 Jun 2024 18:00:27 -0700 Subject: [PATCH] Accept 1 and 0 as possible values --- .../iris/shaderpack/properties/ShaderProperties.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/irisshaders/iris/shaderpack/properties/ShaderProperties.java b/src/main/java/net/irisshaders/iris/shaderpack/properties/ShaderProperties.java index 5fb49738ae..6c45b722e6 100644 --- a/src/main/java/net/irisshaders/iris/shaderpack/properties/ShaderProperties.java +++ b/src/main/java/net/irisshaders/iris/shaderpack/properties/ShaderProperties.java @@ -599,9 +599,9 @@ public ShaderProperties(String contents, ShaderPackOptions shaderPackOptions, It } private static void handleBooleanValue(String key, String value, BooleanConsumer handler) { - if ("true".equals(value)) { + if ("true".equals(value) || "1".equals(value)) { handler.accept(true); - } else if ("false".equals(value)) { + } else if ("false".equals(value) || "0".equals(value)) { handler.accept(false); } else { Iris.logger.warn("Unexpected value for boolean key " + key + " in shaders.properties: got " + value + ", but expected either true or false"); @@ -613,9 +613,9 @@ private static void handleBooleanDirective(String key, String value, String expe return; } - if ("true".equals(value)) { + if ("true".equals(value) || "1".equals(value)) { handler.accept(OptionalBoolean.TRUE); - } else if ("false".equals(value)) { + } else if ("false".equals(value) || "0".equals(value)) { handler.accept(OptionalBoolean.FALSE); } else { Iris.logger.warn("Unexpected value for boolean key " + key + " in shaders.properties: got " + value + ", but expected either true or false");