Jump to content

Recommended Posts

Posted
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.

Posted
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? 

Posted
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.

Posted
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.

Posted
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

Posted
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.

Posted
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

Posted
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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

×
×
  • Create New...

Important Information

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