Skip to content

These docs were made completely by AI, so they might be right, or wrong, you'll need to test them yourself. This was made for a easier understanding of everything. So use at your own risk. If anything is wrong, please don't hurt to make a PR on the page you have a problem with. ON GITHUB

Settings

LCE manages settings at two levels. The Options class handles legacy Java-style game options (graphics, controls, keybindings), while the CMinecraftApp game settings system manages console-specific per-player profile settings. The Settings class provides a simple key-value property store for server configuration.

Options is the main settings container, owned by the Minecraft instance. It manages graphics preferences, input sensitivity, key bindings, and gameplay toggles.

The inner Options::Option class describes each configurable setting. It’s stored in a static array of 17 entries (the Java code originally used an enum, 4J emulated it with a class):

class Option {
const bool _isProgress; // slider-based (float value)
const bool _isBoolean; // toggle (true/false)
const wstring captionId; // localization key (e.g., "options.music")
bool isProgress() const;
bool isBoolean() const;
int getId() const; // computed as (this - options), the index in the static array
wstring getCaptionId() const;
};

Options that are neither progress nor boolean are “choice” options (cycled through a fixed set of names).

Static constantTypeLocalization keyPurpose
MUSICProgressoptions.musicMusic volume (0.0 to 1.0)
SOUNDProgressoptions.soundSound effects volume (0.0 to 1.0)
INVERT_MOUSEBooleanoptions.invertMouseInvert Y-axis
SENSITIVITYProgressoptions.sensitivityMouse/stick sensitivity
RENDER_DISTANCEChoiceoptions.renderDistanceView distance: Far, Normal, Short, Tiny
VIEW_BOBBINGBooleanoptions.viewBobbingCamera bobbing while walking
ANAGLYPHBooleanoptions.anaglyphStereoscopic 3D mode
ADVANCED_OPENGLBooleanoptions.advancedOpenglAdvanced rendering features
FRAMERATE_LIMITChoiceoptions.framerateLimitFPS cap
DIFFICULTYChoiceoptions.difficultyPeaceful, Easy, Normal, Hard
GRAPHICSChoiceoptions.graphicsFancy vs. fast graphics
AMBIENT_OCCLUSIONBooleanoptions.aoSmooth lighting
GUI_SCALEChoiceoptions.guiScaleAuto, Small, Normal, Large
FOVProgressoptions.fovField of view
GAMMAProgressoptions.gammaBrightness
RENDER_CLOUDSBooleanoptions.renderCloudsCloud rendering
PARTICLESChoiceoptions.particlesAll, Decreased, Minimal

Choice name arrays:

OptionValues
RENDER_DISTANCE_NAMES"options.renderDistance.far", "options.renderDistance.normal", "options.renderDistance.short", "options.renderDistance.tiny"
DIFFICULTY_NAMES"options.difficulty.peaceful", "options.difficulty.easy", "options.difficulty.normal", "options.difficulty.hard"
GUI_SCALE"options.guiScale.auto", "options.guiScale.small", "options.guiScale.normal", "options.guiScale.large"
FRAMERATE_LIMITS(defined in .cpp, values vary)
PARTICLES(0 = all, 1 = decreased, 2 = minimal)

Ambient occlusion constants: AO_OFF = 0, AO_MIN = 1, AO_MAX = 2.

// Audio
float music; // 0.0 to 1.0
float sound; // 0.0 to 1.0
// Input
float sensitivity; // mouse/stick sensitivity
bool invertYMouse; // invert Y-axis look
// Graphics
int viewDistance; // 0=far, 1=normal, 2=short, 3=tiny
bool bobView; // camera bobbing
bool anaglyph3d; // stereoscopic 3D
bool advancedOpengl; // advanced GL features
int framerateLimit; // FPS cap setting
bool fancyGraphics; // fancy vs fast graphics
bool ambientOcclusion; // smooth lighting
bool renderClouds; // show clouds
int guiScale; // 0=auto, 1=small, 2=normal, 3=large
int particles; // 0=all, 1=decreased, 2=minimal
float fov; // field of view
float gamma; // brightness
// Gameplay
int difficulty; // 0=peaceful, 1=easy, 2=normal, 3=hard
bool hideGui; // hide the HUD
bool thirdPersonView; // third-person camera active
bool renderDebug; // debug overlay active
// Flight (creative/spectator)
bool isFlying; // currently flying
bool smoothCamera; // cinematic camera mode
bool fixedCamera; // locked camera
float flySpeed; // creative flight speed
float cameraSpeed; // camera movement speed
// Network
wstring lastMpIp; // last multiplayer IP address
// Skin
wstring skin; // selected skin name

