# angelauramc/amethyst-ios architecture

> Architecture diagram of the GitHub repository angelauramc/amethyst-ios, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/angelauramc/amethyst-ios
- Repository: https://github.com/angelauramc/amethyst-ios

## Overview

Amethyst is an iOS/iPadOS launcher for Minecraft: Java Edition. The intended user journey is to choose an account and game version, configure or install a supported mod loader, then launch and control the game; the README also documents JIT support and graphics/input capabilities. The tree and sampled Java sources show launcher argument/library handling and GLFW adaptation, but most native controller and installer files are headers, so their wiring is represented only where documented or left unconnected. Rendering and platform headers are interfaces, not evidence of runtime call paths.

Main entry points: [`Natives/LauncherProfilesViewController.h`](https://github.com/angelauramc/amethyst-ios/blob/main/Natives/LauncherProfilesViewController.h) (Game profiles), [`JavaApp/src/launcher/net/kdt/pojavlaunch/Tools.java`](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/net/kdt/pojavlaunch/Tools.java) (Launch preparation), [`JavaApp/src/lwjgl/org/lwjgl/glfw/GLFW.java`](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/lwjgl/org/lwjgl/glfw/GLFW.java) (GLFW adaptation), [`JavaApp/src/launcher/android/util/ArrayMap.java`](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/ArrayMap.java) (Array map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher runtime"]
  node_launcher_ui["Launcher UI"]
  node_game_profiles["Game profiles"]
  node_accounts["Minecraft accounts"]
  node_launch_tools["Launch preparation<br/>[Tools.java]"]
  node_class_loader["Class loading"]
end

subgraph group_setup["Game setup"]
  node_game_versions["Version catalog"]
  node_mod_installers["Mod installers"]
  node_modpack_installers["Modpack installers<br/>[ModpackAPI.h]"]
end

subgraph group_play["Gameplay"]
  node_game_surface["Game surface<br/>[GameSurfaceView.h]"]
  node_glfw["GLFW adaptation<br/>[GLFW.java]"]
  node_custom_controls["On-screen controls<br/>[ControlLayout.h]"]
  node_input_devices["Device input<br/>[ControllerInput.h]"]
  node_graphics_api["Graphics interfaces<br/>[eglext.h]"]
end

subgraph group_platform["iOS platform"]
  node_jit_support["JIT support<br/>[UniversalJIT26.js]"]
  node_platform_info["Platform detection<br/>[Platform.java]"]
end

subgraph group_support["Runtime support"]
  node_array_map["Array map<br/>[ArrayMap.java]"]
  node_map_helpers["Map helpers"]
  node_map_collections["Map collections"]
  node_empty_arrays["Empty arrays<br/>[EmptyArray.java]"]
  node_map_objects["Map equality<br/>[Objects.java]"]
end

node_player(("Player"))

node_player -.->|"opens launcher"| node_launcher_ui
node_launcher_ui -.->|"configures profile"| node_game_profiles
node_game_profiles -.->|"selects account"| node_accounts
node_game_profiles -.->|"selects version"| node_game_versions
node_game_profiles -.->|"chooses mod loader"| node_mod_installers
node_game_profiles -.->|"installs modpack"| node_modpack_installers
node_launch_tools -->|"loads version"| node_game_versions
node_launch_tools -->|"uses class loader"| node_class_loader
node_launch_tools -->|"builds arguments"| node_array_map
node_launcher_ui -.->|"launches game"| node_launch_tools
node_game_surface -.->|"hosts game window"| node_glfw
node_glfw -.->|"receives controls"| node_custom_controls
node_glfw -.->|"handles input"| node_input_devices
node_glfw -.->|"uses graphics APIs"| node_graphics_api
node_player -.->|"enables JIT"| node_jit_support
node_launch_tools -.->|"detects platform"| node_platform_info
node_array_map -->|"searches keys"| node_map_helpers
node_array_map -->|"initializes storage"| node_empty_arrays
node_array_map -->|"exposes views"| node_map_collections
node_map_collections -->|"compares entries"| node_map_objects

click node_launcher_ui "https://github.com/angelauramc/amethyst-ios/blob/main/Natives/LauncherMenuViewController.h"
click node_game_profiles "https://github.com/angelauramc/amethyst-ios/blob/main/Natives/LauncherProfilesViewController.h"
click node_accounts "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/net/kdt/pojavlaunch/value/MinecraftAccount.java"
click node_game_versions "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/net/kdt/pojavlaunch/JMinecraftVersionList.java"
click node_mod_installers "https://github.com/angelauramc/amethyst-ios/tree/main/Natives/installer"
click node_modpack_installers "https://github.com/angelauramc/amethyst-ios/blob/main/Natives/installer/modpack/ModpackAPI.h"
click node_launch_tools "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/net/kdt/pojavlaunch/Tools.java"
click node_class_loader "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/net/kdt/pojavlaunch/PojavClassLoader.java"
click node_game_surface "https://github.com/angelauramc/amethyst-ios/blob/main/Natives/GameSurfaceView.h"
click node_glfw "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/lwjgl/org/lwjgl/glfw/GLFW.java"
click node_custom_controls "https://github.com/angelauramc/amethyst-ios/blob/main/Natives/customcontrols/ControlLayout.h"
click node_input_devices "https://github.com/angelauramc/amethyst-ios/blob/main/Natives/input/ControllerInput.h"
click node_graphics_api "https://github.com/angelauramc/amethyst-ios/blob/main/Natives/external/mesa/EGL/eglext.h"
click node_jit_support "https://github.com/angelauramc/amethyst-ios/blob/main/Natives/resources/UniversalJIT26.js"
click node_platform_info "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/patchjna_agent/com/sun/jna/Platform.java"
click node_array_map "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/ArrayMap.java"
click node_map_helpers "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/ContainerHelpers.java"
click node_map_collections "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/MapCollections.java"
click node_empty_arrays "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/EmptyArray.java"
click node_map_objects "https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/Objects.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launcher_ui,node_game_profiles,node_accounts,node_launch_tools,node_class_loader toneBlue
class node_game_versions,node_mod_installers,node_modpack_installers toneAmber
class node_game_surface,node_glfw,node_custom_controls,node_input_devices,node_graphics_api toneMint
class node_jit_support,node_platform_info toneRose
class node_array_map,node_map_helpers,node_map_collections,node_empty_arrays,node_map_objects,node_player toneIndigo
```

## Components

### Launcher runtime

- [Launcher UI](https://github.com/angelauramc/amethyst-ios/blob/main/Natives/LauncherMenuViewController.h): `Natives/LauncherMenuViewController.h`
- [Game profiles](https://github.com/angelauramc/amethyst-ios/blob/main/Natives/LauncherProfilesViewController.h): `Natives/LauncherProfilesViewController.h`
- [Minecraft accounts](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/net/kdt/pojavlaunch/value/MinecraftAccount.java): `JavaApp/src/launcher/net/kdt/pojavlaunch/value/MinecraftAccount.java`
- [Launch preparation](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/net/kdt/pojavlaunch/Tools.java): `JavaApp/src/launcher/net/kdt/pojavlaunch/Tools.java`
- [Class loading](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/net/kdt/pojavlaunch/PojavClassLoader.java): `JavaApp/src/launcher/net/kdt/pojavlaunch/PojavClassLoader.java`

### Game setup

- [Version catalog](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/net/kdt/pojavlaunch/JMinecraftVersionList.java): `JavaApp/src/launcher/net/kdt/pojavlaunch/JMinecraftVersionList.java`
- [Mod installers](https://github.com/angelauramc/amethyst-ios/tree/main/Natives/installer): `Natives/installer`
- [Modpack installers](https://github.com/angelauramc/amethyst-ios/blob/main/Natives/installer/modpack/ModpackAPI.h): `Natives/installer/modpack/ModpackAPI.h`

### Gameplay

- [Game surface](https://github.com/angelauramc/amethyst-ios/blob/main/Natives/GameSurfaceView.h): `Natives/GameSurfaceView.h`
- [GLFW adaptation](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/lwjgl/org/lwjgl/glfw/GLFW.java): `JavaApp/src/lwjgl/org/lwjgl/glfw/GLFW.java`
- [On-screen controls](https://github.com/angelauramc/amethyst-ios/blob/main/Natives/customcontrols/ControlLayout.h): `Natives/customcontrols/ControlLayout.h`
- [Device input](https://github.com/angelauramc/amethyst-ios/blob/main/Natives/input/ControllerInput.h): `Natives/input/ControllerInput.h`
- [Graphics interfaces](https://github.com/angelauramc/amethyst-ios/blob/main/Natives/external/mesa/EGL/eglext.h): `Natives/external/mesa/EGL/eglext.h`

### iOS platform

- [JIT support](https://github.com/angelauramc/amethyst-ios/blob/main/Natives/resources/UniversalJIT26.js): `Natives/resources/UniversalJIT26.js`
- [Platform detection](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/patchjna_agent/com/sun/jna/Platform.java): `JavaApp/src/patchjna_agent/com/sun/jna/Platform.java`

### Runtime support

- [Array map](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/ArrayMap.java): `JavaApp/src/launcher/android/util/ArrayMap.java`
- [Map helpers](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/ContainerHelpers.java): `JavaApp/src/launcher/android/util/ContainerHelpers.java`
- [Map collections](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/MapCollections.java): `JavaApp/src/launcher/android/util/MapCollections.java`
- [Empty arrays](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/EmptyArray.java): `JavaApp/src/launcher/android/util/EmptyArray.java`
- [Map equality](https://github.com/angelauramc/amethyst-ios/blob/main/JavaApp/src/launcher/android/util/Objects.java): `JavaApp/src/launcher/android/util/Objects.java`

### Other components

- **Player**

## Connections

- Player → Launcher UI: opens launcher (evidence: `README.md`)
- Launcher UI → Game profiles: configures profile
- Game profiles → Minecraft accounts: selects account
- Game profiles → Version catalog: selects version
- Game profiles → Mod installers: chooses mod loader (evidence: `README.md`)
- Game profiles → Modpack installers: installs modpack (evidence: `README.md`)
- Launch preparation → Version catalog: loads version (evidence: `JavaApp/src/launcher/net/kdt/pojavlaunch/Tools.java`)
- Launch preparation → Class loading: uses class loader (evidence: `JavaApp/src/launcher/net/kdt/pojavlaunch/Tools.java`)
- Launch preparation → Array map: builds arguments (evidence: `JavaApp/src/launcher/net/kdt/pojavlaunch/Tools.java`)
- Launcher UI → Launch preparation: launches game
- Game surface → GLFW adaptation: hosts game window
- GLFW adaptation → On-screen controls: receives controls (evidence: `README.md`)
- GLFW adaptation → Device input: handles input (evidence: `README.md`)
- GLFW adaptation → Graphics interfaces: uses graphics APIs (evidence: `README.md`)
- Player → JIT support: enables JIT (evidence: `README.md`)
- Launch preparation → Platform detection: detects platform
- Array map → Map helpers: searches keys (evidence: `JavaApp/src/launcher/android/util/ArrayMap.java`)
- Array map → Empty arrays: initializes storage (evidence: `JavaApp/src/launcher/android/util/ArrayMap.java`)
- Array map → Map collections: exposes views (evidence: `JavaApp/src/launcher/android/util/ArrayMap.java`)
- Map collections → Map equality: compares entries (evidence: `JavaApp/src/launcher/android/util/MapCollections.java`)
