Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/lDEVinux/eaglercraft/llms.txt

Use this file to discover all available pages before exploring further.

The Eaglercraft browser client is configured via the window.eaglercraftOpts object in index.html. Set it before calling main() to customize the server list, relay list, asset overrides, and more.
index.html
window.eaglercraftOpts = {
  container: "game_frame",
  assetsURI: "assets.epk",
  serverWorkerURI: "worker_bootstrap.js",
  worldsFolder: "TEST",
  assetOverrides: {
    "records/wait.mp3": "wait.mp3",
    "records/mellohi.mp3": "https://stream.nightride.fm/chillsynth.m4a"
  },
  servers: [
    { serverName: "Local Test Server", serverAddress: "localhost:25565", hideAddress: false }
  ],
  relays: [
    { addr: "wss://relay.deev.is/", name: "lax1dude relay #1", primary: true }
  ],
  mainMenu: {
    splashes: ["Darviglet!", "You Eagler!"],
    eaglerLogo: false
  }
};
main();

Top-Level Fields

container
string
required
The id of the DOM element that the game canvas will be rendered into. In the reference index.html, the <body> tag itself carries id="game_frame" so the game fills the entire viewport.
assetsURI
string
required
URL (relative or absolute) to the assets.epk file. This EPK archive contains all game textures, sounds, and other resources loaded at startup.
serverWorkerURI
string
required
URL to worker_bootstrap.js, the Web Worker script used to run the integrated singleplayer server in a background thread. Must be present even if you only intend to run multiplayer.
worldsFolder
string
required
The localStorage key prefix used to store singleplayer world data in the browser. Change this value if you want worlds saved under this client to be isolated from worlds saved under another client on the same domain. The reference stable-download client uses "MAIN"; the development client uses "TEST".
joinServer
string
When set, the client automatically connects to this server address as soon as the player finishes choosing a username and skin, skipping the main menu. Accepts a host:port string. This field is also set automatically when the ?server= URL query parameter is present — see Auto-Join URL Parameter below.

servers Array

Pre-populate the in-game Multiplayer server list by providing one or more server entry objects:
{
  serverName: "My Server",    // Display name in the server list
  serverAddress: "host:port", // WebSocket address
  hideAddress: false          // If true, hides address from players
}
Add multiple entries to pre-populate the Multiplayer server list for your players. Players can still add or remove servers after joining.

relays Array

Relays are WebSocket servers used to broker LAN world connections between players. Provide one or more relay objects:
{
  addr: "wss://relay.deev.is/",  // WebSocket URL of relay server
  name: "lax1dude relay #1",     // Display name in Network Settings
  primary: true                   // Whether this is the default relay
}
Only one relay should have primary: true. In the reference implementation, a random relay is selected as primary to distribute load across the available relay pool:
const relayId = Math.floor(Math.random() * 3);
relays: [
  { addr: "wss://relay.deev.is/",             name: "lax1dude relay #1", primary: relayId == 0 },
  { addr: "wss://relay.lax1dude.net/",        name: "lax1dude relay #2", primary: relayId == 1 },
  { addr: "wss://relay.shhnowisnottheti.me/", name: "ayunami relay #1",  primary: relayId == 2 }
]

assetOverrides

Override individual files within the EPK archive at runtime without recompiling. Keys are the paths of files inside the EPK archive; values are replacement URLs (relative or absolute, including live audio streams):
assetOverrides: {
  "records/wait.mp3": "wait.mp3",                                     // local file
  "records/mellohi.mp3": "https://stream.nightride.fm/chillsynth.m4a" // remote stream
}
This is most commonly used to replace in-game music tracks. Setting a key’s value to an empty string "" suppresses that asset entirely (e.g., to disable the panorama blur on the title screen with "title/no-pano-blur.flag": ""). For a deeper dive, see Asset Overrides (No EPK Recompile). Controls cosmetic elements of the title screen:
FieldTypeDescription
splashesstring[]Array of splash text strings displayed randomly on the title screen (the yellow rotating text).
eaglerLogobooleanWhen true, shows the Eagler logo on the title screen. Set to false in the reference client.
mainMenu: {
  splashes: [
    "Darviglet!", "eaglerenophile!", "You Eagler!", "Yeeeeeee!", "yeee",
    "EEEEEEEEE!", "You Darvig!", "You Vigg!", ":>", "|>", "You Yumpster!"
  ],
  eaglerLogo: false
}

Auto-Join URL Parameter

The ?server= query string sets joinServer automatically, letting you create direct-connect links to your server. For example:
https://your-client.example.com/?server=play.example.com:25565
This is implemented in index.html immediately after the eaglercraftOpts object is defined:
index.html
var q = window.location.search;
if(typeof q === 'string' && q.startsWith("?")) {
  q = new URLSearchParams(q);
  var s = q.get("server");
  if(s) window.eaglercraftOpts.joinServer = s;
}
The player will be taken directly to the server connection screen after selecting their username and skin, bypassing the main menu entirely.

Build docs developers (and LLMs) love