Closed APeng215 closed 1 year ago
Describe the bug If my mod(depending on LibGui) and Optifine are loaded at the same time, the game will crash when trying loading world.
To Reproduce Steps to reproduce the behavior:
Crash report
---- Minecraft Crash Report ---- // You should try our sister game, Minceraft! Time: 2023-07-21 18:39:50 Description: Unexpected error java.lang.NullPointerException: Cannot invoke "net.minecraft.class_5944.setSampler(int, Object)" because "shaderinstance" is null at net.minecraft.class_761.method_3251(class_761.java:2365) at net.minecraft.class_761.method_22710(class_761.java:1716) at net.minecraft.class_757.method_3188(class_757.java:1651) at net.minecraft.class_757.method_3192(class_757.java:1279) at net.minecraft.class_310.method_1523(class_310.java:1219) at net.minecraft.class_310.method_1514(class_310.java:802) at net.minecraft.client.main.Main.main(Main.java:250) at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468) at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at oolloo.jlw.Wrapper.invokeMain(Wrapper.java:60) at oolloo.jlw.Wrapper.main(Wrapper.java:53) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at net.minecraft.class_761.method_3251(class_761.java:2365) at net.minecraft.class_761.method_22710(class_761.java:1716) at net.minecraft.class_757.method_3188(class_757.java:1651) -- Affected level -- Details: All players: 1 total; [class_746['A_Peng215'/138, l='ClientLevel', x=6.50, y=125.00, z=-6.50]] Chunk stats: 529, 313 Level dimension: minecraft:overworld Level spawn location: World: (0,127,0), Section: (at 0,15,0 in 0,7,0; chunk contains blocks 0,-64,0 to 15,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511) Level time: 28 game time, 28 day time Server brand: fabric Server type: Integrated singleplayer server Stacktrace: at net.minecraft.class_638.method_8538(class_638.java:589) at net.minecraft.class_310.method_1587(class_310.java:2406) at net.minecraft.class_310.method_1514(class_310.java:826) at net.minecraft.client.main.Main.main(Main.java:250) at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468) at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at oolloo.jlw.Wrapper.invokeMain(Wrapper.java:60) at oolloo.jlw.Wrapper.main(Wrapper.java:53) -- Last reload -- Details: Reload number: 1 Reload reason: initial Finished: No Packs: vanilla, fabric Recovery: Yes Recovery reason: java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "String.indexOf(int)" because "resourceName" is null at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:722) at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) at net.minecraft.class_4014.method_18365(class_4014.java:69) at net.minecraft.class_1255.method_18859(class_1255.java:198) at net.minecraft.class_4093.method_18859(class_4093.java:23) at net.minecraft.class_1255.method_16075(class_1255.java:163) at net.minecraft.class_1255.method_5383(class_1255.java:140) at net.minecraft.class_310.method_1523(class_310.java:1175) at net.minecraft.class_310.method_1514(class_310.java:802) at net.minecraft.client.main.Main.main(Main.java:250) at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468) at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at oolloo.jlw.Wrapper.invokeMain(Wrapper.java:60) at oolloo.jlw.Wrapper.main(Wrapper.java:53) Caused by: java.lang.NullPointerException: Cannot invoke "String.indexOf(int)" because "resourceName" is null at net.minecraft.class_2960.method_12830(class_2960.java:88) at net.minecraft.class_2960.<init>(class_2960.java:51) at net.fabricmc.fabric.impl.client.rendering.FabricShaderProgram.rewriteAsId(FabricShaderProgram.java:42) at net.minecraft.class_5944.modify$zho000$fabric-rendering-v1$modifyProgramId(class_5944.java:654) at net.minecraft.class_5944.localvar$zkk000$optifabric$modifyProgramID(class_5944.java:1634) at net.minecraft.class_5944.<init>(class_5944.java:114) at net.minecraft.class_5944.<init>(class_5944.java:108) at net.fabricmc.fabric.impl.client.rendering.FabricShaderProgram.<init>(FabricShaderProgram.java:28) at net.minecraft.class_757.md2fe778$fabric-rendering-v1$lambda$registerShaders$0$0(class_757.java:1639) at io.github.cottonmc.cotton.gui.impl.client.LibGuiShaders.lambda$register$1(LibGuiShaders.java:18) at net.fabricmc.fabric.api.client.rendering.v1.CoreShaderRegistrationCallback.lambda$static$0(CoreShaderRegistrationCallback.java:44) at net.minecraft.class_757.handler$zhm000$fabric-rendering-v1$registerShaders(class_757.java:1642) at net.minecraft.class_757.method_34538(class_757.java:543) at net.minecraft.class_757$1.method_45777(class_757.java:465) at net.minecraft.class_757$1.method_18788(class_757.java:437) at net.minecraft.class_4080.method_18790(class_4080.java:13) at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ... 18 more -- System Details -- Details: Minecraft Version: 1.20 Minecraft Version ID: 1.20 Operating System: Windows 10 (amd64) version 10.0 Java Version: 17.0.5, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation Memory: 442862992 bytes (422 MiB) / 1436549120 bytes (1370 MiB) up to 3651141632 bytes (3482 MiB) CPUs: 16 Processor Vendor: AuthenticAMD Processor Name: AMD Ryzen 7 5800H with Radeon Graphics Identifier: AuthenticAMD Family 25 Model 80 Stepping 0 Microarchitecture: Zen 3 Frequency (GHz): 3.19 Number of physical packages: 1 Number of physical CPUs: 8 Number of logical CPUs: 16 Graphics card #0 name: NVIDIA GeForce RTX 3070 Laptop GPU Graphics card #0 vendor: NVIDIA (0x10de) Graphics card #0 VRAM (MB): 4095.00 Graphics card #0 deviceId: 0x24dd Graphics card #0 versionInfo: DriverVersion=31.0.15.3623 Memory slot #0 capacity (MB): 8192.00 Memory slot #0 clockSpeed (GHz): 3.20 Memory slot #0 type: DDR4 Memory slot #1 capacity (MB): 8192.00 Memory slot #1 clockSpeed (GHz): 3.20 Memory slot #1 type: DDR4 Virtual memory max (MB): 34684.31 Virtual memory used (MB): 19539.61 Swap memory total (MB): 18432.00 Swap memory used (MB): 251.90 JVM Flags: 6 total; -XX:+UseG1GC -XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmn256m -Xmx3481m Fabric Mods: fabric-api: Fabric API 0.83.0+1.20 fabric-api-base: Fabric API Base 0.4.29+b04edc7a27 fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.34+4d8536c927 fabric-biome-api-v1: Fabric Biome API (v1) 13.0.10+b3afc78b27 fabric-block-api-v1: Fabric Block API (v1) 1.0.9+e022e5d127 fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.39+b3afc78b27 fabric-client-tags-api-v1: Fabric Client Tags 1.0.20+b3afc78b27 fabric-command-api-v1: Fabric Command API (v1) 1.2.32+f71b366f27 fabric-command-api-v2: Fabric Command API (v2) 2.2.11+b3afc78b27 fabric-commands-v0: Fabric Commands (v0) 0.2.49+df3654b327 fabric-containers-v0: Fabric Containers (v0) 0.1.61+df3654b327 fabric-content-registries-v0: Fabric Content Registries (v0) 4.0.7+b3afc78b27 fabric-convention-tags-v1: Fabric Convention Tags 1.5.3+b3afc78b27 fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.18+aeb40ebe27 fabric-data-generation-api-v1: Fabric Data Generation API (v1) 12.1.10+b3afc78b27 fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.51+b3afc78b27 fabric-entity-events-v1: Fabric Entity Events (v1) 1.5.21+b3afc78b27 fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.6.0+b3afc78b27 fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.61+df3654b327 fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.38+b04edc7a27 fabric-item-api-v1: Fabric Item API (v1) 2.1.26+b3afc78b27 fabric-item-group-api-v1: Fabric Item Group API (v1) 4.0.7+b3afc78b27 fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.36+fb8d95da27 fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.34+df3654b327 fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.2.20+b3afc78b27 fabric-loot-api-v2: Fabric Loot API (v2) 1.1.37+b3afc78b27 fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.1.41+9e7660c627 fabric-message-api-v1: Fabric Message API (v1) 5.1.6+b3afc78b27 fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.1.47+b3afc78b27 fabric-models-v0: Fabric Models (v0) 0.3.35+b3afc78b27 fabric-networking-api-v1: Fabric Networking API (v1) 1.3.8+b3afc78b27 fabric-networking-v0: Fabric Networking (v0) 0.3.48+df3654b327 fabric-object-builder-api-v1: Fabric Object Builder API (v1) 11.0.6+b3afc78b27 fabric-particles-v1: Fabric Particles (v1) 1.0.28+b3afc78b27 fabric-recipe-api-v1: Fabric Recipe API (v1) 1.0.18+b3afc78b27 fabric-registry-sync-v0: Fabric Registry Sync (v0) 2.2.6+b3afc78b27 fabric-renderer-api-v1: Fabric Renderer API (v1) 3.0.1+b3afc78b27 fabric-renderer-indigo: Fabric Renderer - Indigo 1.3.1+b3afc78b27 fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.44+df3654b327 fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.33+b3afc78b27 fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.0.26+b3afc78b27 fabric-rendering-v0: Fabric Rendering (v0) 1.1.47+df3654b327 fabric-rendering-v1: Fabric Rendering (v1) 3.0.6+b3afc78b27 fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.3.4+b3afc78b27 fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.11.7+f7923f6d27 fabric-screen-api-v1: Fabric Screen API (v1) 2.0.6+b3afc78b27 fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.3.27+b3afc78b27 fabric-sound-api-v1: Fabric Sound API (v1) 1.0.12+b3afc78b27 fabric-transfer-api-v1: Fabric Transfer API (v1) 3.2.2+b3afc78b27 fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 4.2.0+b3afc78b27 fabricloader: Fabric Loader 0.14.21 filtpick: FiltPick 1.2.2 libgui: LibGui 8.0.1+1.20 jankson: Jankson 5.0.1+j1.2.2 blue_endless_jankson: jankson 1.2.2 libninepatch: LibNinePatch 1.2.0 java: Java HotSpot(TM) 64-Bit Server VM 17 minecraft: Minecraft 1.20 optifabric: OptiFabric 1.13.25 mm: Manningham Mills 2.3 Launched Version: 1.20-Fabric 0.14.21-OptiFine_I5_pre5 Backend library: LWJGL version 3.3.1 SNAPSHOT Backend API: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2 GL version 3.2.0 NVIDIA 536.23, NVIDIA Corporation Window size: 2560x1506 GL Caps: Using framebuffer using OpenGL 3.2 GL debug messages: Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fabric'; Server brand changed to 'fabric' Type: Integrated Server (map_client.txt) Graphics mode: fancy Resource Packs: Current Language: zh_cn CPU: 16x AMD Ryzen 7 5800H with Radeon Graphics Server Running: true Player Count: 1 / 8; [class_3222['A_Peng215'/138, l='ServerLevel[新的世界]', x=6.50, y=125.00, z=-6.50]] Data Packs: vanilla, fabric Enabled Feature Flags: minecraft:vanilla World Generation: Stable OptiFine Version: OptiFine_1.20_HD_U_I5_pre5 OptiFine Build: 20230622-171153 Render Distance Chunks: 8 Mipmaps: 4 Anisotropic Filtering: 1 Antialiasing: 0 Multitexture: false Shaders: null OpenGlVersion: 3.2.0 NVIDIA 536.23 OpenGlRenderer: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2 OpenGlVendor: NVIDIA Corporation CpuCount: 16 -- OptiFabric -- Details: OptiFine jar designed for: 1.20 OptiFine jar version: OptiFine_1.20_HD_U_I5_pre5 OptiFine jar status: Valid OptiFine installer OptiFine remapped jar: D:/1.16.1简单整合MCBBS/.minecraft/versions/1.20-Fabric 0.14.21-OptiFine_I5_pre5/.optifine/OptiFine_1.20_HD_U_I5_pre5/Optifine-mapped.jar OptiFabric error: <None>
Version information:
Additional information:
Without Optifine, the game can run normally.
LibGui provides no official support for OptiFine or OptiFabric. See this list for alternatives.
Describe the bug If my mod(depending on LibGui) and Optifine are loaded at the same time, the game will crash when trying loading world.
To Reproduce Steps to reproduce the behavior:
Crash report
Version information:
Additional information:
Without Optifine, the game can run normally.