DerEisenkoenig

Ich möchte eine Minecraft Java 26.1.1 Fabric Mod: Einen Timer der vorhärts oder rückwärts zählt. Er wird über der Hotbar angezeigt und kann über ein Command eingestellt werden. Fabe und farbverlauf auch und so.

Kodari AI
KodariOct 23 at 2:35 pm 2
HotbarTimer
A Minecraft Fabric mod that displays a customizable countdown or count-up timer above the hotbar. Players can start, stop, pause, and reset the timer via commands. The timer supports both forward and backward counting modes, with configurable duration, color, and gradient effects for the displayed text. The timer persists across sessions and provides clear visual feedback through animated color transitions.
  1. Erstelle ein Fabric-Client-Mod mit lokalem Timer und HUD-Anzeige über der Hotbar.

  2. Ergänze Befehle zum Starten, Stoppen und Konfigurieren von Richtung, Farbe und Farbverlauf.

  3. Lege Mod-Metadaten, Gradle-Dateien und deutsche/englische Namen an.

Erstellt als clientseitiger Fabric-Mod für Minecraft 26.3. Die angegebene Version 26.1.1 passt nicht zur hier verfügbaren Fabric-API; deshalb ist das Projekt auf 26.3 eingerichtet.

  • /timer up [farbe] [verlauf] zählt ab null hoch.

  • /timer down <sekunden> [farbe] [verlauf] zählt herunter und bleibt bei null sichtbar.

  • /timer color <farbe> [verlauf] ändert die Farben des laufenden Timers; /timer stop blendet ihn aus.

  • Farben akzeptieren Namen wie white, red und blue oder Hexwerte wie #33AAFF. Der optionale zweite Farbwert erzeugt einen Verlauf.

  • Der Timer erscheint über der Hotbar und läuft lokal auf dem Client.

DerEisenkoenig

?

Kodari AI
KodariOct 23 at 2:41 pm 1

Der Screenshot zeigt zwei Versionskonflikte: Der Mod wurde für Minecraft 26.3 und Fabric Loader 0.19.5+ gebaut; bei dir sind Minecraft 26.1.1 und Loader 0.19.3 installiert.

Du hast ursprünglich 26.1.1 angegeben — ich hätte den Mod nicht als passend dafür darstellen sollen. Mit deiner aktuellen Installation läuft diese Version des Mods nicht. Sie benötigt Minecraft 26.3 und mindestens Fabric Loader 0.19.5.

DerEisenkoenig

kannst du die Version bei der Mod beheben?

Kodari AI
KodariOct 23 at 2:44 pm 1

Ich stelle die Build- und Mod-Anforderungen auf Minecraft 26.1.1 und Fabric Loader 0.19.3 um und wähle dazu eine Fabric-API-Version aus der 26.1-Reihe. Die Timer-Funktion selbst lasse ich unverändert.

Die Projektversion ist jetzt auf Minecraft 26.1.1, Fabric Loader 0.19.3 und die Fabric API für 26.1 eingestellt. Die alte JAR bleibt unverändert — erstelle eine neue und ersetze damit die installierte Mod:

  1. Klicke oben auf Compile (am Handy: ⋮ → Compile Project).

  2. Klicke im Fenster auf Compile.

  3. Lade die neue JAR herunter und ersetze die alte im Mods-Ordner.

DerEisenkoenig

Der Timer sitzt falsch.

Kodari AI
KodariOct 23 at 2:52 pm 1
  • Ich gleiche die HUD-Y-Position mit der tatsächlichen Hotbar-Position ab.

  • Ich verschiebe den Timer so, dass er mittig direkt über der Hotbar statt auf Herzen/Hunger liegt.

Der Timer war 10 GUI-Pixel zu hoch. Ich habe ihn nach unten verschoben; jetzt sitzt er direkt über der Hotbar statt auf den Herzen. Erstelle eine neue JAR und ersetze damit die alte Mod-Datei.

DerEisenkoenig

Mach auch, dass der letzte Wert gespeichert wird und man kann auch timer pause und resume machen.

Kodari AI
KodariOct 23 at 3:03 pm 1
  1. Timer-Wert dauerhaft speichern und beim nächsten Spielstart wiederherstellen.

  2. /timer pause und /timer resume ergänzen.

Die Speicherung ist ergänzt. Jetzt ergänze ich Pause und Fortsetzen; der pausierte Zustand und der angezeigte Sekundenwert werden ebenfalls gespeichert.

Erledigt: /timer pause hält den Timer an, /timer resume setzt ihn fort. Der letzte Sekundenwert und der Pausenzustand werden in config/timerhud.properties gespeichert. War der Timer beim Schließen aktiv, läuft er beim nächsten Start vom zuletzt gespeicherten Wert weiter; offline verstrichene Zeit wird nicht mitgezählt.

