FancyMenu allows you to get and set Minecraft game settings (options) using different UI elements. This guide will show you how to use buttons, sliders, and tickers to work with Minecraft options in your custom menu layouts.
Minecraft has many built-in options that control everything from graphics settings to sound volume. FancyMenu lets you access these options by their names.
Some common option names include:
soundCategory_master
- Main volumesoundCategory_music
- Music volumesoundCategory_ambient
- Ambient sounds volumesoundCategory_players
- Player sounds volumesoundCategory_blocks
- Block sounds volumefov
- Field of viewgamma
- BrightnessrenderDistance
- Render distanceYou can display the current value of any Minecraft option using a special placeholder.
The placeholder looks like this:
{"placeholder":"minecraft_option_value","values":{"name":"option_name"}}
Replace option_name
with the actual option name you want to display.
Buttons can be used to set specific values to Minecraft options.
renderDistance
)16
)Creating a button that sets render distance to 16 chunks:
renderDistance
16
Sliders are perfect for options with a range of values, like volume settings or brightness.
$$value
(this special variable contains the current slider value){"placeholder":"minecraft_option_value","values":{"name":"option_name"}}
To show the current option value in the slider label, use:
Volume: {"placeholder":"minecraft_option_value","values":{"name":"soundCategory_master"}}
To show a percentage (useful for volume):
Volume: {"placeholder":"calc","values":{"expression":"$$value * 100.0","decimal":"false"}}%
Tickers are invisible elements that can change options automatically on a schedule.
Setting gamma (brightness) to maximum when the menu loads:
gamma
1.0
Here are some common cases for what you can do when using FancyMenu to set and get Minecraft options.
Volume sliders are a common use for the Minecraft option integration. Here's how to make a custom music volume slider:
soundCategory_music
$$value
{"placeholder":"minecraft_option_value","values":{"name":"soundCategory_music"}}
Music: {"placeholder":"calc","values":{"expression":"$$value * 100.0","decimal":"false"}}%
You can create similar sliders for other sound categories:
soundCategory_master
soundCategory_music
soundCategory_ambient
soundCategory_blocks
soundCategory_players
soundCategory_weather
Field of View (FOV) is an important graphics setting that determines how wide your view is in the game. Here's how to create a custom FOV slider with descriptive labels like "Normal", "Wide", etc.
First, we need a ticker that will check the current FOV value and set a variable with the appropriate description:
Now we need to set up multiple actions for different FOV ranges using loading requirements. Here's what your action script structure should look like:
▶ Action Script
│
├─▶ IF (FOV < 71)
│ └─■ Set Variable Value: fov_text:Narrow
│
├─▶ ELSE-IF (FOV < 86)
│ └─■ Set Variable Value: fov_text:Normal
│
├─▶ ELSE-IF (FOV < 101)
│ └─■ Set Variable Value: fov_text:Wide
│
└─▶ ELSE
└─■ Set Variable Value: fov_text:Quake Pro
Let's set up each part:
{"placeholder":"minecraft_option_value","values":{"name":"fov"}}
fov_text:Narrow
{"placeholder":"minecraft_option_value","values":{"name":"fov"}}
fov_text:Normal
{"placeholder":"minecraft_option_value","values":{"name":"fov"}}
fov_text:Wide
fov_text:Quake Pro
fov
$$value
{"placeholder":"minecraft_option_value","values":{"name":"fov"}}
Set the slider label to display both the descriptive text and the numeric value:
FOV: {"placeholder":"getvariable","values":{"name":"fov_text"}} ({"placeholder":"minecraft_option_value","values":{"name":"fov"}})
This label will show the current FOV description (Narrow, Normal, Wide, or Quake Pro) followed by the exact numeric value in parentheses.
fov_text
variableYou can also display current option values in Text elements:
{"placeholder":"minecraft_option_value","values":{"name":"option_name"}}
For example, to show the current render distance:
Current render distance: {"placeholder":"minecraft_option_value","values":{"name":"renderDistance"}} chunks
You can find the names of all available options by:
Valid Values: Not all options accept all values. For example:
pauseOnLostFocus
accept "true" or "false"Testing: Always test your settings to make sure they work as expected!
Visual Feedback: Give users visual feedback about the current value using the placeholders described above.