Posted November 19, 20213 yr Hi! I want to add my own buttons to the "Options" side of Minecraft "ESCAPE>Options" but I don't know how to do this Thanks for any help Edited December 10, 20213 yr by OutCraft Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 20, 20213 yr Author Hi, thank you for the quick reply! I didn't know, that you really can use these Buttons, I exactly wanted to do something like this! Again learned something new Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 21, 20213 yr Author Hi again! I have another question: I searched online how to do this, because I didn't get it to work and I saw this: ModLoadingContext.get().registerExtensionPoint( ExtensionPoint.CONFIGGUIFACTORY, () -> (mc, screen) -> new ConfigScreen() ); My problem is, that I can't find the class ExtensionPoint, but on the website it says it's there: import net.minecraftforge.fml.ExtensionPoint; The only thing what I found was IExtensionPoint in net.minecraftforge.fml.IExtensionPoint; but it only has DisplayTest and also, IExtensionPoint.DisplayTest gives an Error there: ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest (<- Error: "IExtensionPoint.DisplayTest cannot be resolved to a variable"), extension); Thank you for any help! Ps: I like bunnies On 11/19/2021 at 9:23 PM, diesieben07 said: No, you are not a special bunny. Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 21, 20213 yr Author But how should I register it? This gives also an error: "ConfigGuiHandler.ConfigGuiFactory cannot be resolved to a variable" Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 21, 20213 yr Author Ahh sorry, I was just dumb ModLoadingContext.get().registerExtensionPoint(() -> ConfigGuiHandler.ConfigGuiFactory, extension); Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 21, 20213 yr Author I know, for "extension" I now need to make a custom screen, right? Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 21, 20213 yr Author Now I did this: public class MyClientConfigGuiScreen extends Screen { public MyClientConfigGuiScreen() { super(new TextComponent("My Mod Config")); } } and ModLoadingContext.get().registerExtensionPoint(() -> ConfigGuiHandler.ConfigGuiFactory, MyClientConfigGuiScreen::new (<- Error: "The constructed object of type MyClientConfigGuiScreen is incompatible with the descriptor's return type: T")); but there is an error at MyClientConfigGuiScreen: "The constructed object of type MyClientConfigGuiScreen is incompatible with the descriptor's return type: T" Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 21, 20213 yr Author Can you give me an example how to do this? Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 22, 20213 yr Author Hi! I know Java, but I didn't know what parameters to pass in. I eventually found that out by my own (by looking at ConfigGuiHandler.ConfigGuiFactory) and thanks of your replies (I read them again), but it's very buggy and when I click on "Mods" on the title screen the game crashes Edited November 22, 20213 yr by OutCraft Forgot something Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 22, 20213 yr Author I'll post the crash as soon as I have time (I think Saturday) Edited November 22, 20213 yr by OutCraft Saturday Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
December 10, 20213 yr Author I solved it: ModLoadingContext.get().registerExtensionPoint(ConfigGuiHandler.ConfigGuiFactory.class, () -> new ConfigGuiHandler.ConfigGuiFactory(new BiFunction<Minecraft, Screen, Screen>() { @Override public Screen apply(Minecraft mc, Screen screen) { return new MyConfigGuiScreen(); } })); (Sorry for all that needed this, I forgot to post the answer) Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.