The access transformer file format allows for targetting classes and their members for transformation of the access_flags element of the member. This allows for transforming private methods into public methods, for example.
Java Language Specification for class files
publictransforms the member to be publicprotectedtransforms the member to be protectedprivatetransforms the member to be privatedefaulttransforms the member to be package private ('default')
Any access transform can have +f or -f appended to add or remove the ACC_FINAL flag.
Targets can be classes, methods or fields.
Methods are identified by parentheses after the member name.
Comments are delimited by a # sign. All content until end of line is ignored.
An access transformation pre-processor is required to allow compilation against access-transformed compiled code.
ForgeGradle has such a tool. Other tools are available to do the same thing.
<access modifier> <classname>
Example. Transforms the class net.minecraft.world.gen.structure.StructureVillagePieces$Village to public.
public net.minecraft.world.gen.structure.StructureVillagePieces$Village
<access modifier> <classname> <methodname><methodsignature>
Example. Transforms the method boolean net.minecraft.world.World.isValid(BlockPos p) to public.
public net.minecraft.world.World isValid(Lnet/minecraft/util/math/BlockPos;)Z
<access modifier> <classname> <fieldname>
Example. Transforms the field net.minecraft.world.WorldType.worldTypes to public with the final flag removed.
public-f net.minecraft.world.WorldType worldTypes