Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

How The Script Works

thefourCraft edited this page Dec 5, 2022 · 2 revisions

This script converts a resource pack for the game Minecraft from one version to another. It is a bash script, which is a type of script that is executed by the command line interpreter on Linux and macOS.

The script begins by defining some color placeholders, which will be used later to print messages to the user in different colors. It then defines a function called status_message that is used to print messages to the user in different colors depending on the type of message.

Next, the script defines a function called dependency_check that is used to check whether the required programs are installed. If any of the required programs are not installed, the function will print an error message and exit the script.

The script then defines a function called user_input that is used to prompt the user for input when necessary. This is used to ask the user for information such as the default asset version to use.

The script also defines a function called wait_for_jobs that is used to prevent the script from starting the next job until there is a free CPU thread available. This is used to ensure that the script does not use more CPU resources than are available.

The script then proceeds to check whether the input resource pack exists and to parse any user-defined flags that were passed to the script. It then warns the user about the limitations of the script and proceeds to extract the input resource pack.

After extracting the input resource pack, the script performs several operations on the extracted files, such as merging any additional resource packs, attaching materials, and so on. The exact operations performed will depend on the user-defined flags passed to the script.

Finally, the script creates the output resource pack and exits.

Clone this wiki locally