client

The global instance of ClientAPI
field signature:
client
Method Property Fluent Description Representation
Field Type a ClientAPI

ClientAPI.getVersion

Example by ChloeSpacedOut:
Returns the Minecraft version of your client
overload 1:
client.getVersion()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.getDate

Returns a table with information about the client's current time
overload 1:
client.getDate()
Method Property Fluent Description Representation
Return Value a table

ClientAPI.isModLoaded

Checks if the client has loaded the given mod ID
overload 1:
client.isModLoaded(modID)
Method Property Fluent Description Representation
modID accepts a String
Return Value a Boolean

ClientAPI.getTranslatedString

Returns the translated string of the given key
Translation is done using the current client language
Optionally takes a single argument,
or a list with all arguments, that will populate the translation
overload 1:
client.getTranslatedString(text)
Method Property Fluent Description Representation
text accepts a String
Return Value a String
overload 2:
client.getTranslatedString(text, args)
Method Property Fluent Description Representation
text accepts a String
args accepts anything
Return Value a String

ClientAPI.getSubtitle

Returns the current subtitle text, or nil if the title or subtitle isn't visible
overload 1:
client.getSubtitle()
Method Property Fluent Description Representation
Return Value

ClientAPI.getTitle

Returns the current title text, or nil if the title isn't visible
overload 1:
client.getTitle()
Method Property Fluent Description Representation
Return Value

ClientAPI.isPaused

Example by ChloeSpacedOut:
events.TICK:register(function()
log(client.isPaused())
end)
Returns true if the client is paused
overload 1:
client.isPaused()
Method Property Fluent Description Representation
Return Value a Boolean

ClientAPI.getCameraRot

Example by ChloeSpacedOut:
Returns the rotation of the viewer's camera
overload 1:
client.getCameraRot()
Method Property Fluent Description Representation
Return Value a Vector3

ClientAPI.getCameraPos

Example by ChloeSpacedOut:
Returns the position of the viewer's camera
overload 1:
client.getCameraPos()
Method Property Fluent Description Representation
Return Value a Vector3

ClientAPI.getFOV

Example by ChloeSpacedOut:
Returns the current FOV option of the client, not including additional effects such as speed or sprinting
overload 1:
client.getFOV()
Method Property Fluent Description Representation
Return Value a Number

ClientAPI.getJavaVersion

Example by ChloeSpacedOut:
Returns your current Java version you're playing Minecraft with
overload 1:
client.getJavaVersion()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.getUsedMemory

Example by ChloeSpacedOut:
Returns the number of bytes of memory Minecraft is currently using
overload 1:
client.getUsedMemory()
Method Property Fluent Description Representation
Return Value an Integer

ClientAPI.getServerBrand

Example by ChloeSpacedOut:
Returns the type of server you're on
In singleplayer,
this is "Integrated"
overload 1:
client.getServerBrand()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.getFPSString

Example by ChloeSpacedOut:
Gets the FPS string of the client, displayed in the F3 menu
Contains info on the fps,
the fps limit, vsync, cloud types, and biome blend radius
overload 1:
client.getFPSString()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.getClientBrand

Returns the "version type" of your client, usually the client modloader brand
overload 1:
client.getClientBrand()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.getSoundStatistics

Returns a string containing information about the currently playing sounds on the client
This string appears in the F3 menu
overload 1:
client.getSoundStatistics()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.getEntityCount

Example by ChloeSpacedOut:
Returns the number of currently loaded entities
overload 1:
client.getEntityCount()
Method Property Fluent Description Representation
Return Value an Integer

ClientAPI.getVersionName

Returns the extended name of the Minecraft version of your client
overload 1:
client.getVersionName()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.getCurrentEffect

Example by ChloeSpacedOut:
Returns the path to the currently applied shader, used when spectating an entity that has different vision than normal
Normally returns nil
overload 1:
client.getCurrentEffect()
Method Property Fluent Description Representation
Return Value either a String or nil

ClientAPI.getChunkStatistics

Returns a string containing information about the player's chunk
This string appears in the F3 menu
overload 1:
client.getChunkStatistics()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.isSnapshot

Returns if the client is running a snapshot or full release version
overload 1:
client.isSnapshot()
Method Property Fluent Description Representation
Return Value a Boolean

ClientAPI.getParticleCount