Erstelle eine neue JAR über Compile und ersetze damit die bisherige Mod-Datei.

DerEisenkoenig

Du hast die Position in die falsche richtung gesetzt. Sie soll über der Hotbar, den Herzen und der Armoranzeige sein.

Kodari AI
KodariOct 23 at 3:33 pm 1

Ich habe den Timer nach oben verschoben. Er sitzt jetzt oberhalb der Hotbar sowie der Herzen- und Rüstungsanzeige. Erstelle eine neue JAR und ersetze die installierte Mod-Datei.

DerEisenkoenig

Also mach, dass mann den über show und hide oder so ausblenden kann, füge auch hinzu, dass mann über config ein Menü öffnen kann, wo man alles nochmal sehr schön anpassen kann also (Man kann das Menü über einen Command oder einer Taste öffnen) und mach, dass es nicht nur den Stehenden farbverlauf gibt sondern auch animierten und füge viel Mehr Farben hinzu auch Dunkel und Hell varianten.

Kodari AI
KodariOct 25 at 10:23 am 2
  1. Timer anzeigen/verstecken und den Zustand samt Farboptionen speichern.

  2. Farbpalette um helle/dunkle Farben erweitern und animierte Verläufe ergänzen.

  3. Anpassungsmenü mit owo-ui einbauen, erreichbar per Command und Taste.

Ergänzt:

  • /timer show, /timer hide und /timer toggle blenden die Anzeige ein oder aus.

  • /timer config öffnet das Einstellungsmenü; die Taste O öffnet es ebenfalls und lässt sich in den Steuerungseinstellungen ändern.

  • Im Menü kannst du die Anzeige, den Textschatten, die vertikale Position, beide Verlaufsfarben und die Animationsgeschwindigkeit anpassen.

  • /timer gradient off|static|animated schaltet zwischen einfarbig, statischem und animiertem Verlauf um.

  • Die Farbnamen unterstützen jetzt viele zusätzliche helle und dunkle Varianten, etwa light_red, dark_blue, light_green und dark_purple; Hexfarben funktionieren weiterhin.

Erstelle über Compile eine neue JAR und ersetze die bisherige Mod-Datei. YACL für das Einstellungsmenü ist in der Projektkonfiguration ergänzt.

DerEisenkoenig

[11:37:54] [Render thread/INFO]: Registering common data for channel xaerominimap:main! [11:37:54] [Render thread/INFO]: Registering client data for channel xaerominimap:main! [11:37:54] [Render thread/INFO]: Loading primary common config for channel xaerominimap:main! [11:37:54] [Render thread/INFO]: Loading server config profiles for channel xaerominimap:main! [11:37:54] [Render thread/INFO]: Loading primary client config for channel xaerominimap:main! [11:37:54] [Render thread/INFO]: Loading client config profiles for channel xaerominimap:main! [11:37:54] [Render thread/INFO]: Loading Xaero's Minimap - Stage 1/3 [11:37:54] [Render thread/INFO]: Registering common data for channel xaeroworldmap:main! [11:37:54] [Render thread/INFO]: Registering client data for channel xaeroworldmap:main! [11:37:54] [Render thread/INFO]: Loading primary common config for channel xaeroworldmap:main! [11:37:54] [Render thread/INFO]: Loading server config profiles for channel xaeroworldmap:main! [11:37:54] [Render thread/INFO]: Loading primary client config for channel xaeroworldmap:main! [11:37:54] [Render thread/INFO]: Loading client config profiles for channel xaeroworldmap:main! [11:37:54] [Render thread/INFO]: Loading Xaero's World Map - Stage 1/3 [11:37:54] [Render thread/INFO]: Deserializing YACLConfig from 'C:\Users\Tobias\AppData\Roaming\ModrinthApp\profiles\TM MineGames\config\yacl.json5' [11:37:54] [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:280) at knot//net.minecraft.client.Minecraft.lambda$fillSystemReport$2(Minecraft.java:2579) at knot//net.minecraft.SystemReport.setDetail(SystemReport.java:91) at knot//net.minecraft.client.Minecraft.fillSystemReport(Minecraft.java:2579) at knot//net.minecraft.client.Minecraft.fillReport(Minecraft.java:2549) at knot//net.minecraft.client.main.Main.main(Main.java:241) 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:61) at com.modrinth.theseus.MinecraftLaunch.main(MinecraftLaunch.java:28) ---- Minecraft Crash Report ---- // Hey, that tickles! Hehehe!

