SuperAccessTransformer

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.1.1.1
本资源为搬运资源,原资源地址: https://modrinth.com/mod/superaccesstransformer
资源信息

Minecraft 版本: 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2 26.2

平台: neoforge

标签: management

资源介绍

English

SuperAccessTransformer (SAT) is an open-source coremod for Minecraft 1.21+ that modifies access modifiers at runtime by injecting a Java Agent, converting most private, protected, and final members to public. It also includes a Gradle plugin, allowing the transformations to work in development environments without extra JVM arguments.

Core Functionality

Runtime Bytecode Transformation: Uses the java.lang.instrument API along with the ASM library to intercept class loading and modify bytecode. The transformation:

  • Removes private, protected, and final modifiers from fields and adds public

  • Removes private, protected, and final modifiers from methods (except <clinit>) and adds public

  • Skips interfaces and enum $VALUES fields

Development Environment Support

Gradle Plugin Integration: Add the SAT Gradle plugin to your project to enable transformation at development time. The plugin is compatible with both Fabric and NeoForge modules.

buildscript {
    dependencies {
        classpath 'io.github.yiyuyan:SuperAccessTransformerPlugin:1.000'
    }
}
apply plugin: 'io.github.yiyuyan.sat-plugin'

You can also find an example setup for Architectury NeoForge 1.21 at the test branch: yiyuyan/SuperAccessTransformer (test)

Known Limitations & Notes

  • Fabric Loader Dev Environment: Mob::rotlerp and WitherBoss::rotlerp methods will not be transformed.

  • NeoForge Mod List: As a coremod using the lowcodefml loader, SAT does not appear in the NeoForge mod list.

简体中文

SuperAccessTransformer(SAT)是一个面向 Minecraft 1.21+ 的开源 coremod,通过在运行时注入 Java Agent,将大多数 privateprotectedfinal 修饰符转换为 public。该模组还提供 Gradle 插件,使得转换在开发环境中也能直接生效,无需额外 JVM 参数。

核心功能

运行时字节码转换:利用 java.lang.instrument API 与 ASM 库拦截类加载过程并修改字节码。转换规则如下:

  • 移除字段的 privateprotectedfinal 修饰符,并添加 public

  • 移除方法(<clinit> 除外)的 privateprotectedfinal 修饰符,并添加 public

  • 跳过接口和枚举的 $VALUES 字段

开发环境支持

通过 Gradle 插件可在开发环境中启用运行时转换,同时适用于 Fabric 与 NeoForge 模块.

buildscript {
    dependencies {
        classpath 'io.github.yiyuyan:SuperAccessTransformerPlugin:1.000'
    }
}
apply plugin: 'io.github.yiyuyan.sat-plugin'

你也可以参考针对 Architectury NeoForge 1.21 的示例项目:yiyuyan/SuperAccessTransformer at test

已知限制与提示

  • Fabric Loader 开发环境Mob::rotlerpWitherBoss::rotlerp 这两个方法不会被转换。

  • NeoForge 模组列表:该模组基于 lowcodefml 加载器,作为 coremod 不会出现在 NeoForge 模组列表中。

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
End Crystals Break Bedrock

价格:0 墨喵币
下载量:0

查看详情
More Effects in Potions

价格:0 墨喵币
下载量:0

查看详情
Dragoons [Dragons and Fantasy Modpack]

价格:0 墨喵币
下载量:0

查看详情
Slightly Better Foliage Colors

价格:0 墨喵币
下载量:0

查看详情