Jump to content

When opening my GUI hotbar isn't rendering


Recommended Posts


I'm planning to make a mod in 1.15.2 so i've followed a tutorial to know how to make a tileEntity with a functional GUI, it worked but somehow it stopped and after copy/paste all the code and adapting it, it still don't work.

Here is the GitHub repo :https://github.com/RelativeCommand/chemistrymod/tree/main/OneDrive/Documents/MinecraftModding/ChemistryMod

I've noticed that the name i've set for the gui isn't rendering too so maybe it's something from the class where i've set this ?

I really don't know what to do right know after "rewriting" the all thing.

Here is a pic of the problem



Edited by RelativeCommand
Link to comment
Share on other sites

You @Override drawGuiContainerForegroundLayer but you make it do nothing (its usually the place where you would want to draw the title of your screen). Also your image is not blitted correctly, see the cut at the bottom?

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

Link to comment
Share on other sites

Wow, i've just seen your message thank you !

I fixed the "Inventory" and the name that were missing for the GUI and now slots are aligned with the GUI yaay.

but i can't figure out how to draw my hotbar ^^'

private void drawHotbar(int startPlayerInvX, int slotSizePlus2, int hotbarY, final IItemHandler playerInventoryHandler){
        //int hotbarY = 170;
        for(int collumn = 0; collumn < 9 ; ++collumn){
            addSlot(playerInventoryHandler, collumn, startPlayerInvX + (collumn* slotSizePlus2), hotbarY);


Here is what i tried in my "container" class with playerInventoryHandler = new InvWrapper(playerInventory) but still it doesn't work

Could you please explain me what's wrong ? 


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.

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.


  • Create New...

Important Information

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