Custom texture mcmeta files might only include blur, clamp, or neither, but the parser does not handle this.
coderbot16 opened this issue ยท 1 comments
Spectrum contains the following mcmeta file:
{
"texture": {
"blur": true
}
}
Which produces the following crash:
[08:33:51] [Render thread/ERROR]: Failed to load the shaderpack "spectrum-master.zip"!
[08:33:51] [Render thread/ERROR]: Catching
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonElement.getAsBoolean()" because the return value of "com.google.gson.JsonObject.get(String)" is null
at net.coderbot.iris.shaderpack.ShaderPack.readTexture(ShaderPack.java:222) ~[iris-mc1.17-1.1.3-rc2+rev.707c387.jar:?]
at net.coderbot.iris.shaderpack.ShaderPack.lambda$new$2(ShaderPack.java:150) ~[iris-mc1.17-1.1.3-rc2+rev.707c387.jar:?]
at java.util.Map.forEach(Map.java:663) ~[?:?]
at net.coderbot.iris.shaderpack.ShaderPack.lambda$new$3(ShaderPack.java:148) ~[iris-mc1.17-1.1.3-rc2+rev.707c387.jar:?]
at java.util.Map.forEach(Map.java:663) ~[?:?]
at net.coderbot.iris.shaderpack.ShaderPack.<init>(ShaderPack.java:146) ~[iris-mc1.17-1.1.3-rc2+rev.707c387.jar:?]
at net.coderbot.iris.Iris.loadExternalShaderpack(Iris.java:246) ~[iris-mc1.17-1.1.3-rc2+rev.707c387.jar:?]
at net.coderbot.iris.Iris.loadShaderpack(Iris.java:172) ~[iris-mc1.17-1.1.3-rc2+rev.707c387.jar:?]
at net.coderbot.iris.Iris.reload(Iris.java:355) ~[iris-mc1.17-1.1.3-rc2+rev.707c387.jar:?]
at net.coderbot.iris.gui.screen.ShaderPackScreen.applyChanges(ShaderPackScreen.java:251) ~[iris-mc1.17-1.1.3-rc2+rev.707c387.jar:?]
at net.coderbot.iris.gui.screen.ShaderPackScreen.method_25419(ShaderPackScreen.java:220) ~[iris-mc1.17-1.1.3-rc2+rev.707c387.jar:?]
at net.minecraft.class_437.method_25404(class_437.java:114) ~[intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.class_309.method_1454(class_309.java:374) ~[intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.class_437.method_25412(class_437.java:490) ~[intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.class_309.method_1466(class_309.java:370) ~[intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.class_309.method_22678(class_309.java:462) ~[intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.class_1255.execute(class_1255.java:101) ~[intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.class_309.method_22676(class_309.java:462) ~[intermediary-minecraft-1.17.1-client.jar:?]
at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:37) [lwjgl-glfw-3.2.2.jar:build 10]
at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10]
at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101) [lwjgl-glfw-3.2.2.jar:build 10]
at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:165) [intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.class_1041.method_15998(class_1041.java:310) [intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.class_310.method_1523(class_310.java:1137) [intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.class_310.method_1514(class_310.java:728) [intermediary-minecraft-1.17.1-client.jar:?]
at net.minecraft.client.main.Main.main(Main.java:217) [intermediary-minecraft-1.17.1-client.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234) [fabric-loader-0.11.6.jar:?]
at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153) [fabric-loader-0.11.6.jar:?]
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) [fabric-loader-0.11.6.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) [NewLaunch.jar:?]
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) [NewLaunch.jar:?]
at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
It would be appropriate to add a test cases for this area of the code when fixing this issue, so we can ensure that similar issues do not return.