跳到正文

JFFL

作者:wertygh

JFFL is a tool used to Javassist of Minecraftforge bytecode operation library, provides mixin-like declarative patch injection it allows developers to use annotations at startup to modify the Minecraft and other mod classes.

收藏

介绍

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

JFFL – Javassist Framework for Forge Loader

JFFL is a bytecode manipulation library for Minecraft Forge based on Javassist, providing Mixin-like declarative patch injection capabilities. It allows developers to modify classes from Minecraft and other mods at runtime using annotations, without the need to write low-level ASM or Javassist code directly.


Features

  • Declarative Annotation-Driven
  • Callback Handlers
  • Mapping Remapping Support
  • Flexible Injection Points

Installation and Dependencies

repositories {
    // Put the .jar of JFFL mod into the libs folder
    flatDir {
        dir 'libs'
    }
}
// Write in dependencies (replace {versino} with the actual version number):
dependencies {
    implementation fg.deobf("wertygh:jffl:{version}")
}

Relationship with Mixin

JFFL is not a replacement for Mixin but rather provides an alternative option. Both can coexist, though applying both to the same class is not recommended as it may lead to unexpected conflicts. JFFL’s advantages include:

  • Lightweight, based on Javassist source-level operations, easier to debug
  • Supports dynamic callback registration without generating synthetic methods

Development and Debugging

In development environment (jffl.dev=true):

  • JFFL outputs detailed logs
  • Use @DumpClass to output modified classes to the .jffl-dump directory
  • Supports direct use of MCP/Mojang names without loading mappings

License

BSD Zero Clause License


Contribution and Feedback

Issues and Pull Requests are welcome!
Project author: wertygh

常见问题

JFFL 支持哪些 Minecraft 版本?

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

JFFL 怎么安装?

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

评论

登录后评论和评分