Options holds 14 KeyMapping instances in a fixed array:

static const int keyMappings_length = 14;
KeyMapping *keyMappings[keyMappings_length];

Each mapping stores a name (wstring) and virtual key code (int):

FieldDefault action
keyUpMove forward
keyDownMove backward
keyLeftStrafe left
keyRightStrafe right
keyJumpJump
keyBuildPlace block / use item
keyDropDrop item
keyChatOpen chat
keySneakSneak
keyAttackAttack / break
keyUseUse
keyPlayerListPlayer list
keyPickItemPick block
keyToggleFogCycle fog distance
MethodPurpose
Options(minecraft, workingDirectory)Full constructor with file path for persistence
Options()Default constructor
init()4J addition: initializes member variables
set(Option*, float)Set a progress option value
toggle(Option*, int dir)Cycle a choice/boolean option
getProgressValue(Option*)Read a float option
getBooleanValue(Option*)Read a boolean option
getMessage(Option*)Get the display string for an option’s current value
getKeyDescription(int)Get the name of a key binding by index
getKeyMessage(int)Get the display message for a key binding
setKey(int, int)Change a key binding
load()Load settings from file
save()Save settings to file
isCloudsOn()Returns renderClouds

Options are saved to a file in the working directory (stored as optionsFile). The load() method reads key-value pairs using BufferedReader, InputStreamReader, and FileInputStream. The save() method writes them back through FileOutputStream and DataOutputStream. The readFloat() helper parses float values from the file format.

The CMinecraftApp class manages per-player profile settings through the eGameSetting enum and GAME_SETTINGS struct. These are the settings that actually matter on console because the Options class is mainly for the Java-style settings used by the Win64 port.

SettingTypeNotes
eGameSetting_MusicVolumeByte0-255
eGameSetting_SoundFXVolumeByte0-255
eGameSetting_GammaByteBrightness
eGameSetting_DifficultyByte0-3 (Peaceful through Hard)
eGameSetting_Sensitivity_InGameByteGameplay stick sensitivity
eGameSetting_Sensitivity_InMenuByteMenu cursor sensitivity
eGameSetting_ViewBobByteCamera bobbing toggle
eGameSetting_ControlSchemeByteController layout (different button mappings)
eGameSetting_ControlInvertLookByteInvert Y-axis look
eGameSetting_ControlSouthPawByteLeft-handed controls (swaps sticks)
eGameSetting_SplitScreenVerticalByteVertical split-screen layout (vs horizontal)
eGameSetting_GamertagsVisibleByteShow player names in-world
eGameSetting_AutosaveByteAuto-save enabled
eGameSetting_DisplaySplitscreenGamertagsByteShow names in split-screen specifically
eGameSetting_HintsByteShow gameplay hints/tips
eGameSetting_InterfaceOpacityByteHUD transparency level
eGameSetting_TooltipsByteShow item tooltips
eGameSetting_CloudsByteCloud rendering toggle
eGameSetting_OnlineByteOnline mode
eGameSetting_InviteOnlyByteInvite-only sessions
eGameSetting_FriendsOfFriendsByteAllow friends of friends to join
eGameSetting_DisplayUpdateMessageByteShow update notifications
eGameSetting_BedrockFogByteBedrock fog effect
eGameSetting_DisplayHUDByteHUD visibility
eGameSetting_DisplayHandByteFirst-person hand visibility
eGameSetting_CustomSkinAnimByteCustom skin animations
eGameSetting_DeathMessagesByteDeath messages in chat
eGameSetting_UISizeByteUI scale
eGameSetting_UISizeSplitscreenByteUI scale in split-screen
eGameSetting_AnimatedCharacterByteAnimated character on menu screen
eGameSetting_PS3_EULA_ReadBytePS3: EULA accepted flag
eGameSetting_PSVita_NetworkModeAdhocByteVita: ad-hoc networking mode
eGameSetting_FullscreenByteWindows 64: fullscreen mode

All settings are stored as unsigned bytes (0-255), even for boolean toggles (0 or 1). The enum values are sequential starting from 0.

Game settings are stored in a fixed-size block at the start of profile data:

static const int GAME_SETTINGS_PROFILE_DATA_BYTES = 204;
static const int GAME_DEFINED_PROFILE_DATA_BYTES = 972; // per user

The 204-byte GAME_SETTINGS struct at the start holds all the settings values. The 204-byte limit is kept for backward compatibility with pre-TU5 save data. The remaining bytes in the 972-byte GAME_DEFINED_PROFILE_DATA_BYTES block store statistics and achievement data (with room for extended achievements by doubling).

The profile data for all users is saved together as GAME_DEFINED_PROFILE_DATA_BYTES * XUSER_MAX_COUNT bytes.

void SetGameSettings(int iPad, eGameSetting eVal, unsigned char ucVal);
unsigned char GetGameSettings(int iPad, eGameSetting eVal);
void ActionGameSettings(int iPad, eGameSetting eVal);
void CheckGameSettingsChanged(bool bOverride5MinuteTimer = false, int iPad = XUSER_INDEX_ANY);
void ApplyGameSettingsChanged(int iPad);

SetGameSettings() writes a value for a specific pad/player. GetGameSettings() reads it. ActionGameSettings() applies a setting immediately (for settings that need instant feedback like volume changes).

Settings changes are batched and applied through ApplyGameSettingsChanged(). The system checks for changes periodically (with a 5-minute timer controlled by CheckGameSettingsChanged()) or when explicitly requested with bOverride5MinuteTimer = true. The XUSER_INDEX_ANY constant means “all users.”

Host-controlled world settings stored in the save data. These are per-world, not per-player.

OptionDescription
eGameHostOption_DifficultyWorld difficulty (0-3)
eGameHostOption_OnlineGame(Unused)
eGameHostOption_InviteOnly(Unused)
eGameHostOption_FriendsOfFriendsAllow friends of friends
eGameHostOption_GamertagsShow player names
eGameHostOption_TutorialTutorial mode (special case)
eGameHostOption_GameTypeSurvival / Creative
eGameHostOption_LevelTypeDefault / Flat
eGameHostOption_StructuresGenerate structures
eGameHostOption_BonusChestSpawn bonus chest
eGameHostOption_HasBeenInCreativeTracks if creative was ever used (disables achievements)
eGameHostOption_PvPPlayer vs Player
eGameHostOption_TrustPlayersTrust all players (allow building near spawn)
eGameHostOption_TNTTNT explodes
eGameHostOption_FireSpreadsFire spreads
eGameHostOption_CheatsEnabledCommands/cheats (special case)
eGameHostOption_HostCanFlyHost flight privilege
eGameHostOption_HostCanChangeHungerHost hunger control
eGameHostOption_HostCanBeInvisibleHost invisibility
eGameHostOption_BedrockFogBedrock fog effect
eGameHostOption_NoHUDDisable HUD
eGameHostOption_AllBitmask sentinel (marks the end of the toggleable range)
eGameHostOption_DisableSavingDisable world saving

Host options are packed into a unsigned int bitmask and accessed through:

void SetGameHostOption(eGameHostOption eVal, unsigned int uiVal);
unsigned int GetGameHostOption(eGameHostOption eVal);

Some options are marked as “special case” in the code comments: Tutorial and CheatsEnabled have extra logic beyond simple boolean toggling.

CanRecordStatsAndAchievements() checks whether the current host options allow achievements. Things like creative mode (HasBeenInCreative), cheats, and certain debug flags will disable achievement recording. Once HasBeenInCreative is set, it stays set for the lifetime of that world.

The Settings class is a simple key-value property store for server configuration:

class Settings {
Settings(File* file);
void generateNewProperties();
void saveProperties();
wstring getString(const wstring& key, const wstring& defaultValue);
int getInt(const wstring& key, int defaultValue);
bool getBoolean(const wstring& key, bool defaultValue);
void setBooleanAndSave(const wstring& key, bool value);
};

It wraps an unordered_map<wstring, wstring> and provides typed getters with defaults. The integrated server uses it for configuration like server name, port, max players, etc. generateNewProperties() creates the file with defaults if it doesn’t exist. saveProperties() writes the current map back to disk.

Skin and cape selection is managed per player through CMinecraftApp:

// Skin
void SetPlayerSkin(int iPad, const wstring& name);
void SetPlayerSkin(int iPad, DWORD dwSkinId);
wstring GetPlayerSkinName(int iPad);
DWORD GetPlayerSkinId(int iPad);
// Cape
void SetPlayerCape(int iPad, const wstring& name);
void SetPlayerCape(int iPad, DWORD dwCapeId);
wstring GetPlayerCapeName(int iPad);
DWORD GetPlayerCapeId(int iPad);

