Advanced Macros

Mods
10,786 Downloads Last Updated: Nov 11, 2019 Game Version: Forge

File Details

Filename advancedmacros-3.10.0.jar
Uploaded by Theincgi
Uploaded Jan 15, 2018
Game Version 1.12.2
Size 1.07 MB
Downloads 66
MD5 c336e0214d5cdc92e53833a10a1ee354
Supported Minecraft 1.12 Versions
1.12.2
Supported Java Versions
Java 8

Changelog

A lot of changes:

Fixed:

  • Bug where setting a color for something with the 0x######## format would always set it to black.
  • Bug where changing the column count for the script browser would result in a crash.
  • Changing a texture on a HUD item after it's created to an unloaded/new texture now works.

Added:

  • httpRequest(Table: args)
  • hud2D.clearAll()
  • hud2D.getSize()
  • hud2D.addRectangle()
  • hud2D.addBox()
  • hud2D.addText()
  • hud2D.addImage()
  • hud3D.addBlock()  (replaces addHoloBlock())
  • hud3D.addText()     (replaces addHoloText())
  • hud3D.clearAll()      (replaces clearWorldHud())
  • tooltips for all new functions


httpRequest examples:
{url="http://www.google.com"}
{
    url = "http://www.google.com"  --anything below here is optional
    requestMethod="Get", --other methods include POST, HEAD, OPTIONS, PUT, DELETE, TRACE

    requestProperties = {    

         someProperty="someValue"

         someOtherRequestProperty="someOtherValue"
    },

    timeout = 5, -- time out in seconds, default is 10, Zero is infinite

    doOutput = true, --Set the DoOutput flag to true if you intend to use the URL connection for output. Default: false

    followRedirects=false, --Default: true
}

 

returns a table with
  input - a table with functions for reading the result

  output - if output was enabled, includes a table with functions

  err - sometimes if an error occurs

  getURL() 

  getResponseCode()

  getContentType()

  getContentEncoding()

  getContentLength()

  getFollowRedirects()

  disconnect()

 

the input table (and err) includes:

readByte()

readChar()

readLine()

available()

close()

 

output table includes:
writeByte(Number: byte)

writeBytes(Table: tableOfBytes) or writeBytes(Number:byte, Number:byte, Number:byte.......)

write(String: sString)

flush()

close()



all hud2D elements have:
setX(Number:x)

setY(Number:y)

getX() - Number:x

getY() - Number:y

setPosition(Number:x, Number:y)

getPosition() - Number:x, Number:y

setOpacity(Number: opacity) -- 0 through 1

getOpacity() Number:opacity

enableDraw() or enableDraw(Boolean:b)

disableDraw()

destroy()

setAllowFrameInterpolation(Boolean: allow) --this one will use MC's partial tick to smooth movements for translation
                             off by default
getAllowFrameInterpolation() Boolean:allowFrameInterpolation


hud2D's Rectangle also includes:
  setColor( 0x######## ) or setColor(r,g,b,a) or set({r=##, g=##, b=##, a=##}) # being some digit, and a being alpha will default to 255 if left out in the last 2 examples
getColor() -- returns as {r=##,g=##,b=##,a=##}

setWidth(Number: width)

setHeight(Number: height)

getWidth() Number:width
getHeight() Number:height


BTW: the color options there apply anywhere color is set

 

hud2D's Box includes everything from Rectangle and:
setThickness(Number:thickness) --can be fractional too, haven't tested now it looks however

getThickness() Number:thickness --defaults to 1

 

hud2D's Text includes the standard set plus:

setText(String:text) --works with & formats as well

getText() String:text

 

hud2D's Image includes everything from rectangle and:

setImage(String:image) or setImage(Texture:texture) --texture can be acquired from getSettings() or getImage

getImage() Texture:texture

setUV(Number:uMin, Number:vMin, Number:uMax, Number:vMax) -- changes where in the image is used, all values range 0 to 1, going past that range will cause it to tile

getUV() - Number:uMin, Number:vMin, Number:uMax,Number:vMax