Jump to content

[1.15.2] How to create a screen with background and slots?


david072

Recommended Posts

Hello.

I am new to Minecraft modding.

Now, I want to open a screen when an item is right clicked. I have a class which extends Screen and if I now right click the item, you can see something happens.

But now I need to render a background texture, but after much researching I only find tutorials for older versions.

Also, I wonder how I can add slots to the screen.

 

Thanks a lot.

 

Link to comment
Share on other sites

To render a background texture, I think you should use "AbstractGui.blit".

The methods parameters may be unnamed.

To display the texture you want to display, you have to bind it with a resource location first.

Edited by Budschie
too unprecise
Link to comment
Share on other sites

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.