Husk Spawn (Fabric)

Husk Spawn (Fabric)

59.7k Downloads

Hidden Recipe Book stops working when switching languages

tehbertl opened this issue ยท 2 comments

commented

Information

Minecraft version: 1.20.4
Modloader: Fabric
Fabric loader version: 0.15.7
Environment: Singleplayer

Mod name: Hidden Recipe Book
Mod version: 4.6

Description

Hidden Recipe Book stops working when I switch to a different language from English (US). The recipe book will be visible, and the hotkey to change it does nothing. This happens when I switch to languages like Upside Down English, Nederlands, toki pona, ... (I haven't tested them all, admittedly).

This happens even when I don't leave the game and just change the language from the options menu while remaining in my world. When I switch back to English (US), the mod continues working as intended. I've enabled "showMessageOnRecipeBookToggle": true in the config file), and the messages show up in chat as normal when in English, but not at all when in a different language. The option to change the keybind (Options -> Controls -> Key Binds... -> Show recipe book toggle) is always there regardless of language.

This issue might be related to #1713 Hidden Recipe Book isn't working if any resourcepack enabled? In the comments, another user mentions that the mod working/not working depends on whether there's a language.json file present in the resource pack.

Crash report

latest.log looks completely normal, no errors no nothing

commented

I've done some further testing and this issue happens specifically with the Hidden Recipe Book mod. I've done the same test with the GUI Clock mod and it continues working after switching languages.

Sorry for any confusion regarding this issue being opened/closed; I am new to github.

commented

I've pinpointed where the problem lies: it's when certain strings are translated. The mod doesn't actually stop working altogether - it just stops doing its thing in the GUI of a furnace / crafting table / etc. whenever the title of that GUI element (eg. "Crafting" in the crafting table, "Furnace" in the furnace, etc.) is changed.

When I switch to Nederlands in Minecraft, the mod stops working in the UIs and the recipe book shows up as if the mod isn't doing anything. BUT when I put this tiny little json file in a resource pack and activate that resource pack, the mod works again! This means that I've found a workaround in a sense, although it is NOT a bugfix - the bug is still there, I'm just "breaking the translation", in a sense.

nl_nl.json
HRB fix nl_nl.zip

I'm no code monkey, but code-wise I expect the issue to be somewhere in how the mod detects the UI elements where the recipe book needs to be removed. Hopefully this information can help the developer pinpoint where the issue lies in the mod!