Package net.mcreator.workspace
Class WorkspaceFolderManager
java.lang.Object
net.mcreator.workspace.WorkspaceFolderManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionFile[]
getArmorTextureFilesForName
(String armorTextureName) getPathInWorkspace
(File file) Attempts to locate the provided file inside workspace folder and return its path relative to this folder.static File
getTextureFile
(String textureIdentifier, TextureType section) This method gets a PNG texture file depending on the desired type.getTexturesFolder
(TextureType section) getTexturesList
(TextureType section) boolean
isFileInWorkspace
(File file) Checks if the provided file is contained in the workspace folder.boolean
isFileInWorkspace
(File file, boolean silent) Checks if the provided file is contained in the workspace folder.void
removeStructure
(String name)
-
Constructor Details
-
WorkspaceFolderManager
-
-
Method Details
-
getSuggestedWorkspaceFoldersRoot
-
getWorkspaceFolder
-
isFileInWorkspace
Checks if the provided file is contained in the workspace folder.- Parameters:
file
- The file to check.- Returns:
- True if the provided file is inside the workspace folder.
-
isFileInWorkspace
Checks if the provided file is contained in the workspace folder.- Parameters:
file
- The file to check.silent
- Determines whether non-presence of input file in the workspace should be logged or not.- Returns:
- True if the provided file is inside the workspace folder.
-
getPathInWorkspace
Attempts to locate the provided file inside workspace folder and return its path relative to this folder.- Parameters:
file
- The input file.- Returns:
- File path relative to workspace folder or its absolute path if not found in the workspace.
-
getTextureFile
This method gets a PNG texture file depending on the desired type.
- Parameters:
textureIdentifier
-This is the name without the file extension of the texture file.
section
-This
TextureType
defines which path, defined by each generator, MCreator will search the texture file.- Returns:
A PNG
File
-
getStructureList
-
getArmorTextureFilesForName
-
getTexturesList
- Parameters:
section
-The
TextureType
we want to get the folder, defined by each generator.- Returns:
A list containing all texture files found in the
TextureType
provided.
-
removeStructure
-
getTexturesFolder
- Parameters:
section
-The
TextureType
we want to get the folder, defined by each generator.- Returns:
The folder storing texture files of the given
TextureType
.
-
getStructuresDir
-
getSoundsDir
-
getClientRunDir
-
getServerRunDir
-
getModElementsDir
-
getModelsDir
-
getModelAnimationsDir
-
getWorkspaceCacheDir
-
getModElementPicturesCacheDir
-
getWorkspaceBackupsCacheDir
-