Class ReplaceFieldWithGetterAccess

java.lang.Object
net.neoforged.neoforge.coremods.ReplaceFieldWithGetterAccess
All Implemented Interfaces:
ITransformer<ClassNode>

public class ReplaceFieldWithGetterAccess extends Object implements ITransformer<ClassNode>
Replaces direct field access in a class with access to the getter.

The field specified by fieldName must be private and non-static. The method-call the field-access is redirected to does not take any parameters and returns an object of the same type as the field. If no methodName is passed, any method matching the described signature will be used as callable method.