Hãy sửa lại phiên bản 1.21.11 fabric 0.19.3 tối ưu phù hợp theo 1.21.11 render và xoá bớt nhất thứ k cần thiết vẫn dùng đc shader k lỗi render
Kiểm tra cấu hình và source hiện tại để xác định phần thừa, lỗi tương thích 1.21.11/Loader 0.19.3 và các điểm render.
Cập nhật build/metadata/API theo Yarn 1.21.11, giữ cấu trúc client source set đúng.
Tối giản các hook render không cần thiết và sửa phần shader/render pipeline có nguy cơ xung đột.
Rà soát tài nguyên, dependency và hoàn tất bằng bản vá tối thiểu.
Đã xác định nguyên nhân chính: project thiếu gradle.properties, đang dùng plugin Loom không theo cấu hình chuẩn, keybind dùng category dạng chuỗi đã bị loại bỏ, và có nhiều mixin render cũ/không còn tác dụng dễ xung đột Sodium/Iris/shader. Tôi sẽ giữ một hook an toàn duy nhất cho giới hạn view distance, bỏ các hook can thiệp particle/entity/weather/block overlay, bỏ GC thủ công và UI tùy chọn không có implementation.
Đã tối ưu lại project cho Minecraft 1.21.11 + Fabric Loader 0.19.3:
Bổ sung
gradle.propertiesđầy đủ:Minecraft
1.21.11Yarn
1.21.11+build.5Fabric Loader
0.19.3Fabric API
0.141.4+1.21.11Loom
1.14Java
21
Đổi plugin sang
fabric-loomchuẩn.Sửa keybind theo API 1.21.11 mới với
KeyBinding.Category.create(Identifier).Xóa các mixin render cũ dễ gây lỗi với Sodium/Iris/shader:
Entity culling
Particle suppression
Weather suppression
Entity name rendering
Block-breaking overlay
Minecraft tick mixin
Xóa các thành phần dư thừa:
Crash recovery marker
Smart GC và
System.gc()Object pool
Compatibility manager
Preset tier và các tùy chọn chưa có implementation
Lunar mixin plugin
Giữ lại duy nhất tối ưu an toàn:
Giới hạn render distance xuống tối đa 8 chunk khi bật.
Không thay đổi framebuffer, shader pipeline, post-processing hoặc render state của shader.
Rút gọn giao diện cấu hình còn một tùy chọn duy nhất.
Sửa lại file ngôn ngữ JSON bị trùng hai object JSON.
Cập nhật metadata mod và dependency range phù hợp 1.21.11.
Phím Right Shift mở cài đặt. Shader vẫn sử dụng vanilla rendering path, giảm nguy cơ lỗi render với shader pack và Sodium/Iris.
fix crash modrinth
📄
pasted-code-1786847366551.txt
txt
231 lines
▶
[09:10:11] [main/INFO]: Loading Minecraft 1.21.11 with Fabric Loader 0.19.3
[09:10:11] [ForkJoinPool-1-worker-9/WARN]: Mod nochatrestrictions uses the version Fabric-MC1.21.11-v1.0.0 which isn't compatible with Loader's extended semantic version format (Could not parse version number component 'Fabric'!), SemVer is recommended for reliably evaluating dependencies and prioritizing newer version
[09:10:11] [main/INFO]: Loading 121 mods:
- appleskin 3.0.7+mc1.21.11
- architectury 19.0.1
- betterhiddenchat 1.2.0
- bettershields 1.9.1+mc1.21.11
- cloth-config 21.11.153
\-- cloth-basic-math 0.6.1
- combat-hitboxes 1.0.7
- cubes-without-borders 3.0.0-build.14+mc1.21.11
- cutthrough 21.11.0
- dynamic_fps 3.11.6
\-- net_lostluma_battery 2.0.0
- elytrapitch 1.4.5
- fabric-api 0.141.6+1.21.11
|-- fabric-api-base 1.0.5+4ebb5c083e
|-- fabric-api-lookup-api-v1 1.6.114+20dc27073e
|-- fabric-biome-api-v1 17.1.1+4fc5413f3e
|-- fabric-block-api-v1 1.1.10+4ebb5c083e
|-- fabric-block-view-api-v2 1.0.39+4ebb5c083e
|-- fabric-command-api-v2 2.4.7+6b42a6003e
|-- fabric-content-registries-v0 10.2.14+4fc5413f3e
|-- fabric-convention-tags-v1 2.1.55+7f945d5b3e
|-- fabric-convention-tags-v2 2.17.3+8ef948ba3e
|-- fabric-crash-report-info-v1 0.3.23+4ebb5c083e
|-- fabric-data-attachment-api-v1 1.8.48+eed0806f3e
|-- fabric-data-generation-api-v1 23.5.0+88d7da613e
|-- fabric-dimensions-v1 4.0.28+4fc5413f3e
|-- fabric-entity-events-v1 3.1.1+1d0ab4303e
|-- fabric-events-interaction-v0 4.1.1+3b89ecf63e
|-- fabric-game-rule-api-v1 2.0.3+4fc5413f3e
|-- fabric-item-api-v1 11.6.0+67f17bb43e
|-- fabric-item-group-api-v1 4.2.36+4fc5413f3e
|-- fabric-key-binding-api-v1 1.1.7+4fc5413f3e
|-- fabric-lifecycle-events-v1 2.6.15+4ebb5c083e
|-- fabric-loot-api-v2 3.0.73+3f89f5a53e
|-- fabric-loot-api-v3 2.0.20+78c8b4663e
|-- fabric-message-api-v1 6.1.12+4ebb5c083e
|-- fabric-model-loading-api-v1 6.0.15+4fc5413f3e
|-- fabric-networking-api-v1 5.1.6+6b6d71a53e
|-- fabric-object-builder-api-v1 21.1.40+4fc5413f3e
|-- fabric-particles-v1 4.2.12+4fc5413f3e
|-- fabric-recipe-api-v1 8.2.4+4ebb5c083e
|-- fabric-registry-sync-v0 6.2.6+1718722b3e
|-- fabric-renderer-api-v1 8.0.3+f4ffd2e53e
|-- fabric-renderer-indigo 5.0.3+f4ffd2e53e
|-- fabric-rendering-fluids-v1 3.1.43+4ebb5c083e
|-- fabric-rendering-v1 16.2.10+0290ad933e
|-- fabric-resource-conditions-api-v1 5.0.35+4fc5413f3e
|-- fabric-resource-loader-v0 3.3.4+4fc5413f3e
|-- fabric-resource-loader-v1 1.0.10+78c8b4663e
|-- fabric-screen-api-v1 3.1.7+4ebb5c083e
|-- fabric-screen-handler-api-v1 1.3.162+4fc5413f3e
|-- fabric-serialization-api-v1 1.0.5+4ebb5c083e
|-- fabric-sound-api-v1 1.0.51+4fc5413f3e
|-- fabric-tag-api-v1 1.3.0+88d7da613e
|-- fabric-transfer-api-v1 6.0.25+4fc5413f3e
\-- fabric-transitive-access-wideners-v1 7.1.0+014c8cec3e
- fabric-language-kotlin 1.13.13+kotlin.2.4.10
|-- org_jetbrains_kotlin_kotlin-reflect 2.4.10
|-- org_jetbrains_kotlin_kotlin-stdlib 2.4.10
|-- org_jetbrains_kotlin_kotlin-stdlib-jdk7 2.4.10
|-- org_jetbrains_kotlin_kotlin-stdlib-jdk8 2.4.10
|-- org_jetbrains_kotlinx_atomicfu-jvm 0.33.0
|-- org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.11.0
|-- org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.11.0
|-- org_jetbrains_kotlinx_kotlinx-datetime-jvm 0.8.0
|-- org_jetbrains_kotlinx_kotlinx-io-bytestring-jvm 0.9.1
|-- org_jetbrains_kotlinx_kotlinx-io-core-jvm 0.9.1
|-- org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.11.0
|-- org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.11.0
\-- org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.11.0
- fabricloader 0.19.3
\-- mixinextras 0.5.4
- forgeconfigapiport 21.11.1
|-- com_electronwill_night-config_core 3.8.3
\-- com_electronwill_night-config_toml 3.8.3
- freelook 1.2.8
- g1axspearoptimizer 1.0.0
- gammautils 2.5.10
- herobot 1.21.11-1.4.3+v260315
- inventoryhud 3.4.29
- iris 1.10.4+mc1.21.11
|-- io_github_douira_glsl-transformer 3.0.0-pre3
|-- org_anarres_jcpp 1.4.14
\-- org_antlr_antlr4-runtime 4.13.1
- java 21
- lotus 1.0.0
- midnightlib 1.9.3
- minecraft 1.21.11
- modmenu 17.0.0-beta.2
- moreculling 1.6.2
|-- conditional-mixin 0.6.3
\-- mixinsquared 0.2.0
- nochatrestrictions Fabric-MC1.21.11-v1.0.0
- notenoughanimations 1.11.1
|-- transition 1.0.11
\-- trender 1.0.10
- optimizerfpslite 1.0.0
- placeholder-api 2.8.1+1.21.10
- puzzle 2.3.0
- puzzleslib 21.11.3
- ravenclawspingequalizer 1.5+1.21
- reeses-sodium-options 2.0.2+mc1.21.11
- shieldfixes 2.0.1-1.21.11
- sodium 0.8.2+mc1.21.11
- sodium-extra 0.8.3+mc1.21.11
- tier-tagger 2.4.1+mc1.21.11
- tiltbreak 1.21.11-4.1
- ukulib 1.10.2+1.21.11
\-- com_moandjiezana_toml_toml4j 0.7.2
- walksylib 0.9.98+1.21.11
- yet_another_config_lib_v3 3.8.2+1.21.11-fabric
|-- com_twelvemonkeys_common_common-image 3.12.0
|-- com_twelvemonkeys_common_common-io 3.12.0
|-- com_twelvemonkeys_common_common-lang 3.12.0
|-- com_twelvemonkeys_imageio_imageio-core 3.12.0
|-- com_twelvemonkeys_imageio_imageio-metadata 3.12.0
|-- com_twelvemonkeys_imageio_imageio-webp 3.12.0
|-- org_quiltmc_parsers_gson 0.2.1
\-- org_quiltmc_parsers_json 0.2.1
- zoomify 2.15.2+1.21.11
\-- com_akuleshov7_ktoml-core-jvm 0.7.1
[09:10:11] [main/WARN]: Found 1 non-fabric mod:
- CryanchorOptimizer.jar
[09:10:11] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.7 Source=file:/C:/Users/Admin/AppData/Roaming/ModrinthApp/meta/libraries/net/fabricmc/sponge-mixin/0.17.3+mixin.0.8.7/sponge-mixin-0.17.3+mixin.0.8.7.jar Service=Knot/Fabric Env=CLIENT
[09:10:11] [main/INFO]: Compatibility level set to JAVA_21
[09:10:12] [main/WARN]: Reference map 'g1axspearoptimizer.refmap.json' for g1axspearoptimizer.mixins.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'iris.refmap.json' for mixins.iris.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'iris-fabric.refmap.json' for mixins.iris.fabric.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'iris.refmap.json' for mixins.iris.fantastic.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'iris.refmap.json' for mixins.iris.vertexformat.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'iris.refmap.json' for mixins.iris.bettermipmaps.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'iris.refmap.json' for mixins.iris.compat.sodium.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'iris.refmap.json' for mixins.iris.fixes.maxfpscrash.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'moreculling.refmap.json' for moreculling.mixins.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'moreculling.refmap.json' for moreculling.fabric.mixins.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'reeses-sodium-options.refmap.json' for reeses-sodium-options.mixins.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/INFO]: Loaded configuration file for Sodium: 43 options available, 1 override(s) found
[09:10:12] [main/INFO]: Loaded configuration file for Sodium Extra: 26 options available, 0 override(s) found
[09:10:12] [main/WARN]: Reference map 'sodium-extra.refmap.json' for sodium-extra.mixins.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'yet_another_config_lib_v3.refmap.json' for yacl.mixins.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Reference map 'yet_another_config_lib_v3.refmap.json' for yacl-fabric.mixins.json could not be read. If this is a development environment you can ignore this message
[09:10:12] [main/WARN]: Force-disabling mixin 'features.render.world.sky.LevelRendererMixin' as rule 'mixin.features.render.world.sky' (added by mods [iris]) disables it and children
[09:10:12] [main/INFO]: Searching for graphics cards...
[09:10:12] [main/INFO]: Found graphics adapter: AdapterInfo{vendor=NVIDIA, description='NVIDIA GeForce RTX 5060', adapterType=0x0000031B, openglIcdFilePath='C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_c8bc842500fab35b\nvoglv64.dll', openglIcdVersion=32.0.16.1047}
[09:10:12] [main/WARN]: Sodium has applied one or more workarounds to prevent crashes or other issues on your system: [NVIDIA_THREADED_OPTIMIZATIONS_BROKEN]
[09:10:12] [main/WARN]: This is not necessarily an issue, but it may result in certain features or optimizations being disabled. You can sometimes fix these issues by upgrading your graphics driver.
[09:10:12] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.5.4).
[09:10:13] [Datafixer Bootstrap/INFO]: 287 Datafixer optimizations took 240 milliseconds
[09:10:13] [main/INFO]: trender.mixins.json:client.ScreenAccessor from mod trender->@Invoker[METHOD_PROXY]::libgui$defaultHandleGameClickEvent(Lnet/minecraft/class_2558;Lnet/minecraft/class_310;Lnet/minecraft/class_437;)V should be static as its target is
[09:10:16] [Render thread/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, profilesHost=https://api.mojang.com, name=PROD]
[09:10:16] [Render thread/INFO]: Successfully supplanted UserApiService with a wrapped version.
[09:10:16] [Render thread/INFO]: Setting user: duongsecretVN
[09:10:17] [Render thread/INFO]: CombatHitboxes | Sootysplash was here!
[09:10:17] [Render thread/INFO]: Constructing components for cutthrough:common
[09:10:17] [Render thread/INFO]: Dispatching loading event for config cutthrough-client.toml
[09:10:17] [Render thread/INFO]: NoChatRestrictions Fabric mod initialized!
[09:10:17] [Render thread/INFO]: OptimizerFpsLite 1.2.2 loaded; client features initialize on the client entrypoint
[09:10:17] [Render thread/INFO]: Constructing components for puzzleslib:common
[09:10:17] [Render thread/INFO]: Found 8 tierlists: [sword, axe, pot, vanilla, smp, uhc, mace, nethop]
[09:10:17] [Render thread/INFO]: Registering S2C receiver with id architectury:spawn_entity_packet
[09:10:17] [Render thread/INFO]: Constructing components for cutthrough:client
[09:10:17] [Render thread/INFO]: [Indigo] Different rendering plugin detected; not applying Indigo.
[09:10:17] [Render thread/INFO]: [STDOUT]: Inventory HUD + has been initialized!
[09:10:17] [ForkJoinPool.commonPool-worker-1/INFO]: Found latest version 2.4.1+mc1.21.11
[09:10:18] [Render thread/INFO]: Checking mod updates...
[09:10:18] [Render thread/INFO]: Constructing components for puzzleslib:client
[09:10:18] [Render thread/INFO]: [STDOUT]: [LibGui] Initializing Client...
[09:10:18] [Render thread/INFO]: Deserializing YACLConfig from 'C:\Users\Admin\AppData\Roaming\ModrinthApp\profiles\fabric 1.21.11 (1)\config\yacl.json5'
[09:10:18] [Render thread/WARN]: Failed to get system info for Render Extensions
java.lang.IllegalStateException: Can't getDevice() before it was initialized
at knot//com.mojang.blaze3d.systems.RenderSystem.getDevice(RenderSystem.java:299)
at knot//net.minecraft.class_310.method_68671(class_310.java:2527)
at knot//net.minecraft.class_6396.method_37123(class_6396.java:78)
at knot//net.minecraft.class_310.method_37274(class_310.java:2527)
at knot//net.minecraft.class_310.method_22681(class_310.java:2497)
at knot//net.minecraft.client.main.Main.main(Main.java:243)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:514)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.modrinth.theseus.MinecraftLaunch.relaunch(MinecraftLaunch.java:63)
at com.modrinth.theseus.MinecraftLaunch.main(MinecraftLaunch.java:28)
---- Minecraft Crash Report ----
// Daisy, daisy...
Time: 2026-08-16 09:10:18
Description: Initializing game
java.lang.RuntimeException: Could not execute entrypoint stage 'client' due to errors, provided by 'optimizerfpslite' at 'com.optimizerfpslite.OptimizerFpsLiteClient'!
at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$0(FabricLoaderImpl.java:413)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:411)
at net.fabricmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:53)
at knot//net.minecraft.class_310.
(class_310.java:475)
at knot//net.minecraft.client.main.Main.main(Main.java:234)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:514)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.modrinth.theseus.MinecraftLaunch.relaunch(MinecraftLaunch.java:63)
at com.modrinth.theseus.MinecraftLaunch.main(MinecraftLaunch.java:28)
Caused by: java.lang.NoSuchMethodError: 'void net.minecraft.class_304.
(java.lang.String, net.minecraft.class_3675$class_307, int, java.lang.String)'
at knot//com.optimizerfpslite.OptimizerFpsLiteClient.onInitializeClient(OptimizerFpsLiteClient.java:17)
at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:409)
... 10 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Render thread
Stacktrace:
at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$0(FabricLoaderImpl.java:413)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:411)
at net.fabricmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:53)
at knot//net.minecraft.class_310.
GFLW Platform:
Render Extensions: ERR
GL debug messages:
Is Modded: Definitely; Client brand changed to 'fabric'
Universe: 404
Type: Client (map_client.txt)
Locale: en_US
System encoding: Cp1252
File encoding: UTF-8
CPU: 20x Intel(R) Core(TM) i5-14600KF
#@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Admin\AppData\Roaming\ModrinthApp\profiles\fabric 1.21.11 (1)\crash-reports\crash-2026-08-16_09.10.18-client.txt
Nguyên nhân crash không nằm ở shader/Iris: Modrinth đang chạy OptimizerFpsLite 1.0.0 (log), trong khi lỗi là constructor keybind cũ dùng category String. Source hiện tại đã có constructor đúng 1.21.11 (String, int, KeyBinding.Category), nên tôi sẽ chốt bản sửa bằng cách tăng version artifact và đồng bộ log để không upload nhầm JAR cũ.
Đã sửa và chốt bản phát hành OptimizerFpsLite 1.3.2.
Nguyên nhân crash thực tế:
Log đang chạy
optimizerfpslite 1.0.0và hiển thị mod khởi tạo1.2.2.JAR đó vẫn dùng constructor keybind cũ với category kiểu
String.Source hiện tại đã dùng API đúng cho 1.21.11:
new KeyBinding(
"key.optimizerfpslite.open_settings",
GLFW.GLFW_KEY_RIGHT_SHIFT,
CATEGORY
)
Đã cập nhật:
gradle.properties: version1.3.2Logger mod:
OptimizerFpsLite 1.3.2 loadedGiữ constructor
KeyBindingtương thích 1.21.11Không thay đổi shader, Iris, Sodium hoặc render pipeline
Build lại bằng Windows:
gradlew.bat clean build
Sau đó xóa JAR cũ trong thư mục mods của profile Modrinth và chỉ cài:
build/libs/optimizerfpslite-1.3.2.jar
Khi chạy đúng bản mới, log phải hiển thị:
OptimizerFpsLite 1.3.2 loaded
Các cảnh báo Iris refmap, Sodium NVIDIA workaround và Render Extensions không phải nguyên nhân crash này.
package com.optimizerfpslite;
import com.optimizerfpslite.client.OptimizerRuntime;
import com.optimizerfpslite.client.screen.OptimizerScreen;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.util.Identifier;
import org.lwjgl.glfw.GLFW;
public final class OptimizerFpsLiteClient implements ClientModInitializer {
private static final KeyBinding.Category CATEGORY = KeyBinding.Category.create(
Identifier.of(OptimizerFpsLite.MOD_ID, "main"));
private static KeyBinding openSettingsKey;
@Override
public void onInitializeClient() {
OptimizerRuntime.initialize();
openSettingsKey = KeyBindingHelper.registerKeyBinding(new KeyBinding(
"key.optimizerfpslite.open_settings",
GLFW.GLFW_KEY_RIGHT_SHIFT,
CATEGORY));
OptimizerRuntime.registerClientTick(client -> {
while (openSettingsKey.wasPressed()) {
client.setScreen(new OptimizerScreen());
}
});
}
}