Class MapperBase

java.lang.Object
de.florianmichael.asmfabricloader.api.MapperBase

public class MapperBase extends Object
Wrapper for the TinyTree mappings. This class is used to convert between named and intermediary mappings.
  • Constructor Details

    • MapperBase

      public MapperBase(net.fabricmc.mapping.tree.TinyTree mappings, String from, String to)
  • Method Details

    • getClassName

      public String getClassName(String from)
      Parameters:
      from - The name of the class in the "from" mapping
      Returns:
      The name of the class in the "to" mapping
    • getClassDef

      public net.fabricmc.mapping.tree.ClassDef getClassDef(String name)
      Parameters:
      name - The name of the class in the "from" mapping
      Returns:
      The class definition of the class
    • getMethodName

      public String getMethodName(Class<?> owner, String from)
      Parameters:
      owner - The owner of the method
      from - The name of the method in the "from" mapping
      Returns:
      The name of the method in the "to" mapping
    • getMethodDef

      public net.fabricmc.mapping.tree.MethodDef getMethodDef(Class<?> owner, String name, boolean superclasses)
      Parameters:
      owner - The owner of the method
      name - The name of the method in the "from" mapping
      superclasses - Whether to search in superclasses of the owner
      Returns:
      The method definition of the method
    • getFieldName

      public String getFieldName(Class<?> owner, String from)
      Parameters:
      owner - The owner of the field
      from - The name of the field in the "from" mapping
      Returns:
      The name of the field in the "to" mapping
    • getFieldDef

      public net.fabricmc.mapping.tree.FieldDef getFieldDef(Class<?> owner, String name, boolean superclasses)
      Parameters:
      owner - The owner of the field
      name - The name of the field in the "from" mapping
      superclasses - Whether to search in superclasses of the owner
      Returns:
      The field definition of the field