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

3 minutes ago, HuskyHMC said:

Hello there everyone. I have a problem with coding my mod. I wanna can change minecraft buttons ( http://prntscr.com/fxbqzg ) with a image ( like : http://prntscr.com/fxbrcc ). So when I will press the image I should be send in the SinglePlayerGUI. How Can I do that? How I can add image and to do that action? 

 

Thank you in advance!

If I got this right you are asking how you can change what the button looks like. Make a class that extends GuiButton and override GuiButton#drawButton to instead use your image.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
8 minutes ago, Animefan8888 said:

If I got this right you are asking how you can change what the button looks like. Make a class that extends GuiButton and override GuiButton#drawButton to instead use your image.

Can you create the GuiButton#drawButton for me? How should be that if i want to add that image? 

Just now, HuskyHMC said:

Can you create the GuiButton#drawButton for me?

No, I will not write your code for you.

Just now, HuskyHMC said:

How should be that if i want to add that image?

Take a look at GuiButton

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

2 minutes ago, HuskyHMC said:

Your ResourceLocation is pointing to the minecraft domain and not your mods domain aka the modid.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
41 minutes ago, Animefan8888 said:

Your ResourceLocation is pointing to the minecraft domain and not your mods domain aka the modid.

It is pointing to the minecraft domain

Just now, HuskyHMC said:

assets/textures/gui

There is no domain there. It needs to be assets/modid(your mods id)/textures/gui. And your ResourceLocation needs to be initialized like so new ResourceLocation(modid, "textures/gui...")

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
10 minutes ago, Animefan8888 said:

There is no domain there. It needs to be assets/modid(your mods id)/textures/gui. And your ResourceLocation needs to be initialized like so new ResourceLocation(modid, "textures/gui...")

still not working

Just now, HuskyHMC said:

still not working

Show me a screenshot of your package explorer and your code for the button. And where you add the button to the Gui.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

3 minutes ago, HuskyHMC said:

https://justpaste.it/193cn this is my button code

You did not really do anything i said...

1 hour ago, Animefan8888 said:

Make a class that extends GuiButton and override GuiButton#drawButton to instead use your image.

And

17 minutes ago, Animefan8888 said:

There is no domain there. It needs to be assets/modid(your mods id)/textures/gui. And your ResourceLocation needs to be initialized like so new ResourceLocation(modid, "textures/gui...")

 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.