JavaScript



You'll probably need a basic understanding of programming and JavaScript to understand the following. Make sure to go into the advanced options tab, enabled javascript and change the compiler type to "js"! JavaScript gives you a lot of control! Use at your own risk, if you accidentally cause harm to your game, I will laugh at you.

Sections? Functions!



Each section has it's own function which must return a string! Example: 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;

List of functions and their descriptions:


All parameters are non-optional, if they are optional for legacy reasons, it won't stay this way!
Function Description Return type Notes
Logging
log(Any message) Writes to the game console. (DEPRECATED) None DEPRECATED.
Use console.log(Any message)
warn(Any message) Writes to the game console. (DEPRECATED) None DEPRECATED.
Use console.warn(Any message)
error(Any message) Writes to the game console. (DEPRECATED) None DEPRECATED.
Use console.error(Any message)
alert(Any message) Sends a message in the chat. None
Reading variables
getVar(String variable) Returns the variable with the given name (ex. fps, key_h). Any Aliases: getVariable, get
getNumber(String variable) Returns the Number variable with the given name. Number
getString(String variable) Returns the String variable with the given name. String
getBoolean(String variable) Returns the Boolean variable with the given name. Boolean
getItem(Number slot) Returns the item in the given name. ItemStack ItemStack class has the following properties: {String name, Number count, Number maxcount, Number durability, Number maxdurability}
setVal(String variable, Any Object) Sets the variable with the given name to the given object. None
Drawing inventory items
item(String itemid, Number x, Number y, Number scale) Draws the item with the provided itemid on the provided X, Y positions on screen with the provided scale. None
slot(Number slot, Number x, Number y, Number scale, Boolean showcount) 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
armor(Number slot, Number x, Number y, Number scale, Boolean showcount) 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
offhand(Number x, Number y, Number scale, Boolean showcount) 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
text(Number x, Number y, String text, Number scale, Number color, Boolean shadow, Boolean background, Number backgroundcolor) 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
texture(String id, Number x, Number y, Number width, Number height) Draws a minecraft texture with the provided ID in the provided x and y positons with the provided width and height. None
image(String filename, Number x, Number y, Number width, Number height) 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
statusbars(String filename, Number x, Number y, Number width, Number height) Draws the health and hunger bars in the provided x and y positon. None
xpbar(String filename, Number x, Number y, Number width, Number height) Draws the Exp bar in the provided x and y positon. None
hotbar(String filename, Number x, Number y, Number width, Number height) Draws the hotbar in the provided x and y positon. None
helditemtooltip(String filename, Number x, Number y, Number width, Number height) Draws the item tooltip in the provided x and y positon. None
Vertex rendering
texturevertices(String filename, Number[] vertexarray, Number[] texturearray) 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
colorvertices(Number[] vertexarray, Number color) Draws a shape with the provided color and vertex array. None See Vertex rendering for more information
texturevertices_con(String filename, Number[] vertexarray, Number[] texturearray) 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
texturevertices_con(Number[] vertexarray, Number color) Draws a shape with the provided color and vertex array (Continous). None See Vertex rendering for more information
Misc
strWidth(String text) Returns the length of the string. Number
compile(String filename, String compilertype) 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}
exists(String filename) Returns true if a file exists in the hudder config dir. Boolean

Here is a simple Example:


function topleft() { let fps = getVal("fps"); setVal("fpsbutbetter", fps+2); return "thy fps+2 is " + getVal("fpsbutbetter"); }