Skip to main content

Renderer

The renderer API is accessed with the renderer global. Like so: renderer:setRenderVehicle(false)

Altering the Camera


setOffsetCameraPivot(Vector3)

Sets the offset pivot for the camera

The pivot will also move the camera

Its values are relative to the world

Nil values for pivot are assumed to be 0

For absolute rotation values, check out the non-offset pivot function

Example:

renderer:setOffsetCameraPivot(0, 2, 0)

getCameraOffsetPivot()

Gets the offset pivot for the camera

Example:

renderer:getCameraOffsetPivot()

setCameraPivot(Vector3)

Sets the absolute pivot for the camera

The pivot will also move the camera

Its values are relative to the World

Nil values for pivot are assumed to be 0

For relative rotation values, check out the "offset" pivot function

Example:

rendereR:setCameraPivot(0, 2, 0)

getCameraPivot()

Gets the absolute pivot for the camera

Example:

renderer:getCameraPivot()

setCameraPos(Vector3)

Sets the position offset for the camera

Nil values for position are assumed to be 0

Example:

renderer:setCameraPos(0, 2, 0)

getCameraPos()

Gets the position offset for the camera

Example:

renderer:getCameraPos()

setOffsetCameraRot(Vector3)

Sets the offset rotation for the camera

Nil values for rotation are assumed to be 0

Angles are given in degrees

For absolute rotation values, check out the non-offset rot function

Example:

renderer:setOffsetCameraRot(0, 90, 0)

getCameraOffsetRot()

Gets the offset rotation for the camera

Example:

renderer:getCameraOffsetRot()

setCameraRot(Vector3)

Sets the absolute rotation of the camera

The position is not taken into account for roll

Nil values for rotation are assumed to be 0

For relative rotation values, check out the "offset" rot function

Example:

renderer:setCameraRot(0, 90, 0)

getCameraRot()

Gets the absolute rotation of the camera

Example:

renderer:getCameraRot()

setCameraMatrix(matrix4)

Sets the camera matrix with the given matrix


getCameraMatrix()

Returns the modified camera matrix

Example:

renderer:getCameraMatrix()

setCameraNormal(matrix3)

Sets the camera normal matrix with the given matrix


getCameraNormal()

Returns the modified camera normal matrix

Example:

renderer:getCameraNormal()

Detecting Camera Information


isFirstPerson()

Checks if your camera is in the first person view

Example:

renderer:isFirstPerson()

isCameraBackwards()

Checks if your camera is in the backwards third person view

Element Rendering

Example:

renderer:isCameraBackwards()

setOutlineColor(Vector3)

Sets the glowing effect outline color

Example:

renderer:setOutlineColor(0, 0, 1)

getOutlineColor()

Gets the glowing effect outline color set by setOutlineColor

Example:

renderer:getOutlineColor()

setBlockOutlineColor(Vector4)

Sets the color of the selected block outline

Default alpha is 0.4

Might not be compatible with shaders

Example:

renderer:setBlockOutlineColor(0, 0, 1, 0.4)

getBlockOutlineColor()

Returns the set color for the selected block outline

Example:

renderer:getBlockOutlineColor()

setPrimaryFireTexture(string)

Sets a custom primary fire texture, to render while the entity is on fire

The effect is compound by two layers

The secondary layer is what renders in first person

The absence of a secondary layer uses the primary layer as fallback

The expected string is a resource path to a Minecraft block

Example:

renderer:setPrimaryFireTexture("textures/block/soul_fire_0")

getPrimaryFireTexture()

Gets the current custom primary fire texture

Example:

renderer:getPrimaryFireTexture()

setSecondaryFireTexture(string)

Sets a custom secondary fire texture, to render while the entity is on fire The effect is compound by two layers

The secondary layer is what renders in first person

The absence of a secondary layer uses the primary layer as fallback

The expected string is a resource path to a Minecraft block

Example:

renderer:setSecondaryFireTexture("textures/block/soul_fire_1")

getSecondaryFireTexture()

Gets the current custom secondary fire texture

Example:

renderer:getSecondaryFireTexture()

setCrosshairOffset(Vector2)

Sets the offset of your crosshair

Example:

renderer:setCrosshairOffset(20, 20)

getCrosshairOffset()

Gets the offset of your crosshair

Example:

renderer:getCrosshairOffset()

setRenderCrosshair(bool)

Sets if your crosshair should be rendered

Example:

renderer:setRenderCrosshair(false)

shouldRenderCrosshair()

Check if your crosshair should be rendered

Example:

renderer:shouldRenderCrosshair()

setRenderVehicle(bool)

Sets if your vehicle should be rendered

Example:

renderer:setRenderVehicle(false)

shouldRenderVehicle()

Check if your vehicle should be rendered

Example:

renderer:shouldRenderVehicle()

setRenderFire(bool)

Sets if the fire effect should be rendered

Example:

renderer:setRenderFire(false)

shouldRenderFire()

Checks if the fire effect should be rendered

Example:

renderer:shouldRenderFire()

setRenderHUD(bool)

Sets if the vanilla HUD should be rendered

Example:

renderer:setRenderHUD(false)

shouldRenderHUD()

Checks if the vanilla HUD should be rendered

Example:

renderer:shouldRenderHUD()

setForcePaperdoll(bool)

Sets if the paperdoll should forcefully be rendered

Example:

renderer:setForcePaperdoll(true)

shouldForcePaperdoll()

Check if the paperdoll should forcefully be rendered

Example:

renderer:shouldForcePaperdoll()

setShadowRadius(number)

Sets the radius of your shadow

The default value is nil, which means to use the vanilla default of 0.5 for players

The maximum value is 12

Example:

renderer:setShadowRadius(12)

getShadowRadius()

Gets the radius of your shadow

Example:

renderer:getShadowRadius()

setUpsideDown(bool)

Sets if this entity will be rendered upside down

Example:

renderer:setUpsideDown(true)

isUpsideDown()

Checks if this entity should be rendered upside down

Example:

renderer:isUpsideDown()

setBlockOutlineColor(Vector4)

Sets the color of the selected block outline

Default alpha is 0.4

Might not be compatible with shaders

Example:

renderer:setBlockOutlineColor(0, 0, 1, 0.4)

getBlockOutlineColor()

Returns the set color for the selected block outline Default nil

Example:

renderer:getBlockOutlineColor()

setPostEffect(string)

Sets the current rendering effect

Same as the discontinued Super Secret Settings

Example:

renderer:setPostEffect("invert")

setFOV(number)

Sets the multiplier of your fov The default value is nil, which means no changes will be applied to your fov

Example:

renderer:setFOV(2)

getFOV()

Gets the multiplier of your FOV, as set by setFOV

Example:

renderer:getFOV()

setRenderLeftArm(bool)

Toggle if the left arm should be rendered in first person, regardless if you are holding an item or not

Example:

renderer:setRenderLeftArm(true)

getRenderLeftArm()

Gets if the left arm should be rendered while in first person

Example:

renderer:getRenderLeftArm()

setRenderRightArm(bool)

Toggle if the right arm should be rendered in first person, regardless if you are holding an item or not

Example:

renderer:setRenderRightArm(true)

getRenderRightArm()

Gets if the right arm should be rendered while in first person

Example:

renderer:getRenderRightArm()

setEyeOffset(Vector3)

Sets an offset for the entity eye position, altering the targeted block and entity

caution

This function can be caught by anti-cheats and could get you banned from servers

Example:

renderer:setEyeOffset(0, 2, 0)

getEyeOffset()

Returns the offset for the entity eye position, as set by setEyeOffset

Example:

renderer:getEyeOffset()