Jump to content

Recommended Posts

Posted (edited)

Hi,

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

image.png.a4c46fddbffaccc3dafa5461b2daf3f3.png

Thanks

Edited by RelativeCommand
Posted

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){
        //hotbar
        //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 ? 

Thanks 

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.