Jump to content

Minecraft 1.16.4 create GUI with right click on custom block


chickenwigslp

Recommended Posts

Hello there,

I am a beginner in Minecraft modding and realy need help.
So can you please tell me how to create a GUI that opens up if u right click a custom block?
In the GUI you should be able to put in 3 Items and proceed them into 1.
I saw many tutorials and read a lot but I still don't understand how this works.

Link to comment
Share on other sites

Sorry I can't find any premade tutorials for 1.17 at the moment. It really depends on the version of forge you are using. But here's the rundown:

You want to look at classes such as BeaconBlock, or ChestBlock, BeaconMenu, etc. to help you with these steps, but you need to do the following:
1. Make a block extending BaseEntityBlock (BeaconBlock)
2. Make a block entity for it (BeaconTileEntity)
3. Make a menu for it (BeaconMenu)
4. Make a screen for it (BeaconScreen)

I know it's a little complex, but I'm sure you can find tutorials online, or if someone else comes in to help.

Edited by Majd123mc
<1.16 blockentities are tileentities
Link to comment
Share on other sites

3 hours ago, Majd123mc said:

Sorry I can't find any premade tutorials for 1.17 at the moment. It really depends on the version of forge you are using. But here's the rundown:

read the topic again its 1.16.4 and not 1.17 -> the class names being wrong, since he use mcp and not moj mappings

 

3 hours ago, MFMods said:

tile entity may not be needed at all.

it is required if you want to store data (like a Inventory)

Link to comment
Share on other sites

3 hours ago, Luis_ST said:

read the topic again its 1.16.4 and not 1.17 -> the class names being wrong, since he use mcp and not moj mappings

Whoops! Sorry, my fault.

7 hours ago, MFMods said:

tile entity may not be needed at all.

But yes, a block entity (tile entity in 1.16-) *is* needed for storing data (i.e. furnace). But I think what OP is doing is making an item combiner, which doesn't need one

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.