-
Notifications
You must be signed in to change notification settings - Fork 12
Available Functions
AlexIIL edited this page May 31, 2021
·
3 revisions
Functions are only usable in minecraft 1.12.2, for CLS 1.4.x and CLS 1.5.x.
To view a list of all available functions you can replace a function with an invalid function call - something like help_me_sdafkhgsdjkfgasjgdkg()
. This will print out a list of every available function to the log file.
-
status
: A variable that holds the current status - which might be "Stitching Textures", "Loading Mods", etc. -
sub_status
: A variable that holds the current sub-status - which might be "minecraft:textures/blocks/oak_planks", "BuildCraft Core", etc. -
percentage
: A variable that holds the current percentage progress, between 0.0 and 1.0 (although due to bugs it can go above 1 occasionally).
-
tip()
: A function that returns the first tip. -
tip_count()
: A function that returns the number of tips loaded. -
has_tips()
: A function that returns true iftip_count()
is greater than 0, false otherwise. -
tip(int index)
: A function that returns the tip with the given index.
-
screen_width
: A variable that holds the width of the displayed window (that CLS can render in), in pixels. -
screen_height
: A variable that holds the width of the displayed window (that CLS can render in), in pixels. -
time
: A variable that holds the number of seconds that have passed since CLS started loading, as a double.
In addition to the standard
-
forge_progress_bar_count()
: Returns the number of progress bars that forge currently holds. -
forge_progress_bar_title(int index)
: Returns the title of the current progress bar, or "Invalid Index" if the given index is less than 0 or greater than or equal toforge_progress_bar_count()
. -
forge_progress_bar_message(int index)
: Returns the message of the current progress bar, or "Invalid Index" if the given index is less than 0 or greater than or equal toforge_progress_bar_count()
. -
forge_progress_bar_percent(int index)
: Returns the percentage of the current progress bar, or 0 if the given index is less than 0 or greater than or equal toforge_progress_bar_count()
.
-
memory_free()
: Returns the amount of memory that is available for use in the future, in MiB (1024*1024). -
memory_total()
: Returns the total amount of memory available for use now and in the future, in MiB. This can vary over time, if-Xms
isn't specified to be equal to-Xmx
. -
memory_used()
: Returns the amount of memory that is in use at the moment, in MiB. Always equal tomemory_total() - memory_free()
. -
memory_max()
: Returns the maximum possible amount of memory that can be used, in MiB. According to the java documentation this might be a value in excess of petabytes if the JVM hasn't been given a limit.
In addition there are byte-based versions of the ones above:
-
memory_bytes_free()
: Returnsmemory_free()
, but in bytes rather than MiB. -
memory_bytes_total()
: Returnsmemory_total()
, but in bytes rather than MiB. -
memory_bytes_used()
: Returnsmemory_used()
, but in bytes rather than MiB. -
memory_bytes_max()
: Returnsmemory_max()
, but in bytes rather than MiB.