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

Sorry for my bad English, I'm from Poland :P.

 

Hello :D

I'd like to create custom main menu to minecraft. I have search tutorials, but I don't find something that an help me. I found Main Menu API by kingbdogz, but I've no idea how to use it (add to my mod).

 

I'd like to edit the buttons,  change background (without edit the vanilla code and assets!) and other things (like a text and add images).

 

So, help...

  • Author

Ok, I've create my tick handler class, but I've no idea, how to check if the currently open screen is the main menu.

 

PS. Where are the vanilla class with drawing main menu? I can't find :(

  • Author

So, I've problem with:

if (Minecraft.currentScreen != null && Minecraft.currentScreen.getClass() == GuiMainMenu.class){
fontRender.drawStringWithShadow("text", x, y, color);
}};

 

When I add it, Minecraft crashing. Eclipse tell me to change currentScreen to static, but in vanilla code :C

  • Author

Ok, I've learned about it :P So, now I've that, what I need, but...

I can use GL11 to draw my main menu, but the buttons from... vanilla is still work. So, I've tried to change the screen to my own. I did it, but Minecraft crashing. I think it's because I don't include functions in my guiMainMenu ;P (Eclipse not asking about create them) I don't now how to start. I tried copy the vanilla guiMainMenu, but I've a lot of errors :C

 

My code in tickHandler:

//...
if (mc.currentScreen != null && mc.currentScreen.getClass() == GuiMainMenu.class){
//fontRender.drawStringWithShadow("Mainmenu", x, y, color);
mc.currentScreen = new GuiRpgMainMenu();	         
}
//...

 

I can't test it in vanilla guis, because they need a lot of parameters.

 

So, now my problem is how to code my own screen class. Tutorials, ideas, anything will help :D

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.