Posted December 16, 20204 yr Hello! I tried to implement my first GUI, which functionality is similar to the vanilla crafting table. I got almost everything working: I got a block, a container and a screen all registered and the container also opens, when i right-click on my new block. However the screen is missing the background image and has a wrong title/name at the top. This lets me believe, that my error lies within the resource location or my assets, but I'm sure I named everything correctly. So please take a look and help me out. Thank you in advance Here is my github: https://github.com/Tavi007/Materia (you can find the screen registration in the client.init package) Edited December 16, 20204 yr by Tavi007
December 16, 20204 yr 4 hours ago, Tavi007 said: However the screen is missing the background image in the drawGuiContainerBackgroundLayer method you need to call blit() after binding the texture to actually draw it to the screen. Binding the texture simply sends the image to the gpu, but doesn't draw it. 4 hours ago, Tavi007 said: and has a wrong title/name at the top. in the drawGuiContainerForegroundLayer you don't need to draw the title, calling the method on super already does that. super.drawGuiContainerForegroundLayer draws both the inventory title and the player inventory title Edited December 16, 20204 yr by kiou.23
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.