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
  • Adding options to the options menu.
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
user768595

Adding options to the options menu.

By user768595, November 25, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

user768595    0

user768595

user768595    0

  • Tree Puncher
  • user768595
  • Members
  • 0
  • 1 post
Posted November 25, 2020

I need to add a option to the options menu. Is there an api or something for doing this? I'm currently using awkward way which I'm not sure will be capable with other mods.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7697

diesieben07

diesieben07    7697

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7697
  • 56420 posts
Posted November 25, 2020

There is no API. I would recommend you make your own screen which is reachable from the mod options.

To do this use ModLoadingContext#registerExtensionPoint with ExtensionPoint.CONFIGGUIFACTORY, which allows you to register your own configuration GUI.

  • 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 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      When I try to run my mod after I just added Deferred Registries it crashes

      By diesieben07 · Posted 8 minutes ago

      You need to change one of them, yes.
    • ThisIsNotOriginal
      When I try to run my mod after I just added Deferred Registries it crashes

      By ThisIsNotOriginal · Posted 16 minutes ago

      so do i change the name in my ItemsList?
    • diesieben07
      [1.16.5] Help with custom Backpack (slot background and mouse wheel move)

      By diesieben07 · Posted 26 minutes ago

      I do not understand. How is the offhand slot relevant regarding the background color of your slot?   Assuming you want a keyboard key to open the GUI: Make a KeyBinding. Use ClientTickEvent to check if its pressed. If it is, send a packet to the server, which then calls NetworkHooks#openGui. You can preemptively also open it on the client to hide the latency of the two network roundtrips.
    • diesieben07
      When I try to run my mod after I just added Deferred Registries it crashes

      By diesieben07 · Posted 28 minutes ago

      That is not how you make a Git repo. At all.   This creates a BlockItem for all of your blocks. One of your blocks has the registry name "copper_ore", hence this will create a BlockItem with registry name "copper_ore". This then creates another Item with registry name "copper_ore". This is not allowed, registry names must be unique.
    • Extrupt
      Forge won't fully download

      By Extrupt · Posted 30 minutes ago

      thanks for the help! it worked!
  • Topics

    • ThisIsNotOriginal
      19
      When I try to run my mod after I just added Deferred Registries it crashes

      By ThisIsNotOriginal
      Started 16 hours ago

    • Luis_ST
      3
      [1.16.5] Help with custom Backpack (slot background and mouse wheel move)

      By Luis_ST
      Started Yesterday at 07:47 AM

    • Extrupt
      5
      Forge won't fully download

      By Extrupt
      Started 1 hour ago

    • HDMI_Steckdose
      1
      Forge error Forge won't open

      By HDMI_Steckdose
      Started 37 minutes ago

    • Retsal
      7
      [1.16.x] Custom block as a shop

      By Retsal
      Started Yesterday at 01:04 PM

  • Who's Online (See full list)

    • We Random
    • diesieben07
    • -MCS_Gaming-
    • Moohoy
    • PlasmaPig13
    • WooBoo
    • Katie328
    • ThisIsNotOriginal
    • reu_24
    • troublemaker_47
    • CAS_ual_TY
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Adding options to the options menu.
  • Theme

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