Posted July 4, 20205 yr 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.
July 4, 20205 yr 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 July 5, 20205 yr by Budschie too unprecise
July 4, 20205 yr see how vanilla screens do them in drawGuiContainerBackgroundLayer() slots are in the container, and screen only shows what is in that container
July 5, 20205 yr Howdy This tutorial project has some examples of screens https://github.com/TheGreyGhost/MinecraftByExample -see mbe30, mbe31, mbe32 -TGG
July 7, 20205 yr Author Ok, Guys it works now. Thanks a lot for your help. Edited July 7, 20205 yr by david072
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.