Class WorkspaceUtils
java.lang.Object
net.mcreator.workspace.WorkspaceUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<ModElement> findOrphanedModElements(Workspace workspace) Finds mod element definitions (.mod.json files) in the workspace folder that are not on the mod element list of the workspace.static FilegetWorkspaceFileForWorkspaceFolder(File workspaceDir) static voidremoveAutoGeneratedCode(Workspace workspace, ProgressDialog.ProgressUnit progressUnit) static voidverifyPluginRequirements(Workspace workspace, GeneratorConfiguration generatorConfiguration)
-
Constructor Details
-
WorkspaceUtils
public WorkspaceUtils()
-
-
Method Details
-
getWorkspaceFileForWorkspaceFolder
-
verifyPluginRequirements
public static void verifyPluginRequirements(Workspace workspace, GeneratorConfiguration generatorConfiguration) throws MissingGeneratorFeaturesException -
findOrphanedModElements
Finds mod element definitions (.mod.json files) in the workspace folder that are not on the mod element list of the workspace. This can happen if the workspace file was not saved after mod elements were added (e.g. due to a crash) or was restored from an older copy.- Returns:
- Mod elements for the orphaned definitions found, not yet added to the workspace
-
removeAutoGeneratedCode
public static void removeAutoGeneratedCode(Workspace workspace, @Nullable ProgressDialog.ProgressUnit progressUnit)
-