AccessTransformerJS
If you have ever tried to reach into another mod's code from a KubeJS script and hit a wall because a method was private or a field was protected, you already understand why Access Transformers exist. AccessTransformerJS brings that power to script authors by letting you apply Access Transformers (ATs) directly through KubeJS, so you can widen visibility and tweak the flags of classes, methods, and fields that would otherwise stay locked away.
Originally, ATs were a tool reserved for mod developers working in Java. This add-on hands that same capability to pack makers and tinkerers who prefer to stay inside the scripting layer. The result is fewer hard forks, fewer custom mods, and a lot more flexibility when you need to touch members outside your control.
What Access Transformers Actually Do
An Access Transformer is a configuration entry that changes how the game treats a specific member. You can make a private method public, expose a protected field, or adjust flags that control how a class behaves at runtime. The NeoForge documentation describes ATs as a way for modders to access and modify otherwise inaccessible members in classes outside their control, and that description fits this add-on perfectly.
AccessTransformerJS simply routes that mechanism through KubeJS. Instead of editing build scripts and recompiling, you declare your transformations in a config file and let the add-on handle the rest. It is a small shift in workflow that saves a surprising amount of time.
Supported Versions and Loaders
The add-on is built for the NeoForge ecosystem and targets modern Minecraft releases in the 1.20 and 1.21 families, so check the file listing for the exact build that matches your game version before you grab it. Because it depends on KubeJS, make sure that mod is present and current as well. Mixing mismatched versions is the most common reason transformations silently fail to apply.
How to Install AccessTransformerJS
Setup is straightforward, but the order of steps matters. Follow this sequence and you will avoid the usual headaches:
- Install a compatible NeoForge version for your Minecraft release.
- Add KubeJS and its dependencies to your mods folder.
- Place the AccessTransformerJS jar alongside them.
- Launch the game once so the configuration files generate.
- Open kubejs/accesstransformer.cfg and add your transformation entries.
- Restart the game after every edit for the changes to take effect.
That first launch is not optional. The add-on needs a run to create its config skeleton, and editing a file that does not exist yet will get you nowhere. Once the file is in place, each modification requires a full restart rather than a simple reload, because class transformations are applied during startup.
If you would rather skip manual file juggling, the foxygame.net launcher can handle the whole chain for you, pulling AccessTransformerJS and its dependencies into a ready-to-run profile with matching versions and automatic updates.
Writing Your First Transformation
The config format follows standard AT conventions: a mapping of class names to the members you want to expose, along with the new visibility or flags. A typical entry might make a constructor public or open up a getter that a mod kept private. Once the game restarts, your scripts can call those members as if they had always been public.
Class Filters and Safety
Recent versions of the add-on introduced class filters, and they are worth understanding before you start experimenting. These filters prevent you from widening every class that KubeJS or other mods disallow from loading, including certain field types and method return values. In practice, this means some transformations you attempt will be rejected outright.
That is a feature, not a bug. Unrestricted access transformation can destabilize a pack or open the door to crashes that are painful to diagnose. The filters keep you inside safe boundaries while still covering the vast majority of real use cases. If an entry does not seem to work, check whether the filter blocked it before assuming you made a syntax error.
Who Should Use This Add-On
AccessTransformerJS shines for pack developers building heavy KubeJS integrations, modpack authors patching around quirks in third-party mods, and anyone who wants finer control without maintaining a custom fork. If you are comfortable editing config files and restarting the game, you have everything you need to get started.
When you download AccessTransformerJS for Minecraft, keep in mind that it is a power tool. Test transformations one at a time, keep backups of your config, and document what you changed so future you knows why a class suddenly behaves differently. Used carefully, AccessTransformerJS for Minecraft removes one of the last real barriers between scripting and deep mod customization, letting your ideas reach code that was never meant to be touched.
===ARTICLE===