Class WorkspaceUtils

java.lang.Object
net.mcreator.workspace.WorkspaceUtils

public class WorkspaceUtils extends Object
  • Constructor Details

    • WorkspaceUtils

      public WorkspaceUtils()
  • Method Details

    • getWorkspaceFileForWorkspaceFolder

      public static File getWorkspaceFileForWorkspaceFolder(File workspaceDir)
    • verifyPluginRequirements

      public static void verifyPluginRequirements(Workspace workspace, GeneratorConfiguration generatorConfiguration) throws MissingGeneratorFeaturesException
      Throws:
      MissingGeneratorFeaturesException
    • findOrphanedModElements

      public static 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. 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)