Example by ChloeSpacedOut:
Returns the number of currently loaded particles
overload 1:
client.getParticleCount()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.isHudEnabled

Example by ChloeSpacedOut:
Returns true if the hud is enabled (F1 disables the HUD)
overload 1:
client.isHudEnabled()
Method Property Fluent Description Representation
Return Value a Boolean

ClientAPI.getTextWidth

Example by ChloeSpacedOut:
Returns the width of the given text in pixels
In case of multiple lines,
return the largest width of all lines
overload 1:
client.getTextWidth(text)
Method Property Fluent Description Representation
text accepts a String
Return Value an Integer

ClientAPI.getMousePos

Example by ChloeSpacedOut:
Returns the position of the mouse in pixels, relative to the top-left corner
overload 1:
client.getMousePos()
Method Property Fluent Description Representation
Return Value a Vector2

ClientAPI.getActiveLang

Example by ChloeSpacedOut:
Returns a string representation of the current game language
overload 1:
client.getActiveLang()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.getAllocatedMemory

Returns the maximum amount of memory that Minecraft could possibly use
overload 1:
client.getAllocatedMemory()
Method Property Fluent Description Representation
Return Value an Integer

ClientAPI.getSystemTime

Example by ChloeSpacedOut:
Returns the current system time in milliseconds
overload 1:
client.getSystemTime()
Method Property Fluent Description Representation
Return Value an Integer

ClientAPI.getWindowSize

Example by ChloeSpacedOut:
Returns the size of the Minecraft window in pixels, as {width, height}
overload 1:
client.getWindowSize()
Method Property Fluent Description Representation
Return Value a Vector2

ClientAPI.getMaxMemory

Example by ChloeSpacedOut:
Returns the maximum amount of memory that Minecraft will try to use
overload 1:
client.getMaxMemory()
Method Property Fluent Description Representation
Return Value an Integer

ClientAPI.getGuiScale

Example by ChloeSpacedOut:
Returns the current value of your Gui Scale setting
If you use auto,
then it gets the actual current scale
overload 1:
client.getGuiScale()
Method Property Fluent Description Representation
Return Value a Number

ClientAPI.isWindowFocused

Example by ChloeSpacedOut:
Returns true if the Minecraft window is currently focused
overload 1:
client.isWindowFocused()
Method Property Fluent Description Representation
Return Value a Boolean

ClientAPI.getTextHeight

Example by ChloeSpacedOut:
Returns the height of the given text in pixels
overload 1:
client.getTextHeight(text)
Method Property Fluent Description Representation
text accepts a String
Return Value an Integer

ClientAPI.hasShaderPackMod

Checks if the client has a Shader Pack mod installed
overload 1:
client.hasShaderPackMod()
Method Property Fluent Description Representation
Return Value a Boolean

ClientAPI.getTextDimensions

Returns the width and height of the given text, wrapping lines and trimming to a max width
overload 1:
client.getTextDimensions(text)
Method Property Fluent Description Representation
text accepts a String
Return Value a Vector2
overload 2:
client.getTextDimensions(text, maxWidth, wrap)
Method Property Fluent Description Representation
text accepts a String
maxWidth accepts an Integer
wrap accepts a Boolean
Return Value a Vector2

ClientAPI.getCameraDir

Returns a unit vector pointing in the direction that the camera is facing
overload 1:
client.getCameraDir()
Method Property Fluent Description Representation
Return Value a Vector3

ClientAPI.getShaderPackName

Returns a string with the current shader pack name, empty if none is being used.
overload 1:
client.getShaderPackName()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.getFiguraVersion

Gets the client Figura version
overload 1:
client.getFiguraVersion()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.isIntegratedServer

figura.docs.client.is_integrated_server
overload 1:
client.isIntegratedServer()
Method Property Fluent Description Representation
Return Value a Boolean

ClientAPI.generateUUID

Generates a random UUID
overload 1:
client.generateUUID()
Method Property Fluent Description Representation
Return Value a Varargs

ClientAPI.getServerData

Returns a table with information on the currently connected server (also for singleplayer worlds)
overload 1:
client.getServerData()
Method Property Fluent Description Representation
Return Value a table

ClientAPI.getViewer

Returns the player entity from the running client
overload 1:
client.getViewer()
Method Property Fluent Description Representation
Return Value a ViewerAPI

ClientAPI.getCameraEntity

