Events
Where your script code goes to be run at a certain time
Info
How to cancel an event
This will cancel the event.
Enable
This event will be called every time the script is enabled.
Disable
This event will be called every time the script is disabled.
Packet Events
Functions
Both packet events have this function
Function
Description
getPacketID()
Returns the packet ID as a Number (Should be used for comparison with a packet)
Packet Send
Called before packets are sent to server.
Packet Receive
Called on packets received, before the client handles them.
Tick
Called on each tick.
Motion
Called on motion updates.
Functions
Function
Description
setX(x)
Sets the players x position using the event
setY(y)
Sets the players y position using the event
setZ(z)
Sets the players z position using the event
getX()
Returns the current x pos of the player
getY()
Returns the current y pos of the player
getZ()
Returns the current z pos of the player
isOnGround()
Returns true the player is on ground
setGround(ground)
Sets the player's on ground state to the new state
getYaw()
Returns the players yaw as a Number
setYaw(yaw)
Sets the players yaw using the event
getPitch()
Returns the players pitch as a Number
setPitch(pitch)
Sets the players pitch using the event
isPre()
Returns true the event is onPre
isPost()
Returns true the event is onPost
setRotations(yaw, pitch)
Sets the players yaw and pitch at the same time
Move
Called when a player is moving.
Function
Description
setX(x)
Sets the players x position using the event
setY(y)
Sets the players y position using the event
setZ(z)
Sets the players z position using the event
getX()
Returns the current x pos of the player
getY()
Returns the current y pos of the player
getZ()
Returns the current z pos of the player
setSpeed(speed)
sets the the speed of the player
Render 3D
Called on the rendering of 3D objects.
Functions
Function
Description
getTicks()
Returns the event's ticks as a Number
Render 2D
Called on the rendering of 2D objects.
Function
Description
getWidth()
Returns the scaled resolution width as a Number
getHeight()
Returns the scaled resolution height as a Number
Shader
Everything in this event will be blurred when PostProcessing module is enabled and blur or bloom is enabled. You can tell if Bloom is enabled by using the following functions
Function
Description
isBloom()
Returns True if bloom is enabled
ChatReceivedEvent
This event is called every time a message is received in the chat
Functions
Function
Description
getRawMessage()
Returns the raw received message as a String
PlayerSendMessage
This event is called every time the player (i.e. the one using the script) sends a message in the chat
Functions
Function
Description
getMessage()
Returns the message as a String
WorldLoad
This event is called when a world is loaded in
Custom Block Render
This event is called when Animations is toggled and the mode is set to custom
Function
Description
getSwingProgress()
Returns the swing progress as a Number
getEquipProgress()
Returns the equip progress as a Number
doBlockTransformations()
Normalizes the translation of where the block should be
transformFirstPersonItem(
equipProgress, swingprogress)
Performs transformations prior to the rendering of a held item in first person.
Render Model
This event is called when an entity is rendered. on Pre before entity is rendered and on post after entity is rendered.
Function
Description
getEntity()
Returns an EntityLivingBase object of the entity that is being rendered
drawModel()
Draws the entity model
drawLayers()
Draws extra layers i.e. swords
Attack
This event is called when you are attacking an entity
Function
Description
getTargetEntity()
Returns an EntityLivingBase object of the entity that is being attacked
Last updated