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

Filter item in GUI based on the language used in-game #68

Open
NuruddinPlays opened this issue Dec 12, 2024 · 2 comments
Open

Filter item in GUI based on the language used in-game #68

NuruddinPlays opened this issue Dec 12, 2024 · 2 comments
Labels
⛏️ cit Custom Item Texture ✨ enhancement New feature or request

Comments

@NuruddinPlays
Copy link

So I made a pack a while back which adds custom Malay-themed weapons and armors in the form of CIT:
https://modrinth.com/resourcepack/senjata-busana-melayu-cit
And in this pack I provided support for both Malay and English names, as seen in this item table

And because of that there is two options of the same item in the GUI (whether it is via the anvil or the creative mode tab) - one for each language. So I think it would be cool to have a option to filter the items displayed based on the language chosen in-game. For example when I choose Malay in-game, than the GUI would only display the items with the Malay names, and when I choose any non-Malay language, then it would only display the items with the English names. And considering that in my pack the CITs are split into 2 folders - one for each language - maybe this can make it easier to setup...

I knew about the issue with CITResewn not being happy when there is any unknown conditions in the properties file (#45), but I'm putting this here anyway in case this issue got fixed at some point

@NuruddinPlays NuruddinPlays changed the title Filtering items displayed based on the language used in-game Filter item in GUI based on the language used in-game Dec 12, 2024
@HiWord9
Copy link
Owner

HiWord9 commented Dec 27, 2024

U should not separate languages by different folders imo, u should make all cit appear once and with regex custom name, e.g. :
nbt.display.Name=iregex:.*(Diamond Baju Melayu|Baju Berlian).*
and also better to use components.custom_name=.

So I think it would be cool to have a option to filter the items displayed based on the language chosen in-game.

Speaking about this, i think it would be a good feature to make it possible to set custom display name in properties file, and abbility to make it depend on current game language, it would help renames like this that are using regex to translate a resource pack to different languages.

I knew about the issue with CITResewn not being happy when there is any unknown conditions in the properties file (#45), but I'm putting this here anyway in case this issue got fixed at some point

Im leaving this issue open until deciding on its implementation, because, as described here, rprenames properies will be implemented in future.

@HiWord9 HiWord9 added ✨ enhancement New feature or request ⛏️ cit Custom Item Texture labels Dec 27, 2024
@NuruddinPlays
Copy link
Author

NuruddinPlays commented Dec 29, 2024

U should not separate languages by different folders imo, u should make all cit appear once and with regex custom name, e.g. : nbt.display.Name=iregex:.*(Diamond Baju Melayu|Baju Berlian).*

I was having a bit of trouble with setting up the properties when initially making the pack, so this somehow flew over my head! And I was just so happened to be in the process of "cleaning-up the pack" (that is, removing tons of duplicate stuff caused by the language split), so thanks!

and also better to use components.custom_name=.

I'm still supporting pre-1.20.5 versions (mainly because of 1.20.1, and maybe 1.12.2 but idk), that's why I haven't changed it from NBT to Components yet... But maybe I will after CITR's v2 is released (maybe as a separate pack version)

Though I'm not actually sure whether the current properties file format supports having both the NBT and Components format in the same file. I'm assuming it would be buggy or broken (especially with CITR), currently busy so couldn't test rn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⛏️ cit Custom Item Texture ✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants