Understanding Instances
An instance in Prism Launcher represents a complete Minecraft setup stored in its own directory (instanceRoot). Each instance has:
- Unique ID managed internally by the launcher
- Custom name and icon
- Independent mod and resource pack configuration
- Separate world saves and settings
- Its own game root directory structure
Instances are managed by the
InstanceList class which maintains an index of all instances and handles operations like creation, deletion, and grouping.Creating a New Instance
Select Minecraft Version
Choose the Minecraft version you want to use. Prism Launcher supports:
- Official releases
- Snapshots
- Old alpha/beta versions
Configure Instance Settings
Set your instance details:
- Name: A descriptive name for easy identification
- Group: Optional organization into groups (e.g., “Modded”, “Vanilla”)
- Icon: Choose or upload a custom icon
Instance Directory Structure
Each instance follows this directory layout:Instance Settings and Configuration
Basic Settings
Each instance stores settings in aSettingsObject which includes:
- Name and Icon: Display customization
- Notes: Free-form text for instance documentation
- Group Assignment: Organizational grouping
- Linked Instances: References to related instances
Advanced Configuration
Pre-Launch and Post-Exit Commands
Pre-Launch and Post-Exit Commands
Configure custom commands to run before launching or after exiting:
getPreLaunchCommand(): Executes before Minecraft startsgetPostExitCommand(): Executes after Minecraft closesgetWrapperCommand(): Wraps the entire launch process
Managed Pack Information
Managed Pack Information
For modpack instances, Prism stores metadata:
- Pack type (CurseForge, Modrinth, etc.)
- Pack ID and name
- Version ID and version name
isManagedPack() and related getters.Working with Instance Groups
Groups help organize multiple instances:Creating Groups
Groups are created automatically when you assign an instance to a new group name. TheInstanceList maintains group references and collapse states.
Managing Groups
- Rename Group: Use
renameGroup(src, dst)to rename across all instances - Delete Group:
deleteGroup(name)removes the group assignment - Collapse State: Groups can be collapsed in the UI, state persists across sessions
Duplicating Instances
To duplicate an instance:Configure New Instance
Provide a new name and optionally modify:
- Group assignment
- Icon
- Whether to copy saves and screenshots
Duplication preserves mods, resource packs, and configurations. World saves can be optionally included or excluded.
Instance Lifecycle Management
Instance Status
Instances have two status states:- Present: Normal, available instance
- Gone: Invalidated or deleted instance
statusChanged signals for UI updates.
Running State
The launcher tracks instance execution:Launch History
lastLaunch(): Returns timestamp of last launch (milliseconds since epoch)setLastLaunch(): Updates last launch time- Play time is automatically tracked and persisted
Deleting Instances
- Trash Instance
- Permanent Delete
Prism Launcher supports recoverable deletion:Trashed instances are tracked in
m_trashHistory with full restoration capability.Instance Shortcuts
Prism Launcher can create desktop and application menu shortcuts:Shortcut Types
- Desktop: Places shortcut on desktop
- Applications: Adds to system application menu
- Other: Custom locations
Managing Shortcuts
- Name: Display name
- File path: Location of shortcut file
- Target: Where shortcut points (Desktop/Applications/Other)
Instance Linking
Link related instances together:- Linking client and server instances
- Connecting development and production instances
- Organizing modpack variations
Best Practices
Regular Backups
Export instances regularly to preserve your configurations and worlds. Use the export feature to create portable instance archives.
Organized Groups
Use groups to categorize instances by purpose: Vanilla, Modded, Testing, Servers, etc.
Descriptive Names
Use clear, descriptive names that indicate version and purpose (e.g., “1.20.1 Create Mod”, “1.19 Vanilla Survival”).
Clean Unused Instances
Regularly review and remove instances you no longer use to save disk space.
Troubleshooting
Instance Won’t Launch
Check the following:- Verify instance status is not “Gone”
- Ensure Java is properly configured
- Check instance logs for errors
- Verify game files are not corrupted
Instance Disappeared
If an instance is missing:- Check if it’s in the trash (recoverable via undo)
- Verify the instance directory still exists
- Look in the instance folder for the
.cfgfile - The instance may have been invalidated if the folder was moved externally
Cannot Delete Instance
Ensure:- Instance is not currently running
- You have write permissions to the instance directory
- No other processes are accessing instance files
