Skip to content

Admany/Quantified-API

Repository files navigation

《▓ Quantified API ▓》

Quantified API Banner

Quantified API, or QAPI, is a performance framework for mods that do a bit more than just slap random async on stuff and pray it doesn't implode xd

It's goal is pretty simple: stop mods from frying the main thread and give people one API that can route work properly across CPU, caching, and GPU backends without breaking the game with deadlocks. V2 is a large rework - CPU internals, the public API surface, and caching were all heavily redesigned, and official docs are finally here :]

《▒ What it actually does ▒》

  • Proper async scheduling with worker lanes, telemetry, sane fallback behavior, and less Ehhh, why is my game suddenly at 5 tps xd
  • DAG / task graph execution so dependency-aware workflows don't need to be wired by hand (I 100% recommend doing it, so fun)
  • Backend-aware compute routing through QuantifiedAPI.compute(...) with CPU, Vulkan, and OpenCL preferences
  • Parallel execution via QuantifiedAPI.parallel(...) with much lower scheduler overhead on micro and medium tasks in V2
  • GPU acceleration when it actually makes sense, not fake "gpu preferred" branding slapped onto CPU work as on other mods
  • Caching + persistence layers via QuantifiedAPI.cache(...) with TTL, compression, async refresh, and disk/memory modes - so repeated expensive work doesn't repeat xd
  • Live diagnostics through the Quantified webpanel and runtime telemetry

《▒ Vulkan GPU Acceleration/OpenCL Acceleration ▒》

Quantified API is the first Minecraft mod / API setup with Vulkan compute acceleration that simply works, without any configuration required. Vulkan is the preferred GPU backend, while OpenCL is still kept around as the fallback / legacy path for compatibility.

That said, Vulkan under Minecraft + Forge + LWJGL can be a complete pain, so to counter that Quantified API is built around isolated probing, deferred runtime init, explicit failure reasons, and proper fallbacks. V2 cleaned up GPU routing further - the backend preference API is easier to use, and some Vulkan paths that were no longer useful got removed.

  • Isolated Vulkan probing so a corrupted driver or a loader issue doesn't instantly brick the game or cause a crash
  • Explicit fallback routing Vulkan falls to OpenCL if Vulkan isn't available, or is misbehaving. Worst case if both decide to act up, everything heads to the CPU without you even noticing :DDD
  • Backend diagnostics so you can see probe state, runtime state, active backend, chosen device, and failure reason without digging through 9 years of log spam (Modded logs xd)

《▒ Public API surface ▒》

The V2 API surface was cleaned up and expanded with a builder-first style, so compute, parallel, graph, and cache flows are obvious without writing cursed boilerplate everywhere (GeckoLib's API has to be studied in my opinion xd). Full API docs, examples, and migration info from V1 are at admany.dev.

  • QuantifiedAPI.compute(...) for backend-aware compute submission
  • QuantifiedAPI.parallel(...) for parallel execution with lower orchestration overhead
  • QuantifiedAPI.vulkan(...) for explicit Vulkan-targeted workloads
  • QuantifiedAPI.graph(...) for DAG / dependency-aware flows
  • QuantifiedAPI.cache(...) for caching with TTL, compression, async refresh, and persistence controls
  • Backend preferences like preferGpu(), preferVulkan(), preferOpenCL(), requireVulkan(), and cpuOnly()

If your mod is doing worldgen prep, simulation, batching, heavy math, cache-heavy systems, or other compute nonsense (Dancing cockroaches :DDD), Quantified API gives you a proper runtime instead of forcing you to reinvent multithreading for the 40th time, and then fix each compatibility issue, every FREAKING time...

《▒ V2 Performance ▒》

V2 reworked the CPU runtime internals from scratch. Here's what it actually benchmarks to against V1.4.4:

  • Tiny unique burst: 247ms → 62ms - roughly 3.95x faster
  • Duplicate burst: 173ms → 3.8ms - roughly 45x faster
  • Parallel micro: 3.1ms → 0.56ms - roughly 5.5x faster
  • Parallel medium: 10.6ms → 1.16ms - roughly 9.2x faster
  • DAG micro: 2958ms → 1ms - roughly 2952x faster on tested micrographs xd

Duplicate execution suppression also went from 2048 real executions (V1.4.4) down to 1 in V2. Not a typo.

《▒ Quantified Webpanel ▒》

Quantified API from day one ships with a webpanel, which is basically there so you can see what it's doing in realtime.

You can enable it through config or with /quantified webpanel.

  • Runtime overview for scheduler activity, queue pressure, backend state, mod usage and so etc
  • GPU controls for backend preference and device selection (Dual 5090 users will love this xd)
  • Diagnostics export so debugging weird behavior is easier for me, and you :]
  • Optional auth / HTTPS stuff if you want it a bit less jank when exposing it beyond localhost

《▒ Compatibility ▒》

  • Vulkan is optional. If it works, W. If not, it'll degrade cleanly instead of becoming a startup bomb
  • OpenCL support still exists for compatibility, but Vulkan is the main direction due to its large advantages over OpenCL
  • V2 adds auto-registration support for Fabric, Forge, and NeoForge through loader metadata detection - manual registration still works as a legacy option
  • If your hardware doesn't support Vulkan, it as mentioned switches to OpenCL. If even OpenCL isn't supported... how are you running the game then???

《▒ Documentation ▒》

Official V2 docs are live at admany.dev - covers getting started, the full V2 API, compute, parallel, graph, caching, keys/affinity, troubleshooting, examples, LC2H examples, and V1 migration info :]

《▒ Licensing and support ▒》

Licensed under BRSSLA V1.5 which is free for personal and non commercial use.

Mod Developers who include Quantified API as a dependency automatically gain Commercial Rights for their mod.

It's built to be flexible, easy to integrate and to be as user friendly as possible, while being flexible. If you have any requests, ideas, or found a bug, feel free to open a github issue or even a merge request :]

Developed and Maintained by Admany - BlackRift Studios 2026

About

Quantified API Repo

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors