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. The FOV option internally uses values from -1.0 to 1.0, but displays as 30 to 110 in the UI.
(internal_value + 1) * 40 + 30
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 actions for the FOV labels. Here's what your action script structure should look like:
▶ Action Script
│
├─▶ IF (mapped FOV = 70)
│ └─■ Set Variable Value: fov_text:Normal
│
├─▶ ELSE-IF (mapped FOV = 110)
│ └─■ Set Variable Value: fov_text:Quake Pro
│
└─▶ ELSE
└─■ Set Variable Value: fov_text:[calculated numeric value]
Let's set up each part:
{"placeholder":"calc","values":{"decimal":"false","expression":"({"placeholder":"minecraft_option_value","values":{"name":"fov"}} + 1) * 40 + 30"}}
fov_text:Normal
{"placeholder":"calc","values":{"decimal":"false","expression":"({"placeholder":"minecraft_option_value","values":{"name":"fov"}} + 1) * 40 + 30"}}
fov_text:Quake Pro
fov_text:{"placeholder":"calc","values":{"decimal":"false","expression":"({"placeholder":"minecraft_option_value","values":{"name":"fov"}} + 1) * 40 + 30"}}
fov
$$value
{"placeholder":"minecraft_option_value","values":{"name":"fov"}}
Set the slider label to simply display the FOV text variable:
FOV: {"placeholder":"getvariable","values":{"name":"fov_text"}}
This label will show:
(internal_value + 1) * 40 + 30
fov_text
variable automatically contains either the special label or the numeric valueYou 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.