Skip to main content
Version: 26.1.x (Next)

Modpack Authors

Modpack creators​

Your layout is saved under sidebar.buttons in ftblibrary-client.json5. To ship a default layout with your pack, arrange the sidebar in-game and then include config/ftblibrary-client.json5 in your modpack. Each entry is keyed by the button ID:

{
sidebar: {
buttons: {
"ftblibrary:toggle/day": { enabled: false, x: 1 },
"ftbquests:quests": { enabled: true, x: 0, y: 0 }
}
}
}

You can also use a resource pack to override a button's JSON file, for example to set requires_op to true or change its sort_index. To hide a button by default, set enabled: false for it in sidebar.buttons as shown above.

Adding your own buttons​

Any mod or resource pack can add a sidebar button by adding a JSON file at assets/<namespace>/sidebar_buttons/<path>.json. The button ID is <namespace>:<path>. For example, assets/ftblibrary/sidebar_buttons/toggle/day.json adds the button ftblibrary:toggle/day.

FieldRequiredDefaultDescription
iconYesThe button's icon (see Icons)
clickYesA list of actions to run when the button is clicked (see Click actions)
shift_clickNoA list of actions to run when the button is shift-clicked
default_enabledNotrueCurrently has no effect. Use sidebar.buttons in the client config to hide buttons by default
sort_indexNo0The button's position in the sidebar. Lower numbers come first
tooltipNoA list of text components added to the tooltip
shift_tooltipNoA list of text components added to the tooltip while holding Shift
requires_opNofalseOnly show the button to players with op permissions
required_modsNoA list of mod IDs. The button only shows when all of them are loaded
loading_screenNofalseShow a loading screen while the click action runs
environment_conditionNoThe name of an environment variable. The button only shows when that variable is set. Prefix it with ! to show the button only when the variable is not set

The button's name comes from the language key sidebar_button.<namespace>.<path>, with / replaced by .. If you add a sidebar_button.<namespace>.<path>.tooltip key, it is shown as extra tooltip text while holding Shift.

Here is the button that sets the time to day:

{
"icon": ["ftblibrary:textures/icons/toggle_day.png"],
"sort_index": 200,
"click": ["command:/time set minecraft:day"],
"requires_op": true
}

Click actions​

Each action in click and shift_click is a string:

ActionExampleDescription
command:command:/ftbquests open_bookRuns a command as the player
http: / https:https://feed-the-beast.comOpens a URL. The player is asked to confirm first if their "Chat Links Prompt" setting is on
file:file:/path/to/file.txtOpens a file on the player's computer
custom:custom:ftbteams:open_guiSends a custom click event that a mod can handle

Any other value of the form namespace:path, such as ftbteams:open_gui, is also sent as a custom click event.

Icons​

icon is a list of icon strings, drawn on top of each other in order. Each string can be one of:

IconExampleDescription
Textureftblibrary:textures/icons/toggle_day.pngA texture file. The path must end in .png or .jpg
Spriteftblibrary:icons/settingsA sprite from the GUI texture atlas (any ID that doesn't end in .png or .jpg)
Itemitem:minecraft:diamondAn item's icon
Colorcolor:#FF0000A solid color