Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16.1] Custom GUI For Custom Block
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
tvm_monster

[1.16.1] Custom GUI For Custom Block

By tvm_monster, August 22, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

tvm_monster    0

tvm_monster

tvm_monster    0

  • Tree Puncher
  • tvm_monster
  • Members
  • 0
  • 13 posts
Posted August 22, 2020 (edited)

I am making a mod where I trying to make some custom gui's for a few blocks that i made, I just need help with one gui for one block then i think i can do the others. Thx in advance for helping me with this.

Edited August 22, 2020 by tvm_monster
  • Quote

Share this post


Link to post
Share on other sites

Beethoven92    69

Beethoven92

Beethoven92    69

  • Dragon Slayer
  • Beethoven92
  • Members
  • 69
  • 556 posts
Posted August 22, 2020

So, you will need the class for your block (obviously), a tile entity (implementing INamedContainerProvider) for your block's logic, a class representing your container (which extends Container) to specify how the GUI interacts, and finally a class extending from ContainerScreen which actually draws your GUI on screen. Lot of things to implement huh? Take a look at Cadiboo example mod..he has some examples for blocks with custom GUIs, and also take a look here: https://greyminecraftcoder.blogspot.com/2020/04/containers-1144.html

  • Quote

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

A little fun project: https://www.curseforge.com/minecraft/mc-mods/two-players-one-horse

Share this post


Link to post
Share on other sites

tvm_monster    0

tvm_monster

tvm_monster    0

  • Tree Puncher
  • tvm_monster
  • Members
  • 0
  • 13 posts
Posted August 22, 2020

Thx I will look into that.

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      [1.16.4] How i can open a container by clicking on my mob

      By diesieben07 · Posted 16 minutes ago

      When calling openGui, write the entity ID (Entity#getEntityId) to the PacketBuffer. Then in your IContainerFactory read it back from the buffer and use World#getEntityByID to get the entity.
    • XenoPyax
      [1.16.4] Replace vanilla block texture

      By XenoPyax · Posted 27 minutes ago

      my bad I was looking at the wrong project, it was my 1.8 project found it in the 1.16 one thanks!  
    • XenoPyax
      [1.16.4] Replace vanilla block texture

      By XenoPyax · Posted 28 minutes ago

      this is all I could find in TextureAtlasSprite : TextureUtil.uploadTextureMipmap
    • Klarks
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks · Posted 28 minutes ago

      Ok i messed up few things, idk where did i get a player inventory parameter in openGui. So thanks it's working now But how i can correctly get the entity inside the container class to get capabilities to add a slot. I know how to do it with the player i can just get the player from the player inventory but with a mob i am not sure. Should i get the entity from world somehow?  
    • basicsid
      [1.16.4] Looking to add trades to villagers/wandering traders

      By basicsid · Posted 33 minutes ago

      Essentially I'm looking to add a trade option for either villagers or the wandering traders. Most of the resources I've found online are either several versions out of date, or are for the Fabric API.   Any pointers would be greatly appreciated!
  • Topics

    • Klarks
      25
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks
      Started Saturday at 09:56 PM

    • XenoPyax
      6
      [1.16.4] Replace vanilla block texture

      By XenoPyax
      Started 2 hours ago

    • basicsid
      0
      [1.16.4] Looking to add trades to villagers/wandering traders

      By basicsid
      Started 34 minutes ago

    • LK1905
      24
      [1.16.4] How do I correctly sync capability data between Client and server?

      By LK1905
      Started December 31, 2020

    • TeamDman
      2
      [1.16.4] onBlockAdded being called twice on server side

      By TeamDman
      Started 2 hours ago

  • Who's Online (See full list)

    • Choonster
    • diesieben07
    • XenoPyax
    • monkeysHK
    • LexManos
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16.1] Custom GUI For Custom Block
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community