Skip to content

Access transformer not applied

Checked against NeoForge’s documentation on 2 November 2026.

An access transformer (AT) makes a class, method or field of Minecraft’s code more visible, or adds or removes final (NeoForge: Access Transformers). If your code still can’t see the member, check these.

NeoForge looks for META-INF/accesstransformer.cfg by default, so put it at src/main/resources/META-INF/accesstransformer.cfg. ModDevGradle picks up that path with no extra setup; NeoGradle needs it named in build.gradle. If you keep the file anywhere else, name it in build.gradle and in neoforge.mods.toml:

neoforge.mods.toml
[[accessTransformers]]
file = "META-INF/accesstransformer.cfg"

The path in neoforge.mods.toml is relative to the root of your resources, which is the root of the jar.

From NeoForge: Access Transformers:

Target Line
A class <modifier> <fully qualified class name>
A field <modifier> <fully qualified class name> <field name>
A method <modifier> <fully qualified class name> <method name>(<parameter types>)<return type>
  • The modifier is public, protected, default or private. Add +f or -f to add or remove final.
  • Class names use dots (net.minecraft.server.MinecraftServer), and $ before an inner class.
  • Method types are bytecode descriptors: I is int, Z is boolean, V is void, Ljava/lang/String; is a String, with slashes inside the L...;.
  • Everything after # is a comment.
  • The names must be the ones for your Minecraft version. On 26.1 and newer, that’s Mojang’s names.

An AT changes only the method it names, not the methods that override it. NeoForge warns that a widened method with a narrower override makes the JVM throw an error. final methods, methods in final classes and static methods are safe to change.

After you add or change an AT, refresh the Gradle project; the change only applies after that.

Linen’s Forge templates put the AT at the same path, src/main/resources/META-INF/accesstransformer.cfg, and wire it in build.gradle (accessTransformer = file(...) up to 1.21.10, accessTransformer = true on 1.21.11 and newer). See Set up a Forge mod.

  • Every NeoForge and Forge project from New mod has the AT file in place and wired into the build.
  • Minecraft’s code browses the decompiled game for your project’s version, on your machine, so you can find the exact class, member and descriptor.
  • Hovers show names in Mojang, Yarn, intermediary and Parchment, where the version has them.