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 program a mod where, after loading Forge, the Minecraft standard screen (which is displayed when you load e.B. a world, when you change a dimension, when you change settings, ...) is displayed with a text (which changes frequently).

Edited by ErfinderLabyrinth

  • ErfinderLabyrinth changed the title to Display Minecraft Standard Background (Dirt) after the loading of Forge
  • Author
10 minutes ago, diesieben07 said:

Please elaborate on what you mean by "finished loading" exactly.

Once the red background with the Mojang logo and the loading bar in the title screen where you can also select the options single player, multiplayer, ... has

  • Author

After loading Forge(defined above) I want the dirt screen with 3 texts(which are constantly changing) and after a time(variable) then the Minecraft main menu is displayed

maybe he's angry at people and wants them to read his advertisement (or bad poetry) before allowing them into the game?

or he simply forgot most important thing about making a mod - that mods are additions that other people would hopefully enjoy.

  • Author

No, I don't want to create my own main menu, I just want to display a screen between the ForgeLoading Screen and the Main Menu Screen, but then the main Menu Screen should be displayed as normal

  • Author

I have now solved it like this:

//Called when the mod is loaded
new Thread(() -> {
			while (true) {
				if (!ClientModLoader.isLoading()) {
					try {
						Thread.sleep(3000);
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
					Minecraft.getInstance().setScreen(new LoadScreen());
					return;
				}
			}
		}).start();
//Called when the main screen is to be loaded
public static void finished() {
	java.lang.System.out.println("finishedloading");
	Minecraft.getInstance().setScreen(new MainMenuScreen());

}

I realize that this only works with the client and not on the server

But are there any other problems besides the one mentioned above?

  • Author

1. Die drei Sekunden sind dafür da, da wenn ClientModLoader.isLoading() false ist, es trotzdem noch kurz braucht, bis man mit der Methode Minecraft#setScreen erfolgreich einen Screen anzeigen kann.

2. Der Thread fragt dauerhaft, ob Forge mit dem Laden fertig sei und wenn Forge mit dem Laden fertig ist wartet es 3 Sekunden(Begründung siehe 1.) und lädt den Load Screen. Wenn die Load-Engine fertig ist, wird die Methode finished() aufgerufen, dieser dann den Hauptbildschirm ladet.

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.