Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with container-title-text-based inventory background resource packs #52

Open
seylorx1 opened this issue Jul 3, 2024 · 0 comments
Labels
incompatibility another mod is rudely breaking inventory tabs

Comments

@seylorx1
Copy link

seylorx1 commented Jul 3, 2024

Applicable to Inventory Tabs 1.3.3

Issue Description

Hello! I was playing earlier using the Faithless resource pack and noticed strange behaviour when hovering over chest tabs, where an image of the chest inventory layout would display.

image

However, vanilla textures display expected behaviour.

image

After digging through the resource pack, I noticed some strange escape sequences in the Faithless lang file that tabs/ChestBlockTab.java references. In Faithless, a custom en.us lang file has overrides for the container.chest and container.chestDouble language entries:

  • "container.chest": "§f\uE999\uE997"
  • "container.chestDouble": "§f\uE999\uE998"

Further, I learned that vanilla resource pack authors are not able to create unique textures for chests and double chests in vanilla contexts as discussed in this minecraftforum thread. It appears, somehow, that Faithless is doing something with the language file to display sprites for containers that otherwise do not support custom textures. Certainly, I struggled to find any information on what the \uE99X escape sequence does, but Faithless seems to use this to override the "Chest" and "Double Chest" text fields at the top of chest inventories to display gui backgrounds. Typically, these lang file entries are only used within gui, as the chest item has a separate lang file entry. This appears to have the unintended consequence of displaying a sprite wherever the container.xxxx lang file translations are used, including within tooltips apparently.

Workaround for 1.3.3

Removing container lang file entries from the resource pack fixes the issue with this mod, but also prevents resource packs like Faithless from displaying their nicely done (yet hacky) container gui backgrounds.

Possible Solutions?

It might be worth seeing how feasible it would be to add an option in inventory_tabs.toml to allow for custom strings or lang files for use exclusively within the mod, bypassing net.minecraft.text.Text.translatable().

@sisby-folk sisby-folk changed the title Incompatibility With Custom Chest GUI Textures In Resource Packs Incompatible with container-title-text-based inventory background resource packs Aug 24, 2024
@sisby-folk sisby-folk added the incompatibility another mod is rudely breaking inventory tabs label Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incompatibility another mod is rudely breaking inventory tabs
Projects
None yet
Development

No branches or pull requests

2 participants