Both skins and capes can be set by name (string) or by numeric ID (DWORD). The getters work both ways too.

Players can save a set of favorite skins for quick access:

void SetPlayerFavoriteSkin(int iPad, int iIndex, unsigned int uiSkinID);
unsigned int GetPlayerFavoriteSkin(int iPad, int iIndex);
unsigned char GetPlayerFavoriteSkinsPos(int iPad);
void ValidateFavoriteSkins(int iPad); // checks DLC availability

ValidateFavoriteSkins() checks that each favorited skin still comes from an available DLC pack. If a DLC gets removed or expires, the favorites pointing to it get cleared.

The HUD opacity temporarily goes back to full when the player changes hotbar selections:

void SetOpacityTimer(int iPad); // starts a 6-second (120 tick) countdown
void TickOpacityTimer(int iPad); // decrements each tick
unsigned int GetOpacityTimer(int iPad);

When GetOpacityTimer() returns a non-zero value, the HUD renders at full opacity regardless of the InterfaceOpacity setting. This gives players a brief window to see the full HUD after switching hotbar slots.

Debug options are gated behind a special input sequence:

void SetDebugSequence(const char* pchSeq);
bool DebugSettingsOn();
unsigned int GetGameSettingsDebugMask(int iPad = -1, bool bOverridePlayer = false);
void SetGameSettingsDebugMask(int iPad, unsigned int uiVal);
void ActionDebugMask(int iPad, bool bSetAllClear = false);

Debug masks are stored per player in uiDebugOptionsA[XUSER_MAX_COUNT] on the Minecraft class. The #ifdef _DEBUG_MENUS_ENABLED guard controls whether debug menus are compiled in. SetDebugSequence() sets the button sequence needed to unlock debug options. DebugSettingsOn() returns whether the sequence has been entered.

Language selection is per-player:

void SetMinecraftLanguage(int iPad, unsigned char ucLanguage);
unsigned char GetMinecraftLanguage(int iPad);

The eMCLang enum defines all supported languages. It’s a big list:

RangeLanguages
CoreEnglish (US, GB, IE, AU, NZ, CA), Japanese, German (DE, AT, CH), French (FR, CA, BE, CH)
EuropeanSpanish (ES, MX), Italian, Korean, Portuguese (PT, BR), Russian, Dutch (NL, BE)
NordicFinnish, Swedish, Danish (DA, DK), Norwegian (NO, nb-NO)
OtherPolish, Turkish, Greek, Chinese (Simplified, Traditional, SG, CN, HK, TW), Latin American Spanish
RegionalEnglish variants for GR, HK, SA, HU, IN, IL, SG, SK, ZA

The enum starts with eMCLang_null (0) and goes up from there, with each locale getting its own value.

MinecraftConsoles tweaks the settings system in a few places:

  • eGameSetting_RenderDistance is added (at position 2, between SoundFX and Gamma) for per-player render distance control. LCEMP handles render distance only through the Options class.
  • eGameSetting_FOV is added (at position 4, between Gamma and Difficulty) for per-player field of view. Same deal, LCEMP only has this in Options.
  • eGameSetting_Fullscreen is removed (it was a Windows 64-bit only setting in LCEMP and MC doesn’t have a Win64 build).

The eGameHostOption enum gets significantly expanded. After eGameHostOption_NoHUD, MC adds:

OptionPurpose
eGameHostOption_WorldSizeWorld size selection (small, medium, large)
eGameHostOption_All(bitmask sentinel, moved to after WorldSize)
eGameHostOption_DisableSaving(same as LCEMP)
eGameHostOption_WasntSaveOwnerPS3 save transfer tracking (so the game can show a message instead of the creative mode warning)
eGameHostOption_MobGriefingWhether mobs can destroy blocks
eGameHostOption_KeepInventoryKeep items on death
eGameHostOption_DoMobSpawningNatural mob spawning
eGameHostOption_DoMobLootMob drops
eGameHostOption_DoTileDropsBlock drops
eGameHostOption_NaturalRegenerationHealth regeneration from hunger
eGameHostOption_DoDaylightCycleDay/night cycle

These are the gamerule equivalents from PC Minecraft 1.6.1+, exposed as host options in the console UI instead of chat commands. They map directly to the vanilla GameRules constants added in MC (see Game Rules).