Skip to content
Discussion options

You must be logged in to vote

So I found a solution to this,
by following this: https://github.com/LlamaLad7/MixinExtras/wiki/Expressions
you can make an expression to hook onto,

this.openScreenButton(RESOURCEPACK, ?)

then, use ModifyArg with index of 1 to change the supplier value to your own screen
full code:

@Definition(id = "openScreenButton", method = "Lnet/minecraft/client/gui/screens/options/OptionsScreen;openScreenButton(Lnet/minecraft/network/chat/Component;Ljava/util/function/Supplier;)Lnet/minecraft/client/gui/components/Button;")
    @Definition(id = "RESOURCEPACK", field = "Lnet/minecraft/client/gui/screens/options/OptionsScreen;RESOURCEPACK:Lnet/minecraft/network/chat/Component;")
    @Expression("this.o…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shushi93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
1 participant