Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 :D

Edited by OutCraft

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

  • 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 :D

Also: PLEASE use SPOILERS for logs!

  • 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 xD

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 :D

Also: PLEASE use SPOILERS for logs!

  • OutCraft changed the title to [1.17.1] Add buttons to Screen
  • 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 :D

Also: PLEASE use SPOILERS for logs!

  • Author

Ahh sorry, I was just dumb xD

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 :D

Also: PLEASE use SPOILERS for logs!

  • 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 :D

Also: PLEASE use SPOILERS for logs!

  • 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 :D

Also: PLEASE use SPOILERS for logs!

  • 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 :D

Also: PLEASE use SPOILERS for logs!

  • 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 by OutCraft
Forgot something

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

  • Author

I'll post the crash as soon as I have time (I think Saturday)

Edited by OutCraft
Saturday

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

  • 3 weeks later...
  • 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 :D

Also: PLEASE use SPOILERS for logs!

  • OutCraft changed the title to [Solved] [1.17.1] Add Config GUI

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.