RainAPI
by RainMelody
RainAPI is a Forge library that other mods build on for runtime Java compilation and bytecode transformation, and it is required by RainJava.
What it does
RainAPI provides the infrastructure layer for dynamic class work: an embedded ECJ compiler turns source into bytecode at runtime, Javassist handles high-level bytecode edits, and ASM covers lower-level transformation. Together they let a mod compile and modify classes while the game is running, which the mod's own description positions as the groundwork for the upcoming RainJava framework.
A transformation bridge connects classes generated at runtime with the established bytecode modification frameworks, so they can be handled like any other class. A Mixin compatibility layer lets standard injection patterns recognize dynamically provisioned classes, and a Coremod integration places those class definitions in Forge's transformation chain. Sandboxed execution adds security boundaries for evaluating code at runtime.
RainJava requires RainAPI, so it is the dependency to install alongside RainJava. Its bundled tools are shaded and kept isolated so they do not clash with other mods, and a build with no outside dependencies is included. RainAPI runs on client and server, so both the server and every player need it. It is published for Forge only, for 1.20.1, under the MIT License, and it is not open source.
Key features
Embedded ECJ compiler
An Eclipse Compiler for Java is bundled, so source code can be compiled to bytecode during a session.
Javassist and ASM tools
Javassist and ASM are included for editing bytecode, covering high-level and low-level class changes.
JavaParser analysis
An abstract syntax tree framework is included for analyzing and generating Java code.
Sandboxed code evaluation
Runtime code evaluation runs inside defined security boundaries rather than with unrestricted access.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Required by 1 mod
How it compares
JFFL is a Forge library for 1.20.1 – 1.20.6 under the Apache License 2.0, and it is open source, unlike RainAPI, which is limited to 1.20.1. Koremods is open source under the MIT License for Forge files covering 1.18.2 – 1.20.4, and it also runs on client and server. HookLib is an open source Forge library for 1.12.2 that works on the client or the server, with either side optional.
Questions
Does RainJava need RainAPI installed?
Does RainAPI have to be installed on the server?
Which game version does RainAPI support?
In the catalog
RainAPI is one of 3,514 Library mods on ModsFinder, and one of 1,576 Library mods for Forge. 34,764 mods support Minecraft 1.20.1.
More from RainMelody
Similar mods
What the author says
A foundational library providing Mixin and Coremod interoperability layers, powered by enterprise-grade bytecode and compilation tools. RainJava API establishes the critical infrastructure for runtime class transformation pipelines. It serves as a middleware bridge between dynamic compilation workflows and…
Official listing
- Modrinth page
- modrinth.com/mod/rainapi
- Owner
- RainMelody
- Published
- 2026-02-20
- Updated on Modrinth
- 2026-02-27
- Facts verified
- 2026-10-15
