### setup() - ZipPack.Handler Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-18.html Removes existing conversions and starts a new one. ```APIDOC ## setup() ### Description Removes Existing Conversions and starts new one. ### Method setup ### Signature `setup()` ### Parameters None. ### Returns No return value. ``` -------------------------------- ### setup() - Pack.Handler Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-18.html Deletes existing conversions and sets up pack for conversion. ```APIDOC ## setup() ### Description Deletes existing conversions and sets up pack for conversion. ### Method setup ### Signature `setup()` ### Parameters None. ### Returns No return value. ``` -------------------------------- ### getWidth() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Gets the image width. ```APIDOC ## getWidth() ### Description Gets the image width. ### Method getWidth ### Returns - int - The image width. ``` -------------------------------- ### getSupportedVersions Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/Util.html Gets an array of all Minecraft versions supported by the Resource Pack Converter. ```APIDOC ## getSupportedVersions ### Description Returns a list of all Minecraft versions supported by the Resource Pack Converter. ### Method public static String[] getSupportedVersions(Gson gson) ### Parameters - **gson** (Gson) - Required - Gson object to use for JSON parsing. ### Returns - **String[]** - Array of supported Minecraft version strings. ``` -------------------------------- ### ZipPack.Handler Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/ZipPack.Handler.html The ZipPack.Handler class provides lifecycle methods for zip pack conversion: setup, finish, and getConvertedZipPath. ```APIDOC ## Class: ZipPack.Handler ### Description Handler for zip pack conversion lifecycle. ### Constructor - `Handler(Pack pack)` - Creates a new handler for the given pack. ### Methods #### `void setup()` - **Description**: Removes existing conversions and starts a new one. #### `void finish()` - **Description**: Runs after the program is finished. #### `Path getConvertedZipPath()` - **Returns**: `Path` - The path to the converted zip file. #### `String toString()` - **Returns**: `String` - String representation of the handler. ``` -------------------------------- ### Pack.getWorkingPath() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Gets the working path of the pack. ```APIDOC ## Pack.getWorkingPath() ### Description Gets the working path of the pack. ### Method getWorkingPath ### Signature `public Path getWorkingPath()` ### Returns - **Path** - The working path. ``` -------------------------------- ### Pack.getHandler() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Gets the handler associated with the pack. ```APIDOC ## Pack.getHandler() ### Description Gets the handler associated with the pack. ### Method getHandler ### Signature `public Pack.Handler getHandler()` ### Returns - **Pack.Handler** - The handler. ``` -------------------------------- ### getSupportedVersions(com.google.gson.Gson gson) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/Util.html Gets the supported versions of Resource Pack Converter as an array of strings. This method uses a Gson instance to parse version data. ```APIDOC ## getSupportedVersions(Gson gson) ### Description Gets the supported versions of Resource Pack Converter. ### Method static String[] getSupportedVersions(com.google.gson.Gson gson) ### Parameters - **gson** (com.google.gson.Gson) - Required - Gson instance for JSON parsing. ### Returns - **String[]** - An array of supported version strings. ``` -------------------------------- ### Pack.getFileName() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Gets the file name of the pack. ```APIDOC ## Pack.getFileName() ### Description Gets the file name of the pack. ### Method getFileName ### Signature `public String getFileName()` ### Returns - **String** - The file name. ``` -------------------------------- ### getVersionFromProtocol Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/Util.html Gets the Minecraft version string corresponding to a given protocol number. ```APIDOC ## getVersionFromProtocol ### Description Retrieves the Minecraft version string from a protocol number. ### Method public static String getVersionFromProtocol(Gson gson, int protocol) ### Parameters - **gson** (Gson) - Required - Gson object to use for JSON parsing. - **protocol** (int) - Required - Protocol version number. ### Returns - **String** - The Minecraft version number. ``` -------------------------------- ### getHeight() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Gets the image height. ```APIDOC ## getHeight() ### Description Gets the image height. ### Method getHeight ### Returns - int - The image height. ``` -------------------------------- ### void runDir() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/forwards/ForwardsPackConverter.html Runs the conversion on a directory. ```APIDOC ## Method: runDir ### Description Runs the conversion on a directory. ### Signature `void runDir()` ### Parameters None. ### Returns void ``` -------------------------------- ### PropertiesEx() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/PropertiesEx.html Constructs a new PropertiesEx instance. This is the default constructor with no parameters. ```APIDOC ## PropertiesEx() ### Description Constructs a new PropertiesEx instance. ### Method Constructor ### Signature `public PropertiesEx()` ### Parameters None ### Returns A new PropertiesEx object. ``` -------------------------------- ### Pack.getOriginalPath() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Gets the original path of the pack. ```APIDOC ## Pack.getOriginalPath() ### Description Gets the original path of the pack. ### Method getOriginalPath ### Signature `public Path getOriginalPath()` ### Returns - **Path** - The original path. ``` -------------------------------- ### Run ResourcePackConverter with input directory Source: https://github.com/agentdid127/resourcepackconverter/blob/master/README.MD Sets the input directory using the --input parameter. The program will look for valid resource packs in the specified directory. ```bash java -jar ResourcePackConverter.jar --input input/ ``` -------------------------------- ### backgroundImage(Path background, int alpha) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Places an image in the background using transparency. Throws IOException if an error occurs. ```APIDOC ## backgroundImage(Path background, int alpha) ### Description Places an image in the background using transparency. ### Method backgroundImage ### Parameters - `background` (Path) - Required - Path to the background image. - `alpha` (int) - Required - Alpha transparency value. ### Throws - `IOException` - If an I/O error occurs. ``` -------------------------------- ### void runPack(Pack pack) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/forwards/ForwardsPackConverter.html Runs the conversion on a specific pack. ```APIDOC ## Method: runPack ### Description Runs the conversion on a specific pack. ### Signature `void runPack(Pack pack)` ### Parameters - **pack** (Pack) - Required - The pack to convert. ### Returns void ``` -------------------------------- ### getHeightMultiplier() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Gets the height scale multiplier (imageHeight/defaultHeight). ```APIDOC ## getHeightMultiplier() ### Description Gets the height scale multiplier (imageHeight/defaultHeight). ### Method getHeightMultiplier ### Returns - double - The height scale multiplier. ``` -------------------------------- ### Run ResourcePackConverter with default settings Source: https://github.com/agentdid127/resourcepackconverter/blob/master/README.MD Runs the converter in the current directory, converting from 1.12.x to 1.13.x. The program looks for valid resource packs in the current directory. ```bash java -jar ResourcePackConverter.jar ``` -------------------------------- ### getWidthMultiplier() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Gets the width scale multiplier (imageWidth/defaultWidth). ```APIDOC ## getWidthMultiplier() ### Description Gets the width scale multiplier (imageWidth/defaultWidth). ### Method getWidthMultiplier ### Returns - double - The width scale multiplier. ``` -------------------------------- ### BackwardsPackConverter(String from, String to, String light, boolean minify, Path input, boolean debug, PrintStream out) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/backwards/BackwardsPackConverter.html Constructor for creating a BackwardsPackConverter instance with conversion parameters. ```APIDOC ## Constructor: BackwardsPackConverter(String from, String to, String light, boolean minify, Path input, boolean debug, PrintStream out) ### Description Creates a new BackwardsPackConverter instance with the specified conversion parameters. ### Parameters - **from** (String) - Required - The source Minecraft version. - **to** (String) - Required - The target Minecraft version. - **light** (String) - Required - The light version or mode. - **minify** (boolean) - Required - Whether to minify the output. - **input** (Path) - Required - The input resource pack path. - **debug** (boolean) - Required - Whether to enable debug output. - **out** (PrintStream) - Required - The output stream for logging. ``` -------------------------------- ### PropertiesEx() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/PropertiesEx.html Constructor for the PropertiesEx class. ```APIDOC ## PropertiesEx() ### Description Constructs a new PropertiesEx instance. This class extends java.util.Properties and is used for handling properties with extended functionality. ### Method Constructor ### Signature `public PropertiesEx()` ### Parameters None ### Returns A new PropertiesEx object. ``` -------------------------------- ### getFileName() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/ZipPack.html Gets the file name of the zip pack. ```APIDOC ## getFileName() ### Description Returns the file name of the zip pack. ### Method `public String getFileName()` ### Returns - **String** - The file name of the zip pack. ``` -------------------------------- ### Run ResourcePackConverter with custom versions Source: https://github.com/agentdid127/resourcepackconverter/blob/master/README.MD Converts from version 1.12 to 1.16.2 using the --from and --to parameters. Use these to update to any other version than the default 1.12-1.13. ```bash java -jar ResourcePackConverter.jar --from 1.12 --to 1.16.2 ``` -------------------------------- ### getLatestProtocol Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/Util.html Gets the latest protocol number supported by the converter. ```APIDOC ## getLatestProtocol ### Description Returns the latest protocol version number supported by the Resource Pack Converter. ### Method public static int getLatestProtocol(Gson gson) ### Parameters - **gson** (Gson) - Required - Gson object to use for JSON parsing. ### Returns - **int** - The latest protocol number. ``` -------------------------------- ### GUI Class Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/GUI.html Documentation for the GUI class, including its constructor and methods. ```APIDOC ## GUI() ### Description Constructs a new GUI instance. ### Constructor `public GUI()` ### Parameters None. ### Returns No return value. ``` ```APIDOC ## main(String[] args) ### Description Static entry point for the GUI application. ### Method `public static void main(String[] args)` ### Parameters - **args** (String[]) - Required - Command-line arguments passed to the application. ### Returns No return value. ``` ```APIDOC ## $$$getRootComponent$$$() ### Description Returns the root component of the GUI. ### Method `public JComponent $$$getRootComponent$$$()` ### Parameters None. ### Returns - **JComponent** - The root component of the GUI. ``` -------------------------------- ### getHeight() - ImageConverter Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-8.html Method in class com.agentdid127.resourcepack.library.utilities.ImageConverter. Get the Image Height. ```APIDOC ## getHeight() ### Description Get the Image Height. ### Method GET ### Endpoint com.agentdid127.resourcepack.library.utilities.ImageConverter#getHeight() ### Parameters None ### Response #### Success Response - **height** (int) - The image height. #### Response Example ```json { "height": 0 } ``` ``` -------------------------------- ### Constructor ForwardsPackConverter(String from, String to, String light, boolean minify, Path input, boolean debug, PrintStream out) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/forwards/ForwardsPackConverter.html Constructs a ForwardsPackConverter with the specified conversion parameters. ```APIDOC ## Constructor: ForwardsPackConverter ### Description Creates a new ForwardsPackConverter instance with the given parameters. ### Signature `public ForwardsPackConverter(String from, String to, String light, boolean minify, Path input, boolean debug, PrintStream out)` ### Parameters - **from** (String) - Required - The source version. - **to** (String) - Required - The target version. - **light** (String) - Required - The light version. - **minify** (boolean) - Required - Whether to minify the output. - **input** (Path) - Required - The input path. - **debug** (boolean) - Required - Whether debug mode is enabled. - **out** (PrintStream) - Required - The output stream. ``` -------------------------------- ### ZipPack(Path path) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/ZipPack.html Constructor for creating a ZipPack instance. ```APIDOC ## ZipPack(Path path) ### Description Constructs a new ZipPack instance with the specified path. ### Constructor `public ZipPack(Path path)` ### Parameters - **path** (Path) - Required - The path to the zip pack file. ``` -------------------------------- ### ForwardsPackConverter(String from, String to, String light, boolean minify, Path input, boolean debug, PrintStream out) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/forwards/ForwardsPackConverter.html Constructs a ForwardsPackConverter with the specified conversion parameters. ```APIDOC ## Constructor ### Description Creates a new ForwardsPackConverter instance. ### Signature `ForwardsPackConverter(String from, String to, String light, boolean minify, Path input, boolean debug, PrintStream out)` ### Parameters - **from** (String) - Required - The source version. - **to** (String) - Required - The target version. - **light** (String) - Required - The light version. - **minify** (boolean) - Required - Whether to minify the output. - **input** (Path) - Required - The input path. - **debug** (boolean) - Required - Whether to enable debug mode. - **out** (PrintStream) - Required - The output stream. ``` -------------------------------- ### getVersionProtocol(Gson, String) - Util Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-8.html Static method in class com.agentdid127.resourcepack.library.utilities.Util. Gets version protocol number. ```APIDOC ## getVersionProtocol(Gson, String) ### Description Gets version protocol number. ### Method `getVersionProtocol(Gson, String)` ### Class `com.agentdid127.resourcepack.library.utilities.Util` ### Parameters - `Gson` (Gson) - Required - The Gson object used for JSON parsing. - `String` (String) - Required - The version string. ### Return Type Not specified in source. ``` -------------------------------- ### backgroundImage(BufferedImage backgroundImage, int alpha) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Places an image in the background using transparency. Throws IOException if an error occurs during processing. ```APIDOC ## backgroundImage(BufferedImage backgroundImage, int alpha) ### Description Places an image in the background using transparency. ### Method backgroundImage ### Parameters - `backgroundImage` (BufferedImage) - Required - The background image to place. - `alpha` (int) - Required - The transparency level. ### Throws - IOException - If an I/O error occurs. ``` -------------------------------- ### newImage(int newWidth, int newHeight) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Creates a new image with the specified width and height. ```APIDOC ## newImage(int newWidth, int newHeight) ### Description Creates a new image with the specified width and height. ### Method `void newImage(int newWidth, int newHeight)` ### Parameters - **newWidth** (int) - Required - The width of the new image. - **newHeight** (int) - Required - The height of the new image. ``` -------------------------------- ### getVersionProtocol Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/Util.html Gets the protocol number for a given Minecraft version string using the provided Gson object. ```APIDOC ## getVersionProtocol ### Description Retrieves the protocol version number for a given Minecraft version string. ### Method public static int getVersionProtocol(Gson gson, String version) ### Parameters - **gson** (Gson) - Required - Gson object to use for JSON parsing. - **version** (String) - Required - Minecraft version number (e.g., "1.20.4"). ### Returns - **int** - The protocol integer number. ``` -------------------------------- ### runDir() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/forwards/ForwardsPackConverter.html Runs the directory conversion process. ```APIDOC ## Method: runDir ### Description Executes the conversion on the directory specified in the constructor. ### Signature `public void runDir() throws IOException` ### Throws - **IOException** - If an I/O error occurs during conversion. ``` -------------------------------- ### Pack(Pack path) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Constructor for the Pack class. Initializes a new Pack instance with the given path. ```APIDOC ## Pack(Pack path) ### Description Constructor for the Pack class. Initializes a new Pack instance with the given path. ### Method Constructor ### Parameters - **path** (Path) - Required - The path to the resource pack. ``` -------------------------------- ### setParent(String, String, String, String) - ModelConverter (backwards) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-18.html Gets parent object and sets a new one in the backwards ModelConverter. ```APIDOC ## setParent(String, String, String, String) ### Description Gets parent object and sets a new one. ### Method setParent ### Signature `setParent(String parent, String newParent, String key, String value)` ### Parameters - **parent** (String) - Required - The original parent identifier. - **newParent** (String) - Required - The new parent identifier. - **key** (String) - Required - The key to modify. - **value** (String) - Required - The new value. ### Returns No return value. ``` -------------------------------- ### FileUtil() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/FileUtil.html Constructor for the FileUtil class. ```APIDOC ## FileUtil() ### Description Public constructor for the FileUtil class. ### Method Constructor ### Signature `public FileUtil()` ``` -------------------------------- ### getVersionFromProtocol(com.google.gson.Gson gson, int protocol) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/Util.html Gets the Minecraft version string from a protocol number. This method uses a Gson instance to parse version data. ```APIDOC ## getVersionFromProtocol(Gson gson, int protocol) ### Description Gets the Minecraft version from a protocol number. ### Method static String getVersionFromProtocol(com.google.gson.Gson gson, int protocol) ### Parameters - **gson** (com.google.gson.Gson) - Required - Gson instance for JSON parsing. - **protocol** (int) - Required - The protocol number. ### Returns - **String** - The Minecraft version string. ``` -------------------------------- ### newImage(int newWidth, int newHeight) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Creates a new image to store with the specified width and height. ```APIDOC ## newImage(int newWidth, int newHeight) ### Description Creates a new image to store with the specified width and height. ### Method newImage ### Parameters - `newWidth` (int) - Required - New image width. - `newHeight` (int) - Required - New image height. ``` -------------------------------- ### Texture Constructors Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/forwards/impl/textures/slicing/Texture.html Constructors for creating Texture instances with various parameters. ```APIDOC ## Texture Constructors ### Texture(String path, Box box, boolean remove, JsonObject predicate, JsonObject metadata) ### Description Creates a new Texture with the specified path, box, removal flag, predicate, and metadata. ### Parameters - **path** (String) - Required - The path of the texture. - **box** (Box) - Required - The box associated with the texture. - **remove** (boolean) - Required - Whether the texture should be removed. - **predicate** (JsonObject) - Required - The predicate for the texture. - **metadata** (JsonObject) - Required - The metadata for the texture. ### Texture(String path, Box box, boolean remove, JsonObject predicate) ### Description Creates a new Texture with the specified path, box, removal flag, and predicate. Metadata is not set. ### Parameters - **path** (String) - Required - The path of the texture. - **box** (Box) - Required - The box associated with the texture. - **remove** (boolean) - Required - Whether the texture should be removed. - **predicate** (JsonObject) - Required - The predicate for the texture. ### Texture(String path, Box box, boolean remove) ### Description Creates a new Texture with the specified path, box, and removal flag. Predicate and metadata are not set. ### Parameters - **path** (String) - Required - The path of the texture. - **box** (Box) - Required - The box associated with the texture. - **remove** (boolean) - Required - Whether the texture should be removed. ### Texture(String path, Box box) ### Description Creates a new Texture with the specified path and box. Removal flag, predicate, and metadata are not set. ### Parameters - **path** (String) - Required - The path of the texture. - **box** (Box) - Required - The box associated with the texture. ``` -------------------------------- ### getVersionProtocol(com.google.gson.Gson gson, String version) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/Util.html Gets the protocol number for a given Minecraft version string. This method uses a Gson instance to parse version data. ```APIDOC ## getVersionProtocol(Gson gson, String version) ### Description Gets the version protocol number. ### Method static int getVersionProtocol(com.google.gson.Gson gson, String version) ### Parameters - **gson** (com.google.gson.Gson) - Required - Gson instance for JSON parsing. - **version** (String) - Required - The Minecraft version string. ### Returns - **int** - The protocol number. ``` -------------------------------- ### Run ResourcePackConverter from console Source: https://github.com/agentdid127/resourcepackconverter/wiki/Usage Basic command to run the console version of the converter. Replace and with Minecraft version numbers, e.g., 1.12 and 1.18. ```bash $ java -jar ResourcePackConverter.jar --from --to ``` -------------------------------- ### FileUtil Class Methods Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/FileUtil.html Static utility methods for file operations such as copying, moving, deleting, merging, and renaming files and directories. ```APIDOC ## copyDirectory(Path src, Path dest) ### Description Copies a directory from the source path to the destination path. ### Method static void ### Parameters - **src** (Path) - Required - The source directory path. - **dest** (Path) - Required - The destination directory path. ### Returns void ``` ```APIDOC ## copyIfExists(Path in, Path out) ### Description Copies a file from the input path to the output path if the input file exists. ### Method static void ### Parameters - **in** (Path) - Required - The input file path. - **out** (Path) - Required - The output file path. ### Returns void ``` ```APIDOC ## deleteDirectoryAndContents(Path dirPath) ### Description Deletes the full directory and all its contents. ### Method static void ### Parameters - **dirPath** (Path) - Required - The directory path to delete. ### Returns void ``` ```APIDOC ## ensureParentExists(Path path) ### Description Ensures that the parent directory of the given path exists. ### Method static void ### Parameters - **path** (Path) - Required - The path whose parent directory should exist. ### Returns void ``` ```APIDOC ## fileExistsCorrectCasing(Path path) ### Description If the file exists, returns the file with the correct casing. ### Method static boolean ### Parameters - **path** (Path) - Required - The file path to check. ### Returns boolean - true if the file exists with correct casing, false otherwise. ``` ```APIDOC ## mergeDirectories(File dir1, File dir2) ### Description Takes dir2 and merges it into dir1. ### Method static Boolean ### Parameters - **dir1** (File) - Required - The destination directory. - **dir2** (File) - Required - The source directory to merge into dir1. ### Returns Boolean - true if the merge was successful, false otherwise. ``` ```APIDOC ## moveIfExists(Path in, Path out) ### Description Moves a file from the input path to the output path if the input file exists. ### Method static void ### Parameters - **in** (Path) - Required - The input file path. - **out** (Path) - Required - The output file path. ### Returns void ``` ```APIDOC ## renameFile(Path file, String newName) ### Description Renames a file to the specified new name. ### Method static Boolean ### Parameters - **file** (Path) - Required - The file to rename. - **newName** (String) - Required - The new name for the file. ### Returns Boolean - true if the rename was successful, false otherwise. ``` -------------------------------- ### newImage(int newWidth, int newHeight, int type) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Creates a new image with the specified width, height, and type. ```APIDOC ## newImage(int newWidth, int newHeight, int type) ### Description Creates a new image with the specified width, height, and type. ### Method `void newImage(int newWidth, int newHeight, int type)` ### Parameters - **newWidth** (int) - Required - The width of the new image. - **newHeight** (int) - Required - The height of the new image. - **type** (int) - Required - The image type (e.g., BufferedImage.TYPE_INT_ARGB). ``` -------------------------------- ### Pack.createHandler() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Creates a handler for the pack. ```APIDOC ## Pack.createHandler() ### Description Creates a handler for the pack. ### Method createHandler ### Signature `public Pack.Handler createHandler()` ### Returns - **Pack.Handler** - The created handler. ``` -------------------------------- ### newImage(int newWidth, int newHeight, int type) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Creates a new image to store with the specified width, height, and type. ```APIDOC ## newImage(int newWidth, int newHeight, int type) ### Description Creates a new image to store with the specified width, height, and type. ### Method newImage ### Parameters - `newWidth` (int) - Required - New image width. - `newHeight` (int) - Required - New image height. - `type` (int) - Required - Image type. ``` -------------------------------- ### createHandler() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/ZipPack.html Creates a handler for the zip pack. ```APIDOC ## createHandler() ### Description Creates a new ZipPack.Handler for this pack. ### Method `public ZipPack.Handler createHandler()` ### Returns - **ZipPack.Handler** - A new handler instance for this zip pack. ``` -------------------------------- ### backgroundImage(Path background, int alpha) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Places an image in the background using transparency. ```APIDOC ## backgroundImage(Path background, int alpha) ### Description Places an image in the background using transparency. ### Parameters - **background** (Path) - Required - The path to the background image. - **alpha** (int) - Required - The alpha transparency value. ``` -------------------------------- ### BomDetector(String rootDirectory, String... fileExtensions) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/BomDetector.html Constructor for BomDetector. Initializes the detector with a root directory and optional file extensions to filter which files to process. ```APIDOC ## BomDetector(String rootDirectory, String... fileExtensions) ### Description Constructor for the BomDetector class. Initializes the detector with a root directory and optional file extensions to filter which files to process. ### Method Constructor ### Parameters - **rootDirectory** (String) - Required - The root directory to scan for files. - **fileExtensions** (String...) - Optional - File extensions to filter which files to process. ### Usage Example ```java BomDetector detector = new BomDetector("/path/to/root", "txt", "java"); ``` ``` -------------------------------- ### store() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Saves the image to its default location. ```APIDOC ## store() ### Description Saves the image to its default location. ### Method `boolean store()` ### Returns - **boolean** - True if the image was saved successfully, false otherwise. ``` -------------------------------- ### store() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Saves the image. Returns a boolean indicating success. ```APIDOC ## store() ### Description Saves the image. ### Method store ### Returns - boolean - True if the save was successful. ### Throws - IOException - If an I/O error occurs. ``` -------------------------------- ### Util.readFromFile(Path) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-17.html Static method in class com.agentdid127.resourcepack.library.utilities.Util that reads content from a file at the given path. ```APIDOC ## readFromFile(Path) ### Description Reads content from a file at the specified path. ### Method Static method in class com.agentdid127.resourcepack.library.utilities.Util ### Parameters - **path** (Path) - The path to the file to read. ### Returns File content read from the specified path. ``` -------------------------------- ### FileUtil.copyDirectory(Path, Path) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-4.html Static method that copies a directory from a source path to a destination path. ```APIDOC ## FileUtil.copyDirectory(Path, Path) ### Description Copies a directory from the source path to the destination path. ### Method Static method ### Signature `static void copyDirectory(Path source, Path destination)` ### Parameters - **source** (Path) - Required - The source directory path. - **destination** (Path) - Required - The destination directory path. ``` -------------------------------- ### BackwardsPackConverter Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/backwards/BackwardsPackConverter.html Constructor for creating a BackwardsPackConverter instance. ```APIDOC ## Constructor: BackwardsPackConverter ### Description Creates a new BackwardsPackConverter instance with the specified conversion parameters. ### Signature `public BackwardsPackConverter(String from, String to, String light, boolean minify, Path input, boolean debug, PrintStream out)` ### Parameters - **from** (String) - Required - The source version. - **to** (String) - Required - The target version. - **light** (String) - Required - The light version. - **minify** (boolean) - Required - Whether to minify the output. - **input** (Path) - Required - The input path. - **debug** (boolean) - Required - Whether to enable debug mode. - **out** (PrintStream) - Required - The output stream for logging. ``` -------------------------------- ### backgroundImage(BufferedImage backgroundImage, int alpha) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Places an image in the background using transparency. ```APIDOC ## backgroundImage(BufferedImage backgroundImage, int alpha) ### Description Places an image in the background using transparency. ### Parameters - **backgroundImage** (BufferedImage) - Required - The background image to place. - **alpha** (int) - Required - The alpha transparency value. ``` -------------------------------- ### Pack.toString() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Returns a string representation of the pack. ```APIDOC ## Pack.toString() ### Description Returns a string representation of the pack. ### Method toString ### Signature `public String toString()` ### Returns - **String** - A string representation of the pack. ``` -------------------------------- ### moveIfExists(Path in, Path out) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/FileUtil.html Moves a file from the input path to the output path if the input file exists. Throws an IOException if an I/O error occurs during the move operation. ```APIDOC ## moveIfExists(Path in, Path out) ### Description Moves a file from the input path to the output path if the input file exists. ### Method public static void moveIfExists(Path in, Path out) throws IOException ### Parameters - **in** (Path) - Required - The source file path to move - **out** (Path) - Required - The destination file path ### Throws - **IOException** - If an I/O error occurs during the move operation ``` -------------------------------- ### setImage(int defaultWIn, int defaultHIn) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Sets the current image with the given default width and height. Throws IOException if an error occurs. ```APIDOC ## setImage(int defaultWIn, int defaultHIn) ### Description Sets the current image with the given default width and height. ### Method setImage ### Parameters - `defaultWIn` (int) - Required - Default width input. - `defaultHIn` (int) - Required - Default height input. ### Throws - `IOException` - If an I/O error occurs. ``` -------------------------------- ### ImageConverter(Integer, Integer, Path) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-10.html Constructor for the ImageConverter class. Initializes a new ImageConverter instance with the specified width, height, and path. ```APIDOC ## ImageConverter(Integer, Integer, Path) ### Description Default constructor for the ImageConverter class. ### Constructor ImageConverter(Integer, Integer, Path) ### Parameters - **Integer** - Required - Width parameter - **Integer** - Required - Height parameter - **Path** - Required - File path parameter ``` -------------------------------- ### Converter Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/Converter.html Documentation for the abstract Converter class, including constructor and abstract method. ```APIDOC ## Converter ### Description Abstract class representing a converter in the resourcepack library. It provides the constructor and abstract method for converting a pack. ### Constructor `Converter(PackConverter packConverter)` - Creates a converter with the specified PackConverter. ### Method `abstract void convert(Pack pack) throws IOException` ### Parameters #### Constructor Parameters - `packConverter` (PackConverter) - Required - The PackConverter instance associated with this converter. #### Method Parameters - `pack` (Pack) - Required - The pack to convert. ### Throws - `IOException` - If an I/O error occurs during conversion. ### Usage Example ```java // Example usage in a subclass extends Converter { public MyConverter(PackConverter packConverter) { super(packConverter); } @Override public void convert(Pack pack) throws IOException { // conversion logic } } ``` ### Notes This is an abstract class; implement `convert` in a subclass. ``` -------------------------------- ### store(Path locationIn, String type) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Saves the image as the provided type at the provided location. Returns a boolean indicating success. ```APIDOC ## store(Path locationIn, String type) ### Description Saves the image as the provided type at the provided location. ### Method store ### Parameters - `locationIn` (Path) - Required - The location to save the image. - `type` (String) - Required - The image type to save as. ### Returns - boolean - True if the save was successful. ### Throws - IOException - If an I/O error occurs. ``` -------------------------------- ### propagate Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/Util.html Wraps a Throwable into a RuntimeException and returns it. ```APIDOC ## propagate ### Description Takes a Throwable and returns it as a RuntimeException, useful for propagating checked exceptions. ### Method public static RuntimeException propagate(Throwable t) ### Parameters - **t** (Throwable) - Required - The throwable to propagate. ### Returns - **RuntimeException** - The throwable as a RuntimeException. ``` -------------------------------- ### runPack(Pack pack) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/forwards/ForwardsPackConverter.html Runs the pack conversion on the given Pack object. ```APIDOC ## Method: runPack ### Description Executes the conversion process on the provided pack. ### Signature `public void runPack(Pack pack)` ### Parameters - **pack** (Pack) - Required - The pack to convert. ``` -------------------------------- ### ImageConverter Constructor Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Creates an ImageConverter instance with default dimensions and a source image path. Initializes the image and graphics context. ```APIDOC ## ImageConverter Constructor ### Description Creates an ImageConverter instance with default dimensions and a source image path. Initializes the image and graphics context. ### Method Constructor ### Signature `public ImageConverter(Integer defaultWIn, Integer defaultHIn, Path locationIn) throws IOException` ### Parameters - `defaultWIn` (Integer) - Required - Default width for the image. - `defaultHIn` (Integer) - Required - Default height for the image. - `locationIn` (Path) - Required - Path to the source image file. ### Throws - `IOException` - If an I/O error occurs while reading the image. ``` -------------------------------- ### void convert(Pack pack) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/forwards/impl/AnimationConverter.html Converts the given pack by applying animation fixes. This method is part of the Converter interface and throws IOException if an error occurs during conversion. ```APIDOC ## Method: convert ### Description Converts the given pack by applying animation fixes. This method is part of the Converter interface and throws IOException if an error occurs during conversion. ### Signature `public void convert(Pack pack) throws IOException` ### Parameters - **pack** (Pack) - The pack to convert. ### Throws - **IOException** - If an I/O error occurs during conversion. ``` -------------------------------- ### grayscale() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Grayscales the image. ```APIDOC ## grayscale() ### Description Grayscales the image. ### Method grayscale ### Parameters None. ``` -------------------------------- ### setImage(int defaultWIn, int defaultHIn) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Sets the current image with the given default width and height. ```APIDOC ## setImage(int defaultWIn, int defaultHIn) ### Description Sets the current image with the given default width and height. ### Method `void setImage(int defaultWIn, int defaultHIn)` ### Parameters - **defaultWIn** (int) - Required - The default width. - **defaultHIn** (int) - Required - The default height. ``` -------------------------------- ### store(Path locationIn) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Saves the image at the provided location. Returns a boolean indicating success. ```APIDOC ## store(Path locationIn) ### Description Saves the image at the provided location. ### Method store ### Parameters - `locationIn` (Path) - Required - The location to save the image. ### Returns - boolean - True if the save was successful. ### Throws - IOException - If an I/O error occurs. ``` -------------------------------- ### subImage(int x, int y, int x2, int y2, int storeX, int storeY) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Takes part of an image and stores it in the new image. ```APIDOC ## subImage(int x, int y, int x2, int y2, int storeX, int storeY) ### Description Takes part of an image and stores it in the new image. ### Method subImage ### Parameters - `x` (int) - Required - Start x coordinate. - `y` (int) - Required - Start y coordinate. - `x2` (int) - Required - End x coordinate. - `y2` (int) - Required - End y coordinate. - `storeX` (int) - Required - X coordinate in the new image. - `storeY` (int) - Required - Y coordinate in the new image. ``` -------------------------------- ### parse(Path path) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Static method that checks the type of pack it is and returns the Pack information. It parses the given path to determine the pack type and returns a Pack object. ```APIDOC ## parse(Path path) ### Description Static method that checks the type of pack it is and returns the Pack information. It parses the given path to determine the pack type and returns a Pack object. ### Method parse (static) ### Parameters - **path** (Path) - Required - Pack Path ### Return Type Pack ### Returns The Pack information ``` -------------------------------- ### createHandler() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Creates a new Pack.Handler instance for this pack. The handler is used to process the pack. ```APIDOC ## createHandler() ### Description Creates a new Pack.Handler instance for this pack. The handler is used to process the pack. ### Method createHandler ### Return Type Pack.Handler ``` -------------------------------- ### subImage(int x, int y, int x2, int y2, int storeX, int storeY, int flip) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Only allows for the number 1 and flips it both horizontally and vertically. ```APIDOC ## subImage(int x, int y, int x2, int y2, int storeX, int storeY, int flip) ### Description Only allows for the number 1 and flips it both horizontally and vertically. ### Method `void subImage(int x, int y, int x2, int y2, int storeX, int storeY, int flip)` ### Parameters - **x** (int) - Required - The x-coordinate of the top-left corner of the sub-image. - **y** (int) - Required - The y-coordinate of the top-left corner of the sub-image. - **x2** (int) - Required - The x-coordinate of the bottom-right corner of the sub-image. - **y2** (int) - Required - The y-coordinate of the bottom-right corner of the sub-image. - **storeX** (int) - Required - The x-coordinate where the sub-image will be stored. - **storeY** (int) - Required - The y-coordinate where the sub-image will be stored. - **flip** (int) - Required - The flip mode (only 1 is allowed, flips both horizontally and vertically). ``` -------------------------------- ### subImage(int x, int y, int x2, int y2, int storeX, int storeY, int flip) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/ImageConverter.html Only allows for the number 1 and flips it both horizontally and vertically. ```APIDOC ## subImage(int x, int y, int x2, int y2, int storeX, int storeY, int flip) ### Description Only allows for the number 1 and flips it both horizontally and vertically. ### Method subImage ### Parameters - `x` (int) - Required - Start x coordinate. - `y` (int) - Required - Start y coordinate. - `x2` (int) - Required - End x coordinate. - `y2` (int) - Required - End y coordinate. - `storeX` (int) - Required - X coordinate in the new image. - `storeY` (int) - Required - Y coordinate in the new image. - `flip` (int) - Required - Flip flag (only 1 allowed). ``` -------------------------------- ### BomDetector(String, String...) - Constructor Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-3.html Constructor for the BomDetector class, which detects Byte Order Marks (BOM) in files. It takes a string and optional additional strings. ```APIDOC ## BomDetector(String, String...) ### Description Constructor for the BomDetector class, which detects Byte Order Marks (BOM) in files. ### Method Constructor ### Parameters - **input** (String) - The input string to check for BOM. - **encodings** (String...) - Optional list of encodings to check. ### Returns No return value (constructor). ``` -------------------------------- ### BomDetector Constructor Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/BomDetector.html Creates a BomDetector instance with the specified root directory and file extensions to filter files. ```APIDOC ## BomDetector Constructor ### Description Creates a BomDetector instance with the specified root directory and file extensions to filter files. ### Signature `public BomDetector(String rootDirectory, String... fileExtensions)` ### Parameters - **rootDirectory** (String) - Required - The root directory to scan for files. - **fileExtensions** (String...) - Optional - File extensions to filter which files are processed. ``` -------------------------------- ### void convert(Pack pack) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/backwards/impl/textures/ParticleTextureConverter.html Updates particles in the given pack. This method is specified by the Converter class and throws IOException. ```APIDOC ## Method: convert ### Description Updates Particles in the provided pack. ### Signature `public void convert(Pack pack) throws IOException` ### Parameters - `pack` (Pack) - Required - The pack to update. ### Throws - `IOException` - If an I/O error occurs during conversion. ``` -------------------------------- ### CreativeTabsConverter(PackConverter) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-4.html Constructor for the CreativeTabsConverter class. Initializes a converter with a PackConverter instance. ```APIDOC ## CreativeTabsConverter(PackConverter) ### Description Constructor for the CreativeTabsConverter class. Initializes a converter with a PackConverter instance. ### Method Constructor ### Signature `CreativeTabsConverter(PackConverter converter)` ### Parameters - **converter** (PackConverter) - Required - The PackConverter instance used for conversion. ``` -------------------------------- ### FileUtil.copyIfExists(Path, Path) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/index-files/index-4.html Static method that copies a file or directory if it exists from source to destination. ```APIDOC ## FileUtil.copyIfExists(Path, Path) ### Description Copies a file or directory if it exists from the source path to the destination path. ### Method Static method ### Signature `static void copyIfExists(Path source, Path destination)` ### Parameters - **source** (Path) - Required - The source path. - **destination** (Path) - Required - The destination path. ``` -------------------------------- ### Pack.parse(Path path) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Static method that checks the type of pack it is and returns a Pack instance. ```APIDOC ## Pack.parse(Path path) ### Description Checks the type of pack it is and returns a Pack instance. ### Method parse ### Signature `public static Pack parse(Path path)` ### Parameters - **path** (Path) - Required - The path to the pack. ### Returns - **Pack** - The parsed Pack instance. ``` -------------------------------- ### store(OutputStream out, String comments) Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/utilities/PropertiesEx.html Stores the properties to an output stream with comments. ```APIDOC ## store(OutputStream out, String comments) ### Description Stores the properties to the specified output stream with the given comments. This method overrides the store method from java.util.Properties to provide extended functionality. ### Method store ### Signature `public void store(OutputStream out, String comments)` ### Parameters - **out** (OutputStream) - Required - The output stream to write the properties to. - **comments** (String) - Required - The comments to include in the properties file. ### Returns void ``` -------------------------------- ### getFileName() Source: https://github.com/agentdid127/resourcepackconverter/blob/master/docs/com/agentdid127/resourcepack/library/pack/Pack.html Returns the file name of the pack. ```APIDOC ## getFileName() ### Description Returns the file name of the pack. ### Method getFileName ### Return Type String ```