Class GeneratorUtils
java.lang.Object
net.mcreator.generator.GeneratorUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FilegetCommonRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) Returns the nearest directory that contains both the source root and the resource root of the workspace.static FilegetModAssetsRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) static FilegetModDataRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) static FilegetResourceRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) static FilegetSourceRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) static FilegetSpecificRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration, String root)
-
Constructor Details
-
GeneratorUtils
public GeneratorUtils()
-
-
Method Details
-
getSourceRoot
public static File getSourceRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) -
getResourceRoot
public static File getResourceRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) -
getCommonRoot
@Nullable public static File getCommonRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) Returns the nearest directory that contains both the source root and the resource root of the workspace. For generators that share a single root for both, this is that root itself.- Returns:
- the common root of source and resource roots, or null if they do not share an ancestor
-
getModAssetsRoot
public static File getModAssetsRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) -
getModDataRoot
public static File getModDataRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration) -
getSpecificRoot
public static File getSpecificRoot(Workspace workspace, GeneratorConfiguration generatorConfiguration, String root)
-