4.4 KiB
4.4 KiB
client: the game
Purpose
Builds Minecraft from the patched vendor tree in work/client, together with the Incari code the
patches call. It's one compilation because the calls go both ways (ARCHITECTURE.md).
Entry points
- The vendor tree:
work/client/src/main/java, generated by./incari setup. - Replacement classes:
src/main/java/com/mojang/..., Incari's versions of the vendor classespatches/classes.txtreplaces (the window, event pump, audio...). They keep the game's API and delegate toplatform-api; the build compiles them instead of the vendor copies. - Incari's code:
src/main/java/incari/client, the adapters between the game, the platform and Incari's strict modules. Each package'spackage-info.javasays what it holds.
| Package | What it holds |
|---|---|
platform |
Hooks the patches call into the installed platform: window, input, lifecycle, graphics backends; OnlineServices turns Realms and Mojang's services off (ADR 0074); PlatformNotices shows the platform's notices (saves not kept) and, once, the browser's Ctrl+W hint |
net |
Joining servers: WebSocket addresses (ADR 0009), each join's pipeline and the server's version (ServerConnections, VersionRetry, JoinFailures; Via off unless turned on per server, on the edit-server screen or Direct Connect (DirectJoinVia), with ViaHint on a refusal (not for featured servers) and "Needs Via" in the list for an Eagler server known to run another version; ADR 0017, 0018, 0071), the packet handoff (ADR 0033), featured servers (ADR 0062), Reconnect and Auto Reconnect on the disconnection screen (Reconnect), and Connection Details there (ConnectionDetailsScreen, from ConnectionReport) |
eagler, skins |
Eagler servers' extras: passwords, cookies, redirects, voice chat (ADR 0019), Eagler skins (ADR 0016); SkinDownloads fetches profiles' skins, capes and custom heads through the platform; ProfileTextures reads them with Mojang's services off (ADR 0074) |
relay |
Worlds shared through Eagler relays, joined and hosted (ADR 0019, 0062) |
legacy |
Playing older servers as their clients did, 1.8 above all (ADR 0020) |
singleplayer |
Singleplayer's server in a Web Worker (ADR 0039 to 0043); it saves when the page is hidden or closed (SAVE, posted by the page itself) |
audio, resources |
Sounds through the platform's decoder (ADR 0013); resources fetched from the asset index (ADR 0037); PackDownloads fetches servers' resource packs in a page (hosts must allow CORS) |
render, gui, particle, world |
Performance work in the game's own paths (ADR 0022 to 0034) |
memory, datafix, startup, tier |
The memory diet (ADR 0025), start-up (ADR 0026), the device's quality tier |
profiler |
The F9 profiler overlay (ADR 0021) |
modules |
The game's side of the module framework (ADR 0046): events, keybinds, the HUD, the module menu |
ui, look |
Incari's UI kit, screen edits and skins (ADR 0047), and the Frost look (ADR 0048) |
online, cosmetics |
Account and chat screens (ADR 0058, 0059); cosmetics, the Wardrobe and emotes (ADR 0061) |
settings, recorder, credits, profile |
Incari Settings and the screen recorder (ADR 0062), the credits, Edit Profile (ADR 0029) |
account |
Microsoft sign-in (ADR 0070): the saved account, its screen, the handshake's session join, chat keys |
IncariKeys, IncariTicks, TickPacing |
Incari's key mappings, its once-a-tick work, catch-up ticks paced (ADR 0032) |
Invariants
- Incari code here is platform-neutral: the
incari.clientpackages and every replacement class reach the machine only throughplatform-api(BoundaryTest), never LWJGL or TeaVM. - Replacements are written fresh, never adapted from the decompiled class (
./incari copycheck). - Vendor code is compiled as-is: lint off, never edited to silence a warning. Incari's sources
are rechecked with the full gates by
strictCompile. - Screens fit the smallest GUI the game allows, 320x240, in Incari's font and the pixel font:
widgets trim their own text (
Ui.fit), list rows narrow with the screen.smokeLayoutchecks. - The build needs
./incari setupfirst; it fails with that hint otherwise. - Output matches the jar: every class Mojang ships is compiled from source (11,383 for 26.3).
How to test
./gradlew :client:check # compiles ~11,000 classes, then strictCompile and the tests