Jump to content

Recommended Posts

Posted

So one of the feature's in the mod I'm working on is lore books. Basically books that can be found while exploring or killing mobs that give lore about things in the world and about my mod. The issue I'm having is that I've never modded a gui before, and I have no idea where to start. I found a tutorial online, but it was very outdated (1.7.10). Where would I start with a gui like this?

 

Thanks for any help!

Posted

Take a look at the vanilla screens, such as the ReadBookScreen class. All you really need to get started is to create a class that extends the Screen class, and then you can open the gui with Minecraft.displayGuiScreen() (which you can call for example in the onItemRightClick() method in your item).

  • Like 1
Posted (edited)
9 hours ago, vemerion said:

Take a look at the vanilla screens, such as the ReadBookScreen class. All you really need to get started is to create a class that extends the Screen class, and then you can open the gui with Minecraft.displayGuiScreen() (which you can call for example in the onItemRightClick() method in your item).

Would it be possible for you to go a little more in depth? I'm new to minecraft modding (I know a bit of java), and I'm not quite sure how to actually go about that

Edited by Bottled_Water
Posted
5 hours ago, Bottled_Water said:

Would it be possible for you to go a little more in depth? I'm new to minecraft modding (I know a bit of java), and I'm not quite sure how to actually go about that

Vemerion already suggested you basically everything you need in order to achieve what you are trying to do. Where are your doubts coming from? It would be better if you asked for specific bits of information

  • Like 1

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

Posted
32 minutes ago, Beethoven92 said:

Vemerion already suggested you basically everything you need in order to achieve what you are trying to do. Where are your doubts coming from? It would be better if you asked for specific bits of information

It took me a while, but I figured it out. Again, I'm new to minecraft modding, and have little experience with any kind of gui creation so it was a little confusing.

  • Like 1

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



×
×
  • Create New...

Important Information

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