Returns the entity the camera is currently targeting, so returns the entity you are currently spectating, including yourself
overload 1:
client.getCameraEntity()
Method Property Fluent Description Representation
Return Value an EntityAPI

ClientAPI.hasResource

Checks if the specific resource exists within the client resources
overload 1:
client.hasResource(path)
Method Property Fluent Description Representation
path accepts a String
Return Value a Boolean

ClientAPI.intUUIDToString

Converts an int array UUID (as 4 separated arguments) into its hexadecimal string representation
overload 1:
client.intUUIDToString(a, b, c, d)
Method Property Fluent Description Representation
a accepts an Integer
b accepts an Integer
c accepts an Integer
d accepts an Integer
Return Value a String

ClientAPI.uuidToIntArray

Converts a string UUID into its int array representation, returning a varargs of 4 ints
overload 1:
client.uuidToIntArray(uuid)
Method Property Fluent Description Representation
uuid accepts a String
Return Value a Varargs

ClientAPI.compareVersions

Compares two versions if they are less than (-1), equals (0) or greater than (1)
overload 1:
client.compareVersions(version1, version2)
Method Property Fluent Description Representation
version1 accepts a String
version2 accepts a String
Return Value an Integer

ClientAPI.getActionbar

Returns the current actionbar text, or nil if the action bar isn't visible
overload 1:
client.getActionbar()
Method Property Fluent Description Representation
Return Value

ClientAPI.getScoreboard

Returns data about the current scoreboard(s). Multiple scoreboards can be visible at the same time (sidebar, team sidebar, list, and below name), so each scoreboard is grouped by its display location
overload 1:
client.getScoreboard()
Method Property Fluent Description Representation
Return Value a table

ClientAPI.getFrameTime

Returns the current fraction between the last tick and the next tick
This is the value used as "delta" in the RENDER event
overload 1:
client.getFrameTime()
Method Property Fluent Description Representation
Return Value a Number

ClientAPI.getAtlas

Returns a TextureAtlasAPI object with information about the given atlas
Returns nil if the atlas was not found
overload 1:
client.getAtlas(path)
Method Property Fluent Description Representation
path accepts a String
Return Value a TextureAtlas

ClientAPI.listAtlases

Returns a list of all registered atlases paths
overload 1:
client.listAtlases()
Method Property Fluent Description Representation
Return Value a table

ClientAPI.getTabList

Returns a table with the text shown in the tablist
overload 1:
client.getTabList()
Method Property Fluent Description Representation
Return Value a table

ClientAPI.getRegistry

Returns a list of all values in the specified registry
See the `registries` enum for a list of valid registries
overload 1:
client.getRegistry(registryName)
Method Property Fluent Description Representation
registryName accepts a String
Return Value a table

ClientAPI.getFPS

Example by ChloeSpacedOut:
events.TICK:register(function()
log(client.getFPS())
end)
Gets the FPS of the client
Returns 0 if the fps counter isn't ready yet (or if your PC is just that bad)
overload 1:
client.getFPS()
Method Property Fluent Description Representation
Return Value an Integer

ClientAPI.getEntityStatistics

Returns a string containing information about the loaded entities on the client
This string appears in the F3 menu
overload 1:
client.getEntityStatistics()
Method Property Fluent Description Representation
Return Value a String

ClientAPI.isDebugOverlayEnabled

Example by ChloeSpacedOut:
Returns true if the F3 screen is currently open
overload 1:
client.isDebugOverlayEnabled()
Method Property Fluent Description Representation
Return Value a Boolean

ClientAPI.getActiveResourcePacks

Returns a table with the active resource pack names
overload 1:
client.getActiveResourcePacks()
Method Property Fluent Description Representation
Return Value a table

ClientAPI.getScaledWindowSize

Example by ChloeSpacedOut:
Returns the size of the window in Minecraft's internal GUI units
overload 1:
client.getScaledWindowSize()
Method Property Fluent Description Representation
Return Value a Vector2

ClientAPI.hasShaderPack

Checks if the client is currently using a Shader Pack
overload 1:
client.hasShaderPack()
Method Property Fluent Description Representation
Return Value a Boolean

ClientAPI.getEnum

figura.docs.client.getEnum
overload 1:
client.getEnum(enumName)
Method Property Fluent Description Representation
enumName accepts a String
Return Value a table
a a