PackMenu Mod — Guide
Custom Buttons
The JSON Button is the primary interface for adding menu content. Each button specifies a position, texture, and action. Buttons can also be created without actions to serve as decorative still images.
Button Schema
| Key | Type | Requirement | Description |
|---|---|---|---|
x |
int | Mandatory | The x position of the button in pixels, adjusted against the anchor point. |
y |
int | Mandatory | The y position of the button in pixels, adjusted against the anchor point. |
width |
int | Mandatory | The width of the button in pixels. |
height |
int | Mandatory | The height of the button in pixels. |
anchor |
AnchorPoint | Optional | The anchor point for the button. Defaults to default. |
sprites |
WidgetSprites | Optional | The sprites for the button. Defaults to vanilla sprites. |
icon |
ButtonIcon | Optional | An optional button icon to draw. |
hover_icon |
ButtonIcon | Optional | The icon drawn when hovered. Defaults to icon. |
action |
ButtonAction | Mandatory | The action performed on click. |
text |
ButtonText | Optional | The text to draw on the button. |
hover_text |
ButtonText | Optional | The text to draw when hovered. Defaults to text. |
active |
boolean | Optional | If the button can be clicked. Defaults to true. |
scale_x |
float | Optional | Scale factor for x values. |
scale_y |
float | Optional | Scale factor for y values. |
Anchor Points
Anchor points determine the origin (0,0) for the button's X and Y coordinates:
* top_left, top_center, top_right
* middle_left, center, middle_right
* bottom_left, bottom_center, bottom_right
Button Actions
| Action Type | Description |
|---|---|
packmenu:open_url |
Opens a specified URL in the user's default browser. |
packmenu:connect_to_server |
Automatically connects the player to a specific server IP. |
packmenu:quit |
Closes the Minecraft client. |
packmenu:open_gui |
Opens a specific Minecraft screen (e.g., Options, Multiplayer, Language). |
packmenu:open_folder |
Opens a local folder within the Minecraft directory. |
Example: Sponsor Button
This example demonstrates a button anchored to the top right that opens a URL.
{
"x": -150,
"y": 0,
"width": 150,
"height": 20,
"anchor": "top_right",
"icon": {
"texture": "packmenu:icon/akliz",
"width": 150,
"height": 20
},
"action": {
"type": "packmenu:open_url",
"url": "
},
"text": {
"key": "packmenu.akliz",
"x_offset": 5
}
}
Backgrounds
The background.json file controls what is displayed behind the menu buttons. PackMenu supports three distinct background types.
Background Types
- Image: A single static texture that covers the screen.
- Panorama: A classic rotating 3D view using six cubic textures (similar to vanilla Minecraft backgrounds).
- Slideshow: A sequence of images that fade into one another over a specified duration.
Slideshow Configuration
When using the slideshow type, you can define the speed and the list of textures to cycle through.
| Key | Type | Description |
|---|---|---|
type |
string | Must be "slideshow". |
textures |
array | A list of resource locations for the images. |
duration |
int | The time in ticks each image stays on screen. |
fade_time |
int | The time in ticks for the transition between images. |
Logo Customization
The logo.json file allows you to replace the default Minecraft title logo with a custom image. This is highly useful for modpack branding.
Logo Properties
- texture: The resource location of the logo image.
- x / y: The offset from the anchor point.
- width / height: The dimensions of the logo in pixels.
- scale: A multiplier for the logo's size.
- anchor: Typically set to
top_centerfor standard title placement.
Menu Music
PackMenu allows you to override the default menu music. To do this, you must include a custom sound file in your resource pack and map it to the packmenu:music sound event in your sounds.json file.
If multiple tracks are defined for this event, the mod will randomly select one to play upon entering the main menu. This music will stop once the player enters a world or server.