Class NameMapper

java.lang.Object
net.mcreator.generator.mapping.NameMapper

public class NameMapper extends Object
  • Field Details

  • Constructor Details

    • NameMapper

      public NameMapper(Workspace workspace, String mappingSource)
  • Method Details

    • setWorkspace

      public void setWorkspace(Workspace workspace)
    • getWorkspace

      public Workspace getWorkspace()
    • getMappingSource

      public String getMappingSource()
    • resolveModNamespace

      public static String resolveModNamespace(@Nullable String resourceLocation, String modID)
      Replaces the "mod:" namespace alias at the start of the given resource location with the actual mod ID. Values not starting with the alias are returned unchanged.
      Parameters:
      resourceLocation - Resource location that may use the "mod:" namespace alias
      modID - Mod ID to replace the alias with
      Returns:
      Resource location with the actual mod ID as the namespace
    • resolveModNamespace

      public static String resolveModNamespace(@Nullable String resourceLocation, Workspace workspace)
    • getMapping

      public String getMapping(String origName)
    • getMapping

      public String getMapping(String origName, int mappingTable)