Resource Screening banner

Resource Screening

3 devlogs
26h 59m 25s

I have a bunch of resource packs installed (more than half a stack now) and managing all their textures and choosing which resource pack should take priority, etc. is very confusing and time intensive. So, I'm making this mod to allow me to pick t…

I have a bunch of resource packs installed (more than half a stack now) and managing all their textures and choosing which resource pack should take priority, etc. is very confusing and time intensive. So, I’m making this mod to allow me to pick the texture I want for every texture in minecraft from a resource pack, allowing me to change between textures easily, or use some textures from one resource pack and some from another resource pack :)

This project uses AI

Copilot Search (Ai overview for MSEdge)
Gemini (for the complec parts, like the dropdown menu, which I can’t find any references of. No code was generated, only for logic and steps to implement, for example which classes to use etc.)

Repository

Loading README...

shashi93

I managed to make (after 14 gruelling hours) a very basic and very minimal mod screen (literally nothing is going on). I spent way too long figuring out how to render the filter button image, and now even longer on how to make a dropdown menu (and it isn’t even the hardest part)
In my defence, i’m pretty sure this is the first Java program I am writing.
See you after forever :)

Attachment
0
shashi93

(For an almost full technical report, it’s on my GitHub discussion https://github.com/orgs/FabricMC/discussions/5200. Here I’ll go through my thought process)
Took 9h, which was honestly way too long, I was trying to figure out how I can redirect the resource screen button in the options screen menu to open my screen instead of what it usually opens.

My first method was to try and redirect the output screen, which is what in the end I went with and managed to get it.
The second method I was thinking of was to do what Mod Menu did, and remove the Resource Pack button and replace it with my own button, but I hardly explored this option (although it could honestly save me a bunch of time)
The third and final method I thought of was to completely replace the screen that Resource Packs button opens, but I did not do this for a few reasons.

The first method that I did, and the one that eventually worked, was to use Mixin Extras’ Expressions syntax to match the specific line of code I needed to change.
Using iy, I matched the screen supplier (the one that decides which screen to open) and changed it to my own screen (with some help for the syntax and for telling me Expressions exist, by the creator of Mixin Extras: LamaLad7)
I spent way too long on this
took me 30 min to realise 2 brackets caused me some errors, and even longer to get the Annotation right, which was just there in the wiki and i still copied it wrong 💀
IntelliJ’s MCDev plugin was a lifesaver for this, probably wouldn’t have got it without it.

I don’t know why I did not consider the second method (replacing the resource pack button) ngl.
probably would have saved me so much time.
As for the third method, I did not want to do it as,

  • I did not even think it was even possible to completely change pack selection screen
  • I could (hopefully) easily make it so that if there is a critical error with my mod’s screen, i can fallback to the old pack selection screen
0
shashi93

I finally made a button appear on the title screen by Injecting into TitleScreen class. My next goal now is to now hook onto a button in Minecraft and change it to be my screen instead of what it usually opens.

Attachment
0