Time: 2026-10-25 11:37:54 Description: Initializing game java.lang.RuntimeException: Could not execute entrypoint stage 'client' due to errors, provided by 'timerhud' at 'com.kodari.timerhud.client.TimerHudClient'! 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.client.Minecraft. (Minecraft.java:477) at knot//net.minecraft.client.main.Main.main(Main.java:232) 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:61) at com.modrinth.theseus.MinecraftLaunch.main(MinecraftLaunch.java:28) Caused by: java.lang.NoSuchFieldError: Class com.mojang.blaze3d.platform.InputConstants$Type does not have member field 'com.mojang.blaze3d.platform.InputConstants$Type KEYBOARD' at knot//com.kodari.timerhud.client.TimerHudClient.onInitializeClient(TimerHudClient.java:59) 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.client.Minecraft.

GFLW Platform:

Render Extensions: ERR GL debug messages:

Is Modded: Definitely; Client brand changed to 'fabric' Universe: 404 Type: Client Locale: de_DE System encoding: Cp1252 File encoding: UTF-8 CPU: 16x AMD Ryzen 7 7700X 8-Core Processor #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Tobias\AppData\Roaming\ModrinthApp\profiles\TM MineGames\crash-reports\crash-2026-10-25_11.37.54-client.txt WARNING: Unknown module: jdk.internal specified to --add-opens [MODRINTH] Unable to call JDK findMainMethod. Falling back to pre-Java 25 main method finding. Das Game ist nicht gestartet und das stand in der Konsole

Kodari AI
KodariOct 25 at 10:43 am 1

Der Absturz kam von InputConstants.Type.KEYBOARD: Diese Konstante gibt es in deiner Minecraft-Version 26.1.1 nicht. Ich habe die Tastenregistrierung auf KEYSYM angepasst. Die Warnung zu „Render Extensions“ ist nicht die Absturzursache.

Erstelle jetzt über Compile eine neue JAR und ersetze die bisherige Mod-Datei. /timer config bleibt zusätzlich als Befehl verfügbar.

DerEisenkoenig

Also wenn ich /timer config oder /timer settings ausführe passiert nichts und der Chat bleibt offen.

Kodari AI
KodariOct 25 at 10:57 am 2

Ich prüfe die Registrierung von /timer und den Aufruf des Einstellungsfensters, damit der Befehl das Menü tatsächlich öffnet und nicht nur im Chat stehen bleibt.

Der Fehler lag daran, dass Minecraft den Chat direkt nach dem Command schließt und dabei das sofort geöffnete Menü überschrieben hat. /timer config, /timer settings und die Konfigurationstaste öffnen das Menü jetzt verzögert im nächsten Client-Tick. Die Befehle geben außerdem eine kurze Bestätigung im Chat aus.

Erstelle über Compile eine neue JAR und ersetze die bisherige Mod-Datei.

DerEisenkoenig

Wenn ich die Commands nutze, dann Crasht das game

Kodari AI
KodariOct 28 at 2:36 pm 1

Im Code ist kein eindeutiger Fehler erkennbar, der den Absturz erklärt. Bitte sende den neuen Crash-Report oder zumindest den Abschnitt ab Description: bis einschließlich der ersten Caused by:-Zeile. Der frühere Absturz wegen InputConstants.Type.KEYBOARD ist ein anderer Fehler und zeigt nicht, was jetzt beim Ausführen der Befehle passiert.

DerEisenkoenig

Ist wieder abgestürzt:

