跳到正文

RainAPI

作者:RainMelody

Core library for RainJava featuring embedded ECJ compiler, Javassist bytecode tools, and ASM transformation pipeline. Enables dynamic Java compilation and class modification at runtime.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

RainJava API

Advanced Runtime Class Transformation Framework

A foundational library providing Mixin and Coremod interoperability layers, powered by enterprise-grade bytecode and compilation tools.

Overview

RainJava API establishes the critical infrastructure for runtime class transformation pipelines. It serves as a middleware bridge between dynamic compilation workflows and Minecraft’s standard modification systems (Mixin & Coremod), ensuring bytecode-level compatibility without compromising game stability.

While designed as the prerequisite foundation for the upcoming RainJava ecosystem, this API functions independently as a robust toolkit for developers requiring deep class manipulation capabilities.

Embedded Libraries

This mod ships with zero-external-dependency versions of industry-standard tools:

  • Javassist — High-level bytecode manipulation library for runtime class engineering
  • ECJ (Eclipse Compiler for Java) — Full-featured Java compiler capable of runtime source-to-bytecode transformation
  • JavaParser — Abstract Syntax Tree (AST) analysis and code generation framework

These libraries are shaded and isolated to prevent conflicts with other mods.

Technical Scope

  • Transformation Bridge — Facilitates communication between runtime-generated class definitions and established bytecode modification frameworks
  • Mixin Compatibility Layer — Enables standardized injection patterns to recognize and process dynamically provisioned classes  
  • Coremod Integration — Provides stable hooks for runtime class definitions to participate in Forge’s transformation chain
  • Sandboxed Execution — Implements security boundaries for runtime code evaluation environments

For Modders

Install this API if you:

  • Plan to develop for or use the upcoming RainJava framework
  • Require embedded Javassist/ECJ/JavaParser without bundling them yourself
  • Need stable Mixin/Coremod interoperability for advanced bytecode operations

常见问题

RainAPI 支持哪些 Minecraft 版本?

RainAPI 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

RainAPI 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分

RainMelody 的其他作品

查看全部 →