function topleft() {
return "this will appear in the top left section!";
}
function bottomleft() {
return "this in the bottom left!";
}
function topright() {
return "this in the top right!";
}
function bottomright() {
return "this in the bottom right!";
}
The functions will be executed in the following order:
topleft()
bottomleft()
topright()
bottomright()
createElements()
to change the size of a section just make a global variable with the section's name + "scale". Example:
var topleftscale = 2;
var bottomleftscale = 2;
var toprightscale = 2;
var bottomrightscale = 2;
Function | Description | Return type | Notes |
---|---|---|---|
Logging | |||
Writes to the game console. (DEPRECATED) | None | DEPRECATED. Use |
|
Writes to the game console. (DEPRECATED) | None | DEPRECATED. Use |
|
Writes to the game console. (DEPRECATED) | None | DEPRECATED. Use |
|
Sends a message in the chat. | None | ||
Reading variables | |||
Returns the variable with the given name (ex. fps, key_h). | Any | Aliases: getVariable, get | |
Returns the Number variable with the given name. | Number | ||
Returns the String variable with the given name. | String | ||
Returns the Boolean variable with the given name. | Boolean | ||
Returns the item in the given name. | ItemStack | ItemStack class has the following properties: {String name, Number count, Number maxcount, Number durability, Number maxdurability} | |
Sets the variable with the given name to the given object. | None | ||
Drawing inventory items | |||
Draws the item with the provided itemid on the provided X, Y positions on screen with the provided scale. | None | ||
Draws the item from the slot provided on the provided X, Y positions on screen with the provided scale. will also draw durability and item count if showcount is true. | None | Can be used alongside getVal("selectedslot") to draw the item the player is holding | |
Draws the armor from the slot provided on the provided X, Y positions on screen with the provided scale. will also draw durability if showcount is true. | None | 0 for boots, 1 for leggings, 2 for chestplate and 3 for helmet | |
Draws the item held in the offhand on the provided X, Y positions on screen with the provided scale. will also draw durability if showcount is true. | None | 0 for boots, 1 for leggings, 2 for chestplate and 3 for helmet | |
Drawing custom elements | |||
Draws text on the screen with the provided scale and color. if shadow is provided then a shadow will also be drawn regardless of the option selected in hudder's settings. | None | ||
Draws a minecraft texture with the provided ID in the provided x and y positons with the provided width and height. | None | ||
Draws the image located in the provided path (relative to Hudder's config folder) in the provided x and y positons with the provided width and height. | None | Aliases: drawPNG, drawImage | |
Drawing builtin hud elements | |||
Draws the health and hunger bars in the provided x and y positon. | None | ||
Draws the Exp bar in the provided x and y positon. | None | ||
Draws the hotbar in the provided x and y positon. | None | ||
Draws the item tooltip in the provided x and y positon. | None | ||
Vertex rendering | |||
Draws the image located in the provided path (relative to Hudder's config folder) with the provided texture and vertex array. | None | See Vertex rendering for more information | |
Draws a shape with the provided color and vertex array. | None | See Vertex rendering for more information | |
Draws the image located in the provided path (relative to Hudder's config folder) with the provided texture and vertex array (Continous). | None | See Vertex rendering for more information | |
Draws a shape with the provided color and vertex array (Continous). | None | See Vertex rendering for more information | |
Misc | |||
Returns the length of the string. | Number | ||
Compiles the file with the specified compilertype (or the javascript compiler if none is specified), returns the compile results and adds the elements created by the file. | CompileResult | CompileResult has the following properties {String topleft, String bottomleft, String topright, String bottomright, Number topleftscale, Number bottomleftscale, Number toprightscale, Number bottomrightscale} | |
Returns true if a file exists in the hudder config dir. | Boolean |
function topleft() {
let fps = getVal("fps");
setVal("fpsbutbetter", fps+2);
return "thy fps+2 is " + getVal("fpsbutbetter");
}