📎 1 file 15,537 chars
📄
pasted-code-1793199407154.txt
txt 134 lines
▶
[15:53:47] [Render thread] [xaero.map.WorldMap/INFO]: Xaero's World Map: Iris found!
[15:53:47] [Render thread] [xaero.map.WorldMap/INFO]: Loading Xaero's World Map - Stage 3/3
[15:53:47] [Render thread] [xaero.map.WorldMap/INFO]: New world map region cache hash code: 1001244695
[15:53:47] [Render thread] [com.mojang.blaze3d.audio.Library/INFO]: OpenAL initialized on device OpenAL Soft on Kopfhörer (High Definition Audio Device)
[15:53:47] [Render thread] [net.minecraft.client.sounds.SoundEngine/INFO]: Sound engine started
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 512x256x0 minecraft:textures/atlas/particles.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 128x128x0 minecraft:textures/atlas/decorated_pot.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 2048x1024x0 minecraft:textures/atlas/armor_trims.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 512x256x0 minecraft:textures/atlas/paintings.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 1024x512x0 minecraft:textures/atlas/shield_patterns.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 2048x2048x4 minecraft:textures/atlas/blocks.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 512x512x0 minecraft:textures/atlas/chest.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 256x128x0 minecraft:textures/atlas/celestials.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 1024x512x0 minecraft:textures/atlas/banner_patterns.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 512x512x0 minecraft:textures/atlas/beds.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 2048x2048x0 minecraft:textures/atlas/items.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 1024x1024x0 minecraft:textures/atlas/gui.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 128x64x0 minecraft:textures/atlas/map_decorations.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 512x256x0 minecraft:textures/atlas/signs.png-atlas
[15:53:47] [Render thread] [net.minecraft.client.renderer.texture.TextureAtlas/INFO]: Created: 512x512x0 minecraft:textures/atlas/shulker_boxes.png-atlas
[15:53:48] [Render thread] [xaero.minimap.XaeroMinimap/INFO]: Loading Xaero's Minimap - Stage 2/3
[15:53:49] [Render thread] [xaero.hud.minimap.MinimapLogs/WARN]: io exception while checking versions: Online mod data expired! Date: Wed Oct 28 15:27:27 CET 2026
[15:53:49] [Render thread] [xaero.hud.minimap.MinimapLogs/INFO]: Registered player tracker system: minimap_synced
[15:53:49] [Render thread] [xaero.minimap.XaeroMinimap/INFO]: Loading Xaero's Minimap - Stage 3/3
[15:53:49] [Render thread] [xaero.lib.XaeroLib/INFO]: Loading XaeroLib common 2/2!
[15:53:49] [Render thread] [xaero.lib.XaeroLib/INFO]: Loading XaeroLib client 2/3!
[15:53:49] [Render thread] [xaero.lib.XaeroLib/INFO]: Loading XaeroLib client 3/3!
[15:53:50] [Render thread] [Iris/INFO]: Creating pipeline for dimension minecraft:overworld
[15:53:52] [Render thread] [Iris/WARN]: Found fine program match for minecraft:pipeline/entity_translucent: ENTITIES_TRANSLUCENT
[15:53:52] [Render thread] [Iris/WARN]: Found okay program match for minecraft:pipeline/translucent_particle: PARTICLES_TRANS
[15:53:52] [Render thread] [net.minecraft.client.renderer.DynamicUniformStorage/INFO]: Resizing Dynamic Transforms UBO, capacity limit of 2 reached during a single frame. New capacity will be 4.
[15:54:34] [Render thread] [net.minecraft.world.item.crafting.RecipeManager/INFO]: Loaded 1515 recipes
[15:54:34] [Render thread] [net.minecraft.advancements.AdvancementTree/INFO]: Loaded 1621 advancements
[15:54:34] [Render thread] [net.fabricmc.fabric.impl.biome.modification.BiomeModificationImpl/INFO]: Applied 0 biome modifications to 0 of 65 new biomes in 941.1 μs
[15:54:34] [Server thread] [Simple Voice Voice Changer/INFO]: Voice changer server policy ready: allowed, 0 muted, 0 shared voices
[15:54:34] [Server thread] [net.minecraft.client.server.IntegratedServer/INFO]: Starting integrated minecraft server version 26.1.1
[15:54:34] [Server thread] [net.minecraft.server.MinecraftServer/INFO]: Generating keypair
[15:54:34] [Server thread] [net.minecraft.server.level.progress.LoggingLevelLoadListener/INFO]: Loading 0 persistent chunks...
[15:54:34] [Server thread] [net.minecraft.server.level.progress.LoggingLevelLoadListener/INFO]: Einstiegsbereich wird vorbereitet: 16 %
[15:54:34] [Server thread] [net.minecraft.server.MinecraftServer/INFO]: Saving chunks for level 'ServerLevel[Redstone Weöt]'/minecraft:overworld
[15:54:34] [Server thread] [net.minecraft.server.MinecraftServer/INFO]: Saving chunks for level 'ServerLevel[Redstone Weöt]'/minecraft:the_end
[15:54:34] [Server thread] [net.minecraft.server.MinecraftServer/INFO]: Saving chunks for level 'ServerLevel[Redstone Weöt]'/minecraft:the_nether
[15:54:34] [Server thread] [net.minecraft.server.MinecraftServer/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[15:54:34] [Server thread] [net.minecraft.server.MinecraftServer/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[15:54:34] [Server thread] [net.minecraft.server.MinecraftServer/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[15:54:34] [Server thread] [net.minecraft.server.MinecraftServer/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[15:54:34] [VoiceChatServerThread] [voicechat/INFO]: [voicechat] Voice chat server started at port 59180
[15:54:35] [Server thread] [net.minecraft.server.level.progress.LoggingLevelLoadListener/INFO]: Loading 49 chunks for player spawn...
[15:54:35] [Server thread] [net.minecraft.server.level.progress.LoggingLevelLoadListener/INFO]: Einstiegsbereich wird vorbereitet: 100 %
[15:54:35] [Server thread] [net.minecraft.server.level.progress.LoggingLevelLoadListener/INFO]: Time elapsed: 546 ms
[15:54:35] [Server thread] [net.minecraft.server.players.PlayerList/INFO]: {MINECRAFT_USERNAME}[local:E:5dd310f3] logged in with entity id 1 at (13.410805253260902, 63.308657329426424, -52.305391840156595)
[15:54:35] [Server thread] [net.minecraft.server.MinecraftServer/INFO]: {MINECRAFT_USERNAME} hat das Spiel betreten
[15:54:35] [Render thread] [xaero.hud.minimap.MinimapLogs/INFO]: Minimap required item set to nothing.
[15:54:35] [Render thread] [xaero.hud.minimap.MinimapLogs/INFO]: New Xaero hud session initialized!
[15:54:35] [Render thread] [xaero.map.WorldMap/INFO]: Fullscreen map required item set to nothing.
[15:54:35] [Render thread] [xaero.map.WorldMap/INFO]: New world map session initialized!
[15:54:35] [Render thread] [Iris/INFO]: Reloading pipeline on dimension change: minecraft:overworld => minecraft:overworld
[15:54:35] [Render thread] [Iris/INFO]: Destroying pipeline minecraft:overworld
[15:54:35] [Render thread] [Iris/INFO]: Creating pipeline for dimension minecraft:overworld
[15:54:35] [Server thread] [net.minecraft.client.server.IntegratedServer/INFO]: Changing view distance to 32, from 10
[15:54:35] [Server thread] [net.minecraft.client.server.IntegratedServer/INFO]: Changing simulation distance to 32, from 0
[15:54:35] [Render thread] [ChunkBuilder/INFO]: Started 10 worker threads
[15:54:35] [Render thread] [itemscroller/WARN]: readFromDisk(): Error reading villager data from dir 'C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\TM MineGames\itemscroller'
[15:54:35] [Render thread] [voicechat/INFO]: [voicechat] Sending secret request to the server
[15:54:35] [Render thread] [ShulkerBoxTooltip Plugins/INFO]: [ShulkerBoxTooltip Plugins] Loading 1 plugin: shulkerboxtooltip
[15:54:35] [Render thread] [ShulkerBoxTooltip Plugins/INFO]: [ShulkerBoxTooltip Plugins] Registered 37 color keys for mod shulkerboxtooltip
[15:54:35] [Render thread] [ShulkerBoxTooltip Plugins/INFO]: [ShulkerBoxTooltip Plugins] Registered 52 providers for mod shulkerboxtooltip
[15:54:35] [Server thread] [voicechat/INFO]: [voicechat] Received secret request of {MINECRAFT_USERNAME} (20)
[15:54:35] [Server thread] [voicechat/INFO]: [voicechat] Sent secret to {MINECRAFT_USERNAME}
[15:54:36] [Render thread] [Inventory Profiles Next/INFO]: [Inventory Profiles Next] Loaded 0 external GUI hints
[15:54:36] [Render thread] [Inventory Profiles Next/INFO]: [Inventory Profiles Next] Loaded 803 build-in GUI hints
[15:54:36] [Render thread] [Inventory Profiles Next/INFO]: [Inventory Profiles Next] Effective GUI hints after merge: 803
[15:54:36] [Render thread] [xaero.hud.minimap.MinimapLogs/INFO]: Minimap updated server level id: -681018134 for world ResourceKey[minecraft:dimension / minecraft:overworld]
[15:54:36] [Render thread] [net.minecraft.client.gui.components.ChatComponent/INFO]: [System] [CHAT] [Better Hanging Signs v6.3] Datapack has been reloaded. Check if there is a new version available. Modrinth
[15:54:36] [Render thread] [net.minecraft.advancements.AdvancementTree/INFO]: Loaded 113 advancements
[15:54:36] [Render thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] Server integration enabled, attempting handshake...
[15:54:36] [Render thread] [voicechat/INFO]: [voicechat] Received secret
[15:54:36] [Render thread] [voicechat/INFO]: [voicechat] Connecting to voice chat server: '127.0.0.1:59180'
[15:54:36] [VoiceChatAuthenticationThread] [voicechat/INFO]: [voicechat] Trying to authenticate voice chat connection
[15:54:36] [VoiceChatPacketProcessingThread] [voicechat/INFO]: [voicechat] Successfully authenticated player {MINECRAFT_UUID}
[15:54:36] [VoiceChatConnectionThread] [voicechat/INFO]: [voicechat] Server acknowledged authentication
[15:54:36] [Server thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] {MINECRAFT_USERNAME}: protocol version: 2.0
[15:54:36] [Render thread] [ChunkBuilder/INFO]: Stopping worker threads
[15:54:36] [Render thread] [ChunkBuilder/INFO]: Started 10 worker threads
[15:54:36] [Render thread] [fwa/INFO]: [FWA] Config file not found or invalid, using default
[15:54:36] [Render thread] [net.minecraft.client.renderer.DynamicUniformStorage/INFO]: Resizing Dynamic Transforms UBO, capacity limit of 4 reached during a single frame. New capacity will be 8.
[15:54:36] [Render thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] Handshake succeeded
[15:54:36] [Render thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] Server protocol version: 2.0
[15:54:36] [Render thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] checking EC...
[15:54:36] [Render thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] Not ASC
[15:54:36] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: ########## GL ERROR ##########
[15:54:36] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: @ Pre render
[15:54:36] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: 65539: Invalid key 18
[15:54:36] [Render thread] [xaero.hud.minimap.MinimapLogs/INFO]: Reloading radar icon resources...
[15:54:36] [Render thread] [xaero.hud.minimap.MinimapLogs/INFO]: Reloaded radar icon resources!
[15:54:36] [Render thread] [net.minecraft.client.renderer.DynamicUniformStorage/INFO]: Resizing Dynamic Transforms UBO, capacity limit of 8 reached during a single frame. New capacity will be 16.
[15:54:37] [VoiceChatAuthenticationThread] [voicechat/INFO]: [voicechat] Trying to validate voice chat connection
[15:54:37] [VoiceChatPacketProcessingThread] [voicechat/INFO]: [voicechat] Successfully validated connection of player {MINECRAFT_UUID}
[15:54:37] [VoiceChatPacketProcessingThread] [voicechat/INFO]: [voicechat] Player {MINECRAFT_USERNAME} ({MINECRAFT_UUID}) successfully connected to voice chat
[15:54:37] [VoiceChatConnectionThread] [voicechat/INFO]: [voicechat] Server acknowledged connection check
[15:54:37] [MicrophoneThread] [voicechat/INFO]: [voicechat] Using stereo workaround for OpenAL microphones
[15:54:56] [Render thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] checking EC...
[15:54:56] [Render thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] Not ASC
[15:54:56] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: ########## GL ERROR ##########
[15:54:56] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: @ Post render
[15:54:56] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: 65539: Invalid key 18
[15:56:11] [Render thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] checking EC...
[15:56:11] [Render thread] [ShulkerBoxTooltip/INFO]: [ShulkerBoxTooltip] Not ASC
[15:56:11] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: ########## GL ERROR ##########
[15:56:11] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: @ Post render
[15:56:11] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: 65539: Invalid key 18
[15:56:17] [Render thread] [net.minecraft.client.gui.components.ChatComponent/INFO]: [System] [CHAT] Opening Timer HUD settings...
[15:56:17] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: ########## GL ERROR ##########
[15:56:17] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: @ Post render
[15:56:17] [Render thread] [com.mojang.blaze3d.platform.Window/ERROR]: 65539: Invalid key 18
java.lang.NoSuchMethodError: 'net.minecraft.client.gui.screens.Screen net.minecraft.client.gui.Gui.screen()'
        at knot//com.kodari.timerhud.client.TimerHudClient.openConfigScreen(TimerHudClient.java:226)
        at knot//com.kodari.timerhud.client.TimerHudClient.lambda$onInitializeClient$0(TimerHudClient.java:69)
        at knot//net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents.lambda$static$3(ClientTickEvents.java:43)
        at knot//net.minecraft.client.Minecraft.handler$zpi000$fabric-lifecycle-events-v1$onEndTick(Minecraft.java:9679)
        at knot//net.minecraft.client.Minecraft.tick(Minecraft.java:2035)
        at knot//net.minecraft.client.Minecraft.runTick(Minecraft.java:1360)
        at knot//net.minecraft.client.Minecraft.run(Minecraft.java:991)
        at knot//net.minecraft.client.main.Main.main(Main.java:248)
        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:61)
        at com.modrinth.theseus.MinecraftLaunch.main(MinecraftLaunch.java:28)
WARNING: Unknown module: jdk.internal specified to --add-opens
[MODRINTH] Unable to call JDK findMainMethod. Falling back to pre-Java 25 main method finding.
[15:56:17] [Render thread] [net.minecraft.client.Minecraft/FATAL]: Unreported exception thrown!
Kodari AI
KodariOct 28 at 3:01 pm 1

Der Crash wird eindeutig durch Gui.screen() ausgelöst: Die laufende Version 26.1.1 kennt diese Methode nicht. Ich ändere den Aufruf, damit das Menü ohne Zugriff auf diese inkompatible Methode geöffnet wird.

Der Absturz kam von minecraft.gui.screen(): Diese Methode gibt es in deiner laufenden Minecraft-Version 26.1.1 nicht. Das Einstellungsmenü übergibt jetzt kein vorheriges Fenster mehr und umgeht so den fehlerhaften Aufruf. Die Meldung Invalid key 18 ist davon getrennt und nicht die Ursache dieses Absturzes.

Erstelle über Compile eine neue JAR und ersetze damit die bisherige Mod-Datei.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
9 590
src/client/java/com/kodari/timerhud/client/TimerHudClient.java
package com.kodari.timerhud.client;

import com.mojang.brigadier.arguments.IntegerArgumentType;
import com.mojang.brigadier.arguments.StringArgumentType;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.command.v2.ClientCommands;
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keymapping.v1.KeyMappingHelper;
import net.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.DeltaTracker;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.Identifier;
import com.mojang.blaze3d.platform.InputConstants;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Locale;
import java.util.Properties;
import java.util.logging.Logger;

public class TimerHudClient implements ClientModInitializer {
	private static final String DEFAULT_COLOR = "white";
	private static final Path STATE_FILE = Path.of("config", "timerhud.properties");
	private static final Logger LOGGER = Logger.getLogger("timerhud");
	private static boolean active;
	private static boolean paused;
	private static boolean countingDown;
	static boolean visible = true;
	static boolean textShadow = true;
	static int hudOffset;
	static float gradientSpeed = 1.0f;
	static GradientMode gradientMode = GradientMode.SOLID;
	private static long startingSeconds;
	private static long startedAtNanos;
	private static long lastPersistedSeconds = Long.MIN_VALUE;
	private static int startColor = 0xFFFFFFFF;
	private static int endColor = 0xFFFFFFFF;
	private static KeyMapping configKey;
	private static boolean configOpenRequested;

	enum GradientMode {
		SOLID,
		STATIC,
		ANIMATED
	}

	@Override
	public void onInitializeClient() {
		loadTimerState();
		configKey = KeyMappingHelper.registerKeyMapping(new KeyMapping(
				"key.timerhud.config", keyboardType(), InputConstants.KEY_O, KeyMapping.Category.MISC
		));
		ClientTickEvents.END_CLIENT_TICK.register(client -> {
			while (configKey.consumeClick()) {
				configOpenRequested = true;
			}
			if (configOpenRequested) {
				configOpenRequested = false;
				openConfigScreen();
			}
		});
		HudElementRegistry.addLast(
				Identifier.fromNamespaceAndPath("timerhud", "timer"),
				TimerHudClient::renderHud
		);
		ClientCommandRegistrationCallback.EVENT.register((dispatcher, buildContext) -> dispatcher.register(
				ClientCommands.literal("timer")
						.executes(context -> {
										context.getSource().sendFeedback(Component.literal("/timer up [color] [gradient] | /timer down <seconds> [color] [gradient] | /timer color <color> [gradient] | /timer gradient <off|static|animated> | /timer show | hide | toggle | config | pause | resume | stop"));
							return 1;
						})
						.then(ClientCommands.literal("up")
								.executes(context -> startTimer(context.getSource(), false, 0, DEFAULT_COLOR, null))
								.then(ClientCommands.argument("color", StringArgumentType.word())
										.executes(context -> startTimer(context.getSource(), false, 0, StringArgumentType.getString(context, "color"), null))
										.then(ClientCommands.argument("gradient", StringArgumentType.word())
												.executes(context -> startTimer(context.getSource(), false, 0, StringArgumentType.getString(context, "color"), StringArgumentType.getString(context, "gradient"))))))
						.then(ClientCommands.literal("down")
								.then(ClientCommands.argument("seconds", IntegerArgumentType.integer(1))
										.executes(context -> startTimer(context.getSource(), true, IntegerArgumentType.getInteger(context, "seconds"), DEFAULT_COLOR, null))
										.then(ClientCommands.argument("color", StringArgumentType.word())
												.executes(context -> startTimer(context.getSource(), true, IntegerArgumentType.getInteger(context, "seconds"), StringArgumentType.getString(context, "color"), null))
												.then(ClientCommands.argument("gradient", StringArgumentType.word())
														.executes(context -> startTimer(context.getSource(), true, IntegerArgumentType.getInteger(context, "seconds"), StringArgumentType.getString(context, "color"), StringArgumentType.getString(context, "gradient")))))))
						.then(ClientCommands.literal("color")
								.then(ClientCommands.argument("color", StringArgumentType.word())
										.executes(context -> setTimerColor(context.getSource(), StringArgumentType.getString(context, "color"), null))
										.then(ClientCommands.argument("gradient", StringArgumentType.word())
												.executes(context -> setTimerColor(context.getSource(), StringArgumentType.getString(context, "color"), StringArgumentType.getString(context, "gradient"))))))
						.then(ClientCommands.literal("stop").executes(context -> {
								long shownSeconds = active ? currentSeconds() : startingSeconds;
							active = false;
								paused = false;
								saveTimerState(shownSeconds);
							context.getSource().sendFeedback(Component.literal("Timer stopped."));
							return 1;
							}))
							.then(ClientCommands.literal("show").executes(context -> setHudVisible(context.getSource(), true)))
							.then(ClientCommands.literal("hide").executes(context -> setHudVisible(context.getSource(), false)))
							.then(ClientCommands.literal("toggle").executes(context -> setHudVisible(context.getSource(), !visible)))
							.then(ClientCommands.literal("config").executes(context -> requestConfigScreen(context.getSource())))
							.then(ClientCommands.literal("settings").executes(context -> requestConfigScreen(context.getSource())))
							.then(ClientCommands.literal("gradient")
									.then(ClientCommands.literal("off").executes(context -> setGradientMode(context.getSource(), GradientMode.SOLID)))
									.then(ClientCommands.literal("static").executes(context -> setGradientMode(context.getSource(), GradientMode.STATIC)))
									.then(ClientCommands.literal("animated").executes(context -> setGradientMode(context.getSource(), GradientMode.ANIMATED))))
							.then(ClientCommands.literal("pause").executes(context -> pauseTimer(context.getSource())))
							.then(ClientCommands.literal("resume").executes(context -> resumeTimer(context.getSource())))
		));
	}

	private static InputConstants.Type keyboardType() {
		try {
			return InputConstants.Type.valueOf("KEYBOARD");
		} catch (IllegalArgumentException exception) {
			return InputConstants.Type.valueOf("KEYSYM");
		}
	}

	private static int startTimer(FabricClientCommandSource source, boolean down, long seconds, String colorName, String gradientName) {
		Integer parsedStartColor = parseColor(colorName);
		Integer parsedEndColor = gradientName == null ? parsedStartColor : parseColor(gradientName);
		if (parsedStartColor == null || parsedEndColor == null) {
			source.sendError(Component.literal("Unknown color. Use a color name or a hex value such as #33AAFF."));
			return 0;
		}

		countingDown = down;
		startingSeconds = seconds;
		startedAtNanos = System.nanoTime();
		startColor = parsedStartColor;
		endColor = parsedEndColor;
		gradientMode = gradientName == null ? GradientMode.SOLID : GradientMode.STATIC;
		active = true;
		paused = false;
		lastPersistedSeconds = seconds;
		saveTimerState(seconds);
		source.sendFeedback(Component.literal(down ? "Countdown started." : "Count-up timer started."));
		return 1;
	}

	private static int pauseTimer(FabricClientCommandSource source) {
		if (!active) {
			source.sendError(Component.literal("There is no active timer to pause."));
			return 0;
		}
		if (paused) {
			source.sendError(Component.literal("The timer is already paused."));
			return 0;
		}

		startingSeconds = currentSeconds();
		startedAtNanos = System.nanoTime();
		paused = true;
		lastPersistedSeconds = startingSeconds;
		saveTimerState(startingSeconds);
		source.sendFeedback(Component.literal("Timer paused."));
		return 1;
	}

	private static int resumeTimer(FabricClientCommandSource source) {
		if (!active) {
			source.sendError(Component.literal("There is no active timer to resume."));
			return 0;
		}
		if (!paused) {
			source.sendError(Component.literal("The timer is not paused."));
			return 0;
		}

		startedAtNanos = System.nanoTime();
		paused = false;
		lastPersistedSeconds = startingSeconds;
		saveTimerState(startingSeconds);
		source.sendFeedback(Component.literal("Timer resumed."));
		return 1;
	}

	private static int setTimerColor(FabricClientCommandSource source, String colorName, String gradientName) {
		if (!active) {
			source.sendError(Component.literal("Start a timer before changing its color."));
			return 0;
		}

		Integer parsedStartColor = parseColor(colorName);
		Integer parsedEndColor = gradientName == null ? parsedStartColor : parseColor(gradientName);
		if (parsedStartColor == null || parsedEndColor == null) {
			source.sendError(Component.literal("Unknown color. Use a color name or a hex value such as #33AAFF."));
			return 0;
		}