| Module | Responsibility |
|---|---|
ct-main | The host. Scans the modules folder, orders and loads modules, exposes the module API (com.ct.main.api: CtModule, ModuleContext, SettingsAccess, AccountProvider, BootstrapAccess, CommandProvider), shows the welcome window, and dispatches command line arguments to command modules. |
theme | Central palette, typography, and custom-drawn Swing components (buttons, fields, selector, steppers, checkboxes, progress bar, scrollbars, cards) built in-project without additional dependencies. |
rules | Evaluates Mojang rule objects against the current operating system, architecture, and feature flags. Used for both library selection and argument selection. |
settings | Non-secret settings persisted in ~/.ct-client/settings.properties, plus the settings view. |
installer | Resolves the official version manifest, downloads and verifies the client, libraries, asset index, assets, log configuration, and the official Java runtime, and prepares the natives directory. |
versions | Loads the official version catalog and installs or verifies the selected version. |
launcher | Builds the JVM and game argument list from the official metadata, routes loader profiles, and starts the game process. |
account-offline | Locally generated offline profile with a stable derived UUID. |
account-microsoft | OAuth device code sign-in through Microsoft, Xbox Live, XSTS, and the Minecraft services profile endpoint, in a built-in variant that needs no Azure application and a classic variant that uses a configured Azure client ID. |
modman | Lists the CT and Fabric mods in the mods folder, opens it, and removes selected mod jars. |
ctloader | CT mod API, metadata discovery, dependency ordering, entrypoint initialization, and the in-process bootstrap that delegates to Minecraft's official main class. |
cli | Command module that installs and launches the game headless: java -jar CT-Main.jar ct --help. |
console, about | The scrolling message console and the version, folders, and license view. |
versions/CT vX.Y.Z | Release notes, machine-readable release profile, and license for that release. |
Architecture.
CT is an independent Minecraft Java Edition launcher and the home of the CT mod loader, built as a module platform: CT-Main is a bare host, and every feature — installing, launching, accounts, the console, mods — is a separate module jar it loads at startup. CT does not install Fabric, Forge, or NeoForge, and it does not implement their mod APIs — but it can start profiles those loaders have already installed.
The module platform
CT-Main (com.ct.main) scans the modules folder, sorts the jars by their declared dependencies, loads each with its own class loader, and lets the modules publish services to each other. A module loads only when every module listed in its requires is present; anything else is skipped with a printed reason.
The install pipeline and verification model
Every file that lands in the game directory is verified against official metadata before it is trusted.
- 1Fetch the manifest. Fetch
version_manifest_v2.json, expose all listed version IDs in the UI, and resolve the requested ID only against that official catalog. - 2Verify version metadata. Fetch the version metadata and verify its SHA-1 against the manifest. A verified local copy is reused when it still matches.
- 3Download and verify content. Download the client jar, every library whose rules match the current platform, the asset index, and each asset object. Every file is checked against the published SHA-1 and size; a mismatched download is discarded and never installed. Transfers use HTTP/1.1, because the asset CDN resets concurrent HTTP/2 streams, and transient failures are retried with backoff. A partial download is written to a
.partfile and moved into place only after it verifies, so an interrupted install never leaves a corrupt file behind. - 4Download the log configuration. Download the official log4j configuration referenced by the version metadata.
- 5Prepare natives. Create the natives directory, including the per-library extraction subdirectories that the version metadata references.
- 6Install the Java runtime. Resolve and install the Java runtime the version declares. Legacy metadata without a Java component uses the Java 8 legacy runtime. Runtime manifests are verified by SHA-1, executable bits are applied after download, symbolic links are validated against the runtime root, and a completion marker (
.ct-runtime-complete) is written only after the whole runtime is verified.
Only HTTPS sources are accepted, and paths from official metadata are rejected when they escape their target directory. Platform-matched native classifiers are downloaded separately from classpath artifacts and safely extracted, honoring metadata exclusion paths so archive paths cannot escape the destination.
Command construction and rule evaluation
The argument list is assembled in a fixed order, with rules evaluated at two points: library selection during install, and argument selection during launch.
- 1Build the placeholder map. Build it from the account, the installation, and the user's settings. Append the CT application to the game classpath for CT-native launches; external loader profiles use their declared game and loader libraries.
- 2Evaluate
default-user-jvm. Obtain Mojang's recommended memory and garbage collector flags, replacing the heap bounds with the user's configured values. - 3Evaluate version arguments. Apply OS rules and feature rules to modern
arguments.jvmandarguments.game. For legacy metadata, tokenizeminecraftArguments. Substitute supported placeholders and generate a classpath when older version metadata does not define one. - 4Choose the entrypoint. If a Fabric mod JAR with root-level
fabric.mod.jsonis present and exactly one Fabric profile matches the selected Minecraft version, use that profile. For a CT-native launch, startCTLoaderBootstrap, which scans<game directory>/mods, validates eachct.mod.json, checks dependencies, initializes CT entrypoints in dependency order, then invokes Minecraft's official main class. For an installed Fabric, Forge, or NeoForge profile, start the profile's declared main class directly and let that loader handle its own mods. - 5Start the process. Start it with
ProcessBuilderand an explicit working directory. No shell is involved, so no argument is re-parsed or expanded. - 6Stream output. Stream stdout and stderr to
<game directory>/logs/ct-client-launch.logand to the CT output. The access token is redacted from any command echoed to the interface.
CT's own mod API supports Java entrypoints and logging only; it does not transform Minecraft classes or provide Minecraft lifecycle hooks. External loader profiles are launchable but must be installed separately. All mod JARs execute code with the user's permissions and are not sandboxed by CT. Authentication uses the OAuth 2.0 device code flow with the XboxLive.signin and offline_access scopes; access tokens are held in memory for the current session only and never written to settings.properties, the launcher log, or the command echo.
The ~/.ct-client directory tree
~/.ct-client/
settings.properties Non-secret launcher settings
game/
versions/<id>/<id>.json Verified official version metadata
versions/<id>/<id>.jar Verified client jar
versions/<id>/natives/ Natives subdirectories referenced by the metadata
libraries/ Rule-matched libraries, including natives classifiers
assets/indexes/ Asset index
assets/objects/ Asset objects, stored under their SHA-1 prefix
assets/log_configs/ Official log4j configuration
runtimes/ Official Java runtime, with the completion marker
logs/ct-client-launch.log Streamed game output, appended per launch
Build and assembly
One Maven command compiles, tests, and produces both the shaded JAR and the desktop ZIP.
JDK 21 or later is required. The Maven wrapper downloads Maven 3.9.16 on first use:
./mvnw package
java -jar ct-main/target/CT-Main-4.3.0.jar
The multi-module build produces ct-main/target/CT-Main-4.3.0.jar — the bare host with only Gson shaded in — plus one jar per module in ct-module-*/target/. The ctloader module jar shades Gson as well, because it runs inside the game process with only itself on the classpath. Publish the HTML/ directory to the official website to make the jars, the source archive, and the browsable source tree available.
Related pages
API reference
Member tables for every class named above.
Mods
CT Loader on disk: paths, metadata, and dependency rules.
Security
HTTPS-only sources, token handling, and the compliance model.
Features
The user-facing summary of what CT does.
Release
Download CT-Main v4.3.0 and every module jar.
Troubleshooting
Mapped error messages and their fixes.