All
Events
Actions
Expressions
Blocks
- No errors
Item used
Description: Called when a player has finished using an item
Pattern: (player used item|item used)
Accessor(s): Player Used item
Exemple(s):
 on item used:
    if item is minecraft:potion:
Post initialization
Description: Called after that 'on init:' has been dispatched on every mod. This is the third and last commonly called event during mod initialization.
Pattern: post init
Accessor(s):
Exemple(s):
 on post init:
Render of world
Client
Description: Called when world is rendered
Pattern: (render [of] world|world render)
Accessor(s): Partial ticks
Exemple(s):
 on render of world:
Living death
Cancelable
Description: This event is triggered just before an entity dies of damage.
Pattern: ((1;(living|entity))|(2;player)|(3;{entity|resource}))['s] death
Accessor(s): Victim Damage type Attacker
Exemple(s):
 on player death:\non zombie death:
Player jump
Cancelable
Client
Description: Called when a player jumps.
Pattern: [player] (jump|jumped)
Accessor(s): Player
Exemple(s):
 on player jump:
    cancel event #Forbid jumping
Render of experience bar
Client
Description: Called when experience bar is rendered
Pattern: render [of] (xp|experience) bar
Accessor(s):
Exemple(s):
 on render xp bar:
Block right clicked
Cancelable
Description: Called when a player clicks on a block
Pattern: [((1;left)|(2;right))] click on [[a] block of] {block} [with ((3;left)|(4;right)) hand]
Accessor(s): Player Clicked block
Exemple(s):
 on right click on minecraft:diamond_block:
Block broken
Cancelable
Description: Called when a player breaks a block
Pattern: [block] break [of {block}]
Accessor(s): Player Broken block
Exemple(s):
 on break:
    cancel event #Prevents players from breaking blocks
Block placed
Cancelable
Description: Called when a player places a block
Pattern: [block] place [of {block}]
Accessor(s): Player Placed block
Exemple(s):
 on place of minecraft:stone:
    cancel event #Prevents stone placing
Player login
Cancelable
Description: Called when a player logs in.
Pattern: [player] (login|connection)
Accessor(s): Player
Exemple(s):
 on player login:
World tick
Description: Called when the world ticks.
Pattern: world tick
Accessor(s): World
Exemple(s):
 on world tick:
Key input
Cancelable
Client
Description: Event that is fired whenever a registered key input is triggered.
Pattern: key input
Accessor(s):
Exemple(s):
 on key input:
Item right clicked
Cancelable
Description: Called when a player right clicks an item.
Pattern: [((1;client)|(2;server))] [(item|right)] click [with {itemtype}] [with ((3;left)|(4;right)) hand]
Accessor(s): Player Clicked item
Exemple(s):
 on item click with minecraft:emerald:
Player respawn
Description: This event is triggered when a player reappears in the world after dying or passing through the end portal to the overworld.
Pattern: [player] [re]spawn[ing]
Accessor(s): Player End conquered
Exemple(s):
 on respawn:
Item use
Cancelable
Description: Called when a player uses an item
Pattern: (player use[s] item|item use)
Accessor(s): Player Used item
Exemple(s):
 on item use:
    if item is minecraft:potion:
    cancel event
Command sent
Cancelable
Description: Called when a player sends a command.
Pattern: ([player] sen(d[ing]|(t|s)) [a] command|command sent)
Accessor(s): Sender Command parameters Command name
Exemple(s):
 on command sent:
    set command to "/help" #Edit command content
Script load
Description: Called when script is loaded.
Pattern: [script] load[ed]
Accessor(s): Script file
Exemple(s):
 on script load:
Player attack
Cancelable
Description: Called when a player attacks another entity.
Pattern: player attack[ing] [{entity|resource}]
Accessor(s): Attacker Victim
Exemple(s):
 on player attacking minecraft:pig :
    cancel event #Removes pvp
Player tick
Description: Called when the player ticks.
Pattern: player tick
Accessor(s): Player
Exemple(s):
 on player tick:
Item left clicked
Cancelable
Description: Called when a player left clicks an item. This event only fires on client side
Pattern: [item] left click [with {itemtype}] [with ((1;left)|(2;right)) hand]
Accessor(s): Player Clicked item
Exemple(s):
 on item left click with minecraft:emerald:
Window setup
Description: Called once when the game window is being set up.
Pattern: window setup
Accessor(s):
Exemple(s):
 on window setup:
    set window title to "Sqript !"
Player death drops
Cancelable
Description: This event is triggered when the death of an player causes the appearance of objects.
Pattern: drop[s] of player death
Accessor(s): Player Damage type Attacker Drops
Exemple(s):
 on drop of player death:
Render of player
Client
Description: Called when player is rendered
Pattern: (render[ing] [of] player|player['s] render[ing])
Accessor(s): Player Limb swing Limb swing amount Head yaw Head Pitch Partial ticks Left arm rotation Left arm position Left arm anchor Right arm rotation Right arm position Right arm anchor Left leg rotation Left leg position Left leg anchor Right leg rotation Right leg position Right leg anchor Head position Head rotation Head anchor
Exemple(s):
 on player render:
    set left arm rotation to [90,0,0]
Render of overlay
Client
Description: Called when overlay is rendered
Pattern: render [of] overlay
Accessor(s):
Exemple(s):
 on render overlay:
    draw textured rectangle at [-15,-7.5] with size [30,15] using texture sample:logo.png
Render of nameplates
Cancelable
Client
Description: Called when a nameplate is rendered
Pattern: render [of] [player['s]] nameplate
Accessor(s):
Exemple(s):
 on render of [player's] nameplate:
Message sent
Cancelable
Description: Called when a player sends a message.
Pattern: ([player] sen(d[ing]|t) [a] message|message sent)
Accessor(s): Sender Message
Exemple(s):
 on message sent:
    set message to "My message" #Edit message content
GUI opened
Client
Description: Called when a GUI is being opened.
Pattern: (GUI|gui) open[ed]
Accessor(s): GUI class name
Exemple(s):
 on gui open:
Mouse input
Cancelable
Client
Description: Event that is fired whenever a mouse input is triggered.
Pattern: mouse input
Accessor(s):
Exemple(s):
 on mouse input:
Render of chat
Cancelable
Client
Description: Called when chat is rendered
Pattern: render [of] chat
Accessor(s):
Exemple(s):
 on render chat:
Player movement
Cancelable
Description: Called when a player moves.
Pattern: player move[ment]
Accessor(s): Player
Exemple(s):
 on player movement:
    cancel event #Freezes the player
Button click
Client
Description: Called when a button is clicked.
Pattern: (button click|click on [a] button)
Accessor(s): Clicked button id
Exemple(s):
 on button click:
Render of health bar
Cancelable
Client
Description: Called when health bar is rendered
Pattern: render [of] health [bar]
Accessor(s):
Exemple(s):
 on render of health bar:
    cancel event #Hides the player's health bar
Initialization
Description: Called after 'on pre init:' and before 'on post init:' during mod startup.
Pattern: init
Accessor(s):
Exemple(s):
 on init:
Living damage
Cancelable
Description: This event is triggered on server side just before damage is applied to an entity.
Pattern: ((1;(living|entity))|(2;{entity|resource})) damage[d] [by {entity|resource}]
Accessor(s): Victim Damage type Damage amount Attacker
Exemple(s):
 on pig damage:
Item pickup
Cancelable
Description: Called when a player pickups an item
Pattern: (player pickup[s] item|item pickup)
Accessor(s): Player Picked up item
Exemple(s):
 on item pickup:
    if item is minecraft:bedrock:
        cancel event #Prevents bedrock pickup.
Player drop
Cancelable
Description: Event that is fired whenever a player tosses (Q) an item or drag-n-drops a stack of items outside the inventory GUI screens.
Pattern: [player] drop[ing]
Accessor(s): Player Item
Exemple(s):
 on player drop:
Server starting
Description: This event allows for customizations of the server, such as loading custom commands, perhaps customizing recipes or other activities.
Pattern: server start
Accessor(s): Server
Exemple(s):
 on server start:
Render of crosshair
Client
Description: Called when crosshair is rendered
Pattern: render [of] crosshair
Accessor(s):
Exemple(s):
 on render of crosshair:
Death drops
Cancelable
Description: This event is triggered when the death of an entity causes the appearance of objects.
Pattern: ((1;(living|entity))|(2;{entity|resource}))['s] drop[s] of death
Accessor(s): Victim Damage type Attacker Drops
Exemple(s):
 on living drop of death:
Living fall
Cancelable
Description: This event is triggered as soon as an EntityLivingBase falls.
Pattern: ((1;(living|entity))|(2;{entity|resource}))['s] fall
Accessor(s): Victim Distance Damage multiplier
Exemple(s):
 on living fall:
Render of food bar
Cancelable
Client
Description: Called when food bar is rendered
Pattern: render [of] food [bar]
Accessor(s):
Exemple(s):
 on render food bar:
Entity join World
Cancelable
Description: This event is triggered when an entity is added to the world.
Pattern: ((1;(living|entity))|(2;{entity|resource})) join world
Accessor(s): Entity World
Exemple(s):
 on entity join world:
Entity interact
Cancelable
Description: This event is triggered when a player interacts with an entity (right-click).
Pattern: [right] click on ((1;(living|entity))|(2;{entity|resource})) [entity]
Accessor(s): Interaction entity Interaction hand Player
Exemple(s):
 on right click on villager:
Player hit
Cancelable
Description: Called when a player is hit by another player.
Pattern: player (hit|attacked)
Accessor(s): Attacker Victim
Exemple(s):
 on player attacked:
    cancel event #Removes pvp
Pre initialization
Description: This is the first of three commonly called events during mod initialization.
Pattern: pre init
Accessor(s):
Exemple(s):
 on pre init:
Shuffle array
Description: Randomly shuffles the elements of an array.
Pattern: shuffle {array}
Exemple(s):
 shuffle [1,2,3,4,5,6]
Add an array to another array
Description: Adds the elements of an array to another array.
Pattern: add elements of {array} to {array}
Exemple(s):
 add [1,2,3] to [4,5,6]
Remove an array from an array
Description: Removes the elements of an array from another array.
Pattern: remove elements of {array} from {array}
Exemple(s):
 remove ["a","b"] from ["a","b","c"]
Sort elements of an array
Description: Sort an array in ascending or descending order if their elements are comparable. Dictionaries can also be sorted, in this case by default they are sorted by keys but you can also sort them by values.
Pattern: sort ((2;elements)|(3;keys)) of {array} [by] [((0;ascending)|(1;descending))] [order]
Exemple(s):
 sort elements of [1,5,7,4,2,3]
Replace substrings of a string
Description: Replace each given substring replaced by another string in a string.
Pattern: replace each {string} (by|with) {string} in {string}
Exemple(s):
 replace each "_" with " " in "Hello_world"
Draw text
Client
Description: Draws a string at a specific position on the screen.
Pattern: draw [(1;shadowed)] [(3;centered)] text {string} at {array} [with scale {number}] [[and] with color {number} [(2;without alpha)]]
Exemple(s):
 draw text "Health : %player's health%" at [10,10]
Draw rectangle
Client
Description: Draws a coloured filled custom sized rectangle at a specific position on the screen.
Pattern: draw [colored] rect[angle] at {array} with size {array} [and] with color {number} [(1;without alpha)]
Exemple(s):
 draw rectangle at [10,10] with size [20,5] with color 0xFFFF0000
Draw textured rectangle
Client
Description: Draws a textured custom sized rectangle at a specific position on the screen.
Pattern: draw textured rect[angle] at {array} with size {array} (with|using) texture {resource} [with uv {array}]
Exemple(s):
 draw textured rectangle at [-15,-7.5] with size [30,15] using texture sample:logo.png
Draw line
Client
Description: Draws a line between given positions on the screen.
Pattern: draw line from {location} to {location} with stroke {number} [and] with color {number} [(1;without alpha)]
Exemple(s):
 draw line from [10,10] to [100,100] with stroke 6 and with color 0
Rotate canvas
Client
Description: Rotate the draw canvas, around a vector if the given vector is not null, else around the Z axis.
Pattern: rotate canvas by {number} [around {array}] [in ((1;degrees)|(2;radians))]
Exemple(s):
 draw text "Text 1" at [10,10] #Won't be rotated
push canvas matrix #Pushes a new matrix onto the matrix pile
rotate canvas by 90
draw text "Text 2" at [20,20] #Will be displayed rotated by 90 degrees
pop canvas matrix
draw text "Text 3" at [20,20] #Won't be rotated because the matrix has been popped.
Translate canvas
Client
Description: Translate the draw canvas.
Pattern: translate canvas (by|at) {array}
Exemple(s):
 draw text "Text 1" at [10,10] #Won't be translated
push canvas matrix #Pushes a new matrix onto the matrix pile
translate canvas by [10,0,0]
draw text "Text 2" at [20,20] #Will be displayed translated by 10 units to the right
pop canvas matrix
draw text "Text 3" at [20,20] #Won't be translated because the matrix has been popped.
Scale canvas
Client
Description: Scale the draw canvas.
Pattern: scale canvas by {array}
Exemple(s):
 draw text "Text 1" at [10,10] #Won't be scaled
push canvas matrix #Pushes a new matrix onto the matrix pile
scale canvas by [2,2,2]
draw text "Text 2" at [20,20] #Will be displayed scaled by 2
pop canvas matrix
draw text "Text 3" at [20,20] #Won't be scaled because the matrix has been popped.
Push canvas matrix
Client
Description: Pushes a new matrix onto the matrix pile. Allows to "save the current" matrix configuration.
Pattern: push canvas matrix
Exemple(s):
 push canvas matrix
Pop canvas matrix
Client
Description: Pops the top matrix from the matrix pile. Allows to "come back to the previous" matrix configuration.
Pattern: pop canvas matrix
Exemple(s):
 pop canvas matrix
Draw circle
Client
Description: Draws a circle of given radius at given position on the screen.
Pattern: draw circle at {location} with radius {number} [and] with color {number} [(1;without alpha)]
Exemple(s):
 draw circle at [10,10] with radius 6 and with color 0
Render model
Client
Description: Renders a .json model in the world.
Pattern: render model {resource} at {array}
Exemple(s):
 render model test:my_model at [50,15,20]
Run a command
Description: Runs a command as the server or as a player
Pattern: make {player} execute command {string}
Exemple(s):
 make console execute command "time set day"
Remove tag in NBTTagCompound
Description: remove the tag from an nbttagcompound.
Pattern: delete tag {string} of {nbttagcompound}
Exemple(s):
 delete tag "Tag" of {nbttagcompound}
Exit/Quit
Description: Quit the game.
Pattern: quit [the] [game]
Exemple(s):
 quit the game
Wait/delay
Description: Delays the execution of the script of a specific amount of time.
Pattern: (wait|delay) {date}
Exemple(s):
 wait 10 seconds
Teleport player
Description: Teleports a player to a given location.
Pattern: teleport {player} (to|at) {array}
Exemple(s):
 teleport player at [10,25,20]
Give item to player
Description: Gives an item to a player.
Pattern: give {item} to {player}
Exemple(s):
 give a[n] minecraft:diamond_sword to player
Kick player
Description: Kicks a player from the server.
Pattern: kick {player} [with message {string}]
Exemple(s):
 kick player with message "You've been kicked for cheating"
Remove item from player's inventory
Description: Attempts to remove the given item from player's inventory.
Pattern: remove [{number} of] {itemtype} from {player}['s] inventory
Exemple(s):
 remove 1 of diamond from player's inventory
Return
Description: In a function, returns a value to be used as a result of the function
Pattern: return {element}
Exemple(s):
 function plusOne(n):
    return n + 1
Cancel event
Description: In an event, cancels it.
Pattern: cancel event
Exemple(s):
 on player movement:
    cancel event
Break loop
Description: In a loop, interrupts it and exit it.
Pattern: break loop
Exemple(s):
 for {i} in numbers in range of 10:
   if {i} = 9:
      break loop
Break multiple loops
Description: In multiple loop, interrupts a specific number of loops and exit them.
Pattern: break loops
Exemple(s):
 for {i} in numbers in range of 10:
   for {j} in numbers in range of 10:
      if {j} = 9:
         break 2 loops
Close GUI
Client
Description: Close the current GUI.
Pattern: close [the] [current] (GUI|gui)
Exemple(s):
 close current gui
Open settings GUI
Client
Description: Opens the settings GUI.
Pattern: open [the] settings [(GUI|gui)]
Exemple(s):
 open settings
Open single-player GUI
Client
Description: Opens the world selection GUI.
Pattern: open [the] (single-player|world selection) [(GUI|gui)]
Exemple(s):
 open single-player gui
Open multi-player GUI
Client
Description: Opens the server selection GUI.
Pattern: open [the] (multi-player|server selection) [(GUI|gui)]
Exemple(s):
 open multi-player gui
Register a new item
Description: Creates and registers a new item in the game.
Pattern: register [a] [new] item [with identifier] {string} [named {string}] [[and] with (texture {resource}|model {resource})] [with [max] stack size {number}] [in tab {string}]
Exemple(s):
 register a new item with identifier "copper" named "Copper" with texture "test:copper_item"
Register a new block
Description: Creates and registers a new block in the game.
Pattern: register [a] [new] block [with identifier] {string} [named {string}] [[and] with (texture {resource}|model {resource})] [with [max] stack size {number}] [with hardness {number}] [with harvest level {number}] [with material {string}] [dropping {resource}] [in tab {string}]
Exemple(s):
 register a new block with identifier "copper_ore" named "Copper Ore" with texture "test:copper_ore"
Send element to console/server
Description: Sends an element to the console or the server, like a packet.
Pattern: send {element} to (console|server)
Exemple(s):
 packet test_packet(message):
	client:
		print message
	server:
		print message

command /sendPacket {string}:
	send test_packet(arg-1) to server
Send element to a player/an element
Description: Sends an element to a player or another element, like a packet or a message.
Pattern: send {element} to {element}
Exemple(s):
 packet test_packet(message):
	client:
		print message
	server:
		print message

command /sendPacket {string}:
	send test_packet(arg-1) to player
Print
Description: Prints something in the console.
Pattern: print {element}
Exemple(s):
 print "Hello world !"
Open frame
Description: Opens a defined frame.
Pattern: open frame {frame}
Exemple(s):
 open frame {my_frame}
Play a sound at a specific location
Description: Plays a sound at a specific location.
Pattern: play {+resource} at {location} [with pitch {number}] [[and] with volume {number}] [in category {string}]
Exemple(s):
 play minecraft:block.anvil.fall at player's location
Play a sound
Client
Description: Plays a sound.
Pattern: play {resource} [with pitch {number}] [[and] with volume {number}]
Exemple(s):
 play minecraft:block.anvil.fall to player
Stop all sounds
Client
Description: Stop all playing sounds.
Pattern: stop [all] sounds
Exemple(s):
 stop sounds
Stop a specific sound
Client
Description: Stop a specific sound for a player.
Pattern: stop sound {string} [in category {string}]
Exemple(s):
 stop sound "my_sound"
Spawn entity
Description: Spawns an entity at the given location.
Pattern: spawn (a|{number}) {entity|resource} at {location}
Exemple(s):
 spawn a zombie at player's location
Kill entity
Description: Kills the given entity.
Pattern: kill {entity}
Exemple(s):
 kill player
Drop an item
Description: Drops an item somewhere.
Pattern: drop [{+number}] {item} at {array}
Exemple(s):
 drop 1 minecraft:diamond_sword at player's location
Sync an element to all players
Description: Synchronise an element under the given key to all connected players, which can be used by client-side scripts.
Pattern: sync {element} as {string} to all players
Exemple(s):
 sync true as "game_started" to all players #The synchronized variable "game_started" is now set to true for every players
Sync an element to a players
Description: Synchronise an element under the given key to the given player, which can be used by client-side scripts.
Pattern: sync {element} as {string} to {player}
Exemple(s):
 sync $money[player] as "my_money" to player #The synchronized variable "my_money" now stores the content of the variable $money[player], stored on the server side.
Add an element to another
Description: Adds an element to another elements if the + operation can be applied on it.
Pattern: add {element} to {element}
Exemple(s):
 add "d" to ["a","b","c"]\nadd 1 to {counter}
Remove an element from another
Description: Removes an element from another element if the - operation can be applied on it.
Pattern: remove {element} from {element}
Exemple(s):
 remove "c" from ["a","b","c"]\nremove 1 from player's health
Set an element to another
Description: Defines the value of an element.
Pattern: set {element} to {element}
Exemple(s):
 set player's health to 20\nset {variable} to 8
All entities
Description: Returns an array of all entities.
Pattern: all entities
Exemple(s):
 all entities
Entity Name
Description: Returns the name of entity
Pattern: {entity}['s] name
Exemple(s):
 entity's name
Entity ID
Description: Returns the id of entity.
Pattern: id of {entity}
Exemple(s):
 id of entity
Entity NBT
Description: Returns the nbt tag compound of entity
Pattern: {entity}['s] nbt
Exemple(s):
 entity's nbt
Screen width
Client
Description: Returns the screen width.
Pattern: screen width
Exemple(s):
 screen width
Screen height
Client
Description: Returns the screen height.
Pattern: screen height
Exemple(s):
 screen height
Display width of a string
Client
Description: Returns the display width of a string.
Pattern: display width of {string}
Exemple(s):
 display width of "Hello !"
Display height of a string
Client
Description: Returns the display height of a string.
Pattern: display height of {string}
Exemple(s):
 display height of "Hello !"
Format
Description: Format things.
Pattern: {element} formatted as {string}
Exemple(s):
 5.643 formatted as "--,--"
Element is synchronized
Description: Returns whether an element has been synchronized from the server.
Pattern: [value] [of] {string} is (synced|synchronized)
Exemple(s):
 "my_key" is synced
Synchronized element
Description: Returns whether an element has been synchronized from the server.
Pattern: (synced|synchronized) value [of] {string}
Exemple(s):
 synced value of "my_key"
Number of connected players
Description: Returns the number of current connected players.
Pattern: number of [connected] players
Exemple(s):
 number of connected players
Maximum number of connected players
Description: Returns the number of current connected players.
Pattern: max[imum] number of [connected] players
Exemple(s):
 max number of players
Motd of server
Description: Returns the motd of the server.
Pattern: motd [of server]
Exemple(s):
 set motd of server to "My server"
Number is between
Description: Returns true if the given number is between the given bounds (inclusively).
Pattern: {number} is between {number} and {number}
Exemple(s):
 {number} is between 5 and 15
World
Description: Returns world.
Pattern: world
Exemple(s):
 world
World time
Description: Returns the world time.
Pattern: {world} time
Exemple(s):
 world time
World Entities BoundingBox
Description: Return list of entity entities in the boudingbox.
Pattern: {string} with in {axisalignedbb}
Exemple(s):
 world
Type of element
Description: Returns the type of an element.
Pattern: type of {element}
Exemple(s):
 type of {my_variable}
Element parsed as another type
Description: Returns the element parsed as another given type.
Pattern: {element} parsed as {string}
Exemple(s):
 "5" parsed as "number" #Returns 5
Element is set
Description: Returns whether a given element is defined (not null).
Pattern: {element} is (set|defined)
Exemple(s):
 {my_variable} is defined
Element is not set
Description: Returns whether a given element is not defined (null).
Pattern: {element} is not (set|defined)
Exemple(s):
 {my_variable} is not defined
Element is not element (is not equal to)
Description: Returns whether a given element is not equal to another one.
Pattern: {element} is not {element}
Exemple(s):
 {my_variable} is not "Test"
Element is element (is equal to)
Description: Returns whether a given element is equal to another one.
Pattern: {element} is {element}
Exemple(s):
 {my_variable} is "Test"
Element is more than element
Description: Returns whether a given element is more than another one.
Pattern: {element} is more than {element}
Exemple(s):
 {my_variable} is more than 8
Element is more than or equal to element
Description: Returns whether a given element is more than another one.
Pattern: {element} is more than or equal to {element}
Exemple(s):
 {my_variable} is more than or equal to 8
Element is less than element
Description: Returns whether a given element is less than another one.
Pattern: {element} is less than {element}
Exemple(s):
 {my_variable} is less than 8
Element is less than or equal to element
Description: Returns whether a given element is less than or equal to another one.
Pattern: {element} is less than or equal to {element}
Exemple(s):
 {my_variable} is less than or equal to 8
Content of text file
Description: Returns an array containing the lines of the given file. The root folder is /.minecraft/. Will create the file it it does not exist when setting the content.
Pattern: content of [text] file {string}
Exemple(s):
 content of file "/scripts/my_script_config.txt"
Content of image file
Description: Returns the given file read as an image. The root folder is /.minecraft/. Will create the image if it does not exist when setting the content.
Pattern: content of image [file] {string}
Exemple(s):
 content of image "/scripts/my_image.png"
New image
Description: Returns a new image sized with the given width and height.
Pattern: [a] [new] image with width {number} and height {number}
Exemple(s):
 new image with width 100 and height 450
Image pixel
Description: Returns the color of an image's pixel. Setting a pixel will only apply the changes in the memory, not on any file. Use the expression "content of image file" to save the content on a file.
Pattern: {image}['s] pixel at {array}
Exemple(s):
 set {my_image}'s pixel at [10,20] to 0xFFFF0000 #Sets the pixel to a full red pixel
Array
Description: Instantiates a new array.
Pattern: ~[{+element*}~]
Exemple(s):
 [3.141,2.718,"Hello !"]
Size of an array
Description: Returns the size of an array.
Pattern: size of {array|dictionary}
Exemple(s):
 size of [1,4,7] #Returns 3
Random element of an array
Description: Returns a random element of an array.
Pattern: [a] random element of {array|dictionary}
Exemple(s):
 random element of [1,4,7]
First element of an array
Description: Returns the first element of an array.
Pattern: [the] first element of {array|dictionary}
Exemple(s):
 first element of [1,4,7]
Last element of an array
Description: Returns the last element of an array.
Pattern: [the] last element of {array|dictionary}
Exemple(s):
 last element of [1,4,7]
Element of an array
Description: Returns the element at the given index of an array. Be careful, indices start at 0.
Pattern: {array|dictionary}~[{+element}~]
Exemple(s):
 [7,1,0,2,6][0] #Returns 7
Range of two number
Description: Returns an array of numbers between two boundaries.
Pattern: numbers from {number} to {number}
Exemple(s):
 numbers from 1 to 5 #Returns [1,2,3,4,5]
Range of numbers
Description: Returns an array of numbers between 0 and a boundary.
Pattern: [numbers in] range of {number}
Exemple(s):
 numbers in range of 5 #Returns [0,1,2,3,4,5]
Range of random numbers
Description: Returns an array of a random subset of numbers between 0 and a boundary.
Pattern: random numbers in range of {number}
Exemple(s):
 random numbers in range of 10
Element is in an array
Description: Returns whether an element is in an array.
Pattern: {element} is in {array|dictionary}
Exemple(s):
 7 is in [1,5,9,12] #Returns false
Element is not in an array
Description: Returns whether an element is not in an array.
Pattern: {element} is not in {array|dictionary}
Exemple(s):
 7 is not in [1,5,9,12] #Returns true
Array contains an array
Description: Returns whether an array contains another array.
Pattern: {array|dictionary} contains {array|dictionary}
Exemple(s):
 [1.5,4,5,8] contains [4,8] #Returns true
Sorted array
Description: Returns a sorted copy of an array. Elements will be sorted only if they are comparable.
Pattern: sorted [((0;ascending)|(1;descending))] ((2;elements)|(3;keys)) of {array|dictionary}
Exemple(s):
 sorted elements of [1,8,5] #Returns [1,5,8]
Copy of an array
Description: Returns a copy of an array.
Pattern: copy of {array}
Exemple(s):
 copy of [1,8,5]
Item stack
Description: Returns a stack of the given amount of the given item.
Pattern: (a[n]|{+number} of) {resource} [with nbt {string|nbttagcompound}] [[and] with metadata {number}]
Exemple(s):
 5 of minecraft:stick
Player has item
Description: Returns whether the player has the given item in his inventory.
Pattern: ({item} is in {player}['s] inventory|{player} has {item})
Exemple(s):
 5 of minecraft:stick is in player's inventory
Random number
Description: Returns a random number between two numbers
Pattern: random (number|([float] number)|float) [between {number} and {number}]
Exemple(s):
 random number between 1 and 50
Random integer
Description: Returns a random integer between two numbers
Pattern: random (integer|(integer number)|int) between {number} and {number}
Exemple(s):
 random integer between 1 and 50
Player's skin
Description: Returns the player's skin as an image.
Pattern: {player}['s] skin
Exemple(s):
 player's skin
Image width
Description: Returns the given image's width.
Pattern: {image}['s] width
Exemple(s):
 player's skin width
Image height
Description: Returns the given image's height.
Pattern: {image}['s] height
Exemple(s):
 player's skin height
Red color
Description: Returns the full red opaque color.
Pattern: red
Exemple(s):
 red
Green color
Description: Returns the full green opaque color.
Pattern: green
Exemple(s):
 green
Blue color
Description: Returns the full blue opaque color.
Pattern: blue
Exemple(s):
 blue
White color
Description: Returns the full white opaque color.
Pattern: white
Exemple(s):
 white
Black color
Description: Returns the full black opaque color.
Pattern: black
Exemple(s):
 black
Gray color
Description: Returns the full gray opaque color.
Pattern: gray
Exemple(s):
 gray
Lighter color
Description: Returns the given color lightened by 20%.
Pattern: light[er] {color}
Exemple(s):
 light red
Darker color
Description: Returns the given color darkened by 20%.
Pattern: dark[er] {color}
Exemple(s):
 dark red
Red component of color
Description: Returns the given color's red component.
Pattern: {color}['s] red component
Exemple(s):
 dark red's red component
Green component of color
Description: Returns the given color's green component.
Pattern: {color}['s] green component
Exemple(s):
 dark red's green component
Blue component of color
Description: Returns the given color's blue component.
Pattern: {color}['s] blue component
Exemple(s):
 dark red's blue component
Alpha component of color
Description: Returns the given color's alpha component.
Pattern: {color}['s] alpha component
Exemple(s):
 dark red's alpha component
Brightness of color
Description: Returns the given color's brightness as a number between 0 and 1.
Pattern: {color}['s] brightness
Exemple(s):
 dark red's brightness
Color with components
Description: Returns the color having the given [r,g,b,a] components. If the array has only 3 elements, then the color will be opaque.
Pattern: color with components {array}
Exemple(s):
 color with components [255,0,0]
Key binding register
Client
Description: Register Custom KeyBinding
Pattern: register key {string} [with displayName {string}] and [with categoryName {string}]
Exemple(s):
 register key "R" with displayName "test" and with categoryName "default"
Key binding pressed
Client
Description: Triggered when the key is pressed
Pattern: {key} is pressed
Exemple(s):
 {key} is pressed
Key binding down
Client
Description: Triggered when the key is down
Pattern: {key} is keydown
Exemple(s):
 {key} is down
Key binding from description
Client
Description: Returns a key binding from a string.
Pattern: key [binding] {string}
Exemple(s):
 key binding "key.forward"
Key code pressed
Client
Description: Triggered when the given key code is pressed
Pattern: {number} code is pressed
Exemple(s):
 42 code is pressed
Console/server
Description: Returns the instance of the console/server.
Pattern: (console|server)
Exemple(s):
 server
Block at location
Description: Returns the block at the given location
Pattern: block at {array} [in world {number}]
Exemple(s):
 block at player's location
Blocks in radius of location
Description: Returns blocks in a radius of the given location
Pattern: blocks in [a] radius [of] {number} [blocks] around {element} [in world {number}]
Exemple(s):
 block in a radius of 5 around player's location
Block color
Description: Returns the color associated to the given block in a minecraft map.
Pattern: {block} color [in world {number}]
Exemple(s):
 color of minecraft:stone
Terrain height
Description: Efficiently returns the terrain height at the given location.
Pattern: terrain height at {array} [in world {number}]
Exemple(s):
 terrain height at player's location
Player's current world id
Description: Returns the id of the world the given player is. Setting a nbt tag must be done on server side or the effects won't persist.
Pattern: {player}['s] world id
Exemple(s):
 send player's world id to player
NBTTagCompound
Description: Returns a new NBTTagCompound.
Pattern: [a] [new] nbt compound
Exemple(s):
 set {my_nbtcompound} to a new nbt compound
NBTTagCompound from a json string
Description: Returns a new NBTTagCompound based on elements of a json string.
Pattern: [a] [new] nbt [tag] [compound] (with|from|of) json [string] {string}
Exemple(s):
 set {my_nbtcompound} to a new nbt compound with json "{"name":"test"}"
NBTTagCompound from a dictionary
Description: Returns a new NBTTagCompound based on elements of a dictionary.
Pattern: [a] [new] nbt [tag] [compound] from [dictionary] {dictionary}
Exemple(s):
 set {my_nbtcompound} to nbt from {dict}
NBTTagCompound value
Description: Returns value of key NBTTagCompound. A type can be specified, valid specific types are int, byte, float, short, long.
Pattern: tag {string} of {nbttagcompound} [as {string}]
Exemple(s):
 tag {string} of {nbt} as "byte"
NBTTagCompound copy
Description: Returns a copy of a NBTTagCompound.
Pattern: [a] copy [of] {nbttagcompound}
Exemple(s):
 a copy of {nbt}
Item or block nbt tag
Description: Returns a copy of the NBTTagCompound of a block or an item.
Pattern: {item|block}['s] nbt [tag] [in world {number}]
Exemple(s):
 block at [4,54,-52] nbt tag
NBTTagCompound keys
Description: Returns a list containing all the given NBTTagCompound keys.
Pattern: {nbttagcompound}['s] keys
Exemple(s):
 block at [4,54,-52] nbt tag keys
NBTTagCompound to a dictionary
Description: Returns a dictionary containing all the given NBTTagCompound keys and NBT values.
Pattern: {nbttagcompound}['s] dictionary
Exemple(s):
 block at [4,54,-52] nbt tag dictionary
All players
Description: Returns an array of all connected players.
Pattern: all players
Exemple(s):
 all players
Player with username
Description: Returns the player with the given username.
Pattern: player (named|with username) {string}
Exemple(s):
 player with username "Player001"
Player's name
Description: Returns the given player's name.
Pattern: {+player}['s] name
Exemple(s):
 player's username
Player's health
Description: Returns the given player's health.
Pattern: {+player}['s] health
Exemple(s):
 player's health
Player's hunger level
Description: Returns the given player's hunger level.
Pattern: {+player}['s] (hunger|food [level])
Exemple(s):
 player's hunger
Player's look vector
Description: Returns the given player's look vector.
Pattern: {+player}['s] look vector [smoothed with {number}]
Exemple(s):
 player's look vector smoothed with partial ticks
Player's tool
Description: Returns the given player's tool.
Pattern: {+player}['s] tool
Exemple(s):
 {player}'s tool
Block player is looking at
Description: Returns the block the given player is looking at
Pattern: block {player} is looking at
Exemple(s):
 block player's looking at
Player check
Description: Check if the object is a player.
Pattern: {player} is a player
Exemple(s):
 {player} is a player
Player
Client
Description: Returns the player playing on the client side
Pattern: player
Exemple(s):
 player
Slot of player's inventory
Description: Returns the item in the given slot of a player's inventory
Pattern: slot {number} of {player}['s] inventory
Exemple(s):
 slot 4 of player's inventory
Player's gamemode
Description: Returns the current gamemode of a player
Pattern: {player}['s] gamemode
Exemple(s):
 if gamemode of player is 0: #Checks if player is in survival mode
Player's sneak
Description: Returns if the player is sneak.
Pattern: {player}['s] is sneak[ing]
Exemple(s):
 if player is sneaking:
Player's armor level
Description: Returns the given player's armor level.
Pattern: {+player}['s] (armor [level])
Exemple(s):
 player's armor
Player's bounding box
Description: Returns the bounding box of the player.
Pattern: {player}['s] bounding box
Exemple(s):
 player bounding box
Player's rotation yaw
Description: Returns the rotation taw of the player.
Pattern: {player}['s] [head]['s] [rotation] yaw [smoothed with {number}]
Exemple(s):
 player rotation yaw
Player's inventory
Description: Returns the player's inventory as an array of items.
Pattern: {player}['s] inventory
Exemple(s):
 player's inventory
Player is connected
Description: Returns the whether the given player is connected.
Pattern: player (named|with username) {string} is connected
Exemple(s):
 player with username "Player001" is connected
Year
Description: Returns the given amount of years.
Pattern: {number} year[s] [[and] {date}]
Exemple(s):
 1 year and 5 months
Month
Description: Returns the given amount of months.
Pattern: {number} month[s] [[and] {date}]
Exemple(s):
 1 month and 5 weeks
Day
Description: Returns the given amount of days.
Pattern: {number} day[s] [[and] {date}]
Exemple(s):
 1 day and 5 hours
Hour
Description: Returns the given amount of hours.
Pattern: {number} hour[s] [[and] {date}]
Exemple(s):
 1 hour and 5 minutes
Minute
Description: Returns the given amount of minutes.
Pattern: {number} minute[s] [[and] {date}]
Exemple(s):
 1 minute and 5 seconds
Second
Description: Returns the given amount of seconds.
Pattern: {number} second[s] [[and] {date}]
Exemple(s):
 1 second and 5 ticks
Tick
Description: Returns the given amount of ticks.
Pattern: {number} tick[s] [[and] {date}]
Exemple(s):
 1 tick
Now
Description: Returns the current date.
Pattern: now
Exemple(s):
 now
X coordinate of location
Description: Returns the x coordinate of an element that can be associated to a location.
Pattern: x coord[inate] of {array}
Exemple(s):
 x coord of [1,52,47] #Returns 1
Y coordinate of location
Description: Returns the y coordinate of an element that can be associated to a location.
Pattern: y coord[inate] of {array}
Exemple(s):
 y coord of [1,52,47] #Returns 52
Z coordinate of location
Description: Returns the z coordinate of an element that can be associated to a location.
Pattern: z coord[inate] of {array}
Exemple(s):
 z coord of [1,52,47] #Returns 47
Location of element
Description: Returns the location of an element that has a location.
Pattern: (location of {element}|{+element}'s location)
Exemple(s):
 player's location
Distance between two locations
Description: Returns the distance between two locations.
Pattern: distance between {element} and {element}
Exemple(s):
 distance between [1,42,56] and player's location
Vector of location
Description: Returns the vector from a location. Vectors handle addition (+), subtraction (-) and multiplication by a number (*).
Pattern: (vector of {array}|{array} vector)
Exemple(s):
 vector of player's location
Dictionary
Description: Returns a new dictionary.
Pattern: [a] [new] dictionary
Exemple(s):
 set {my_dictionary} to a new dictionary
Dictionary from an array of key-value couples
Description: Returns a new dictionary based on elements of an array that represent key-value couples.
Pattern: [a] [new] dictionary with {array*}
Exemple(s):
 set {my_dictionary} to a new dictionary with [["Key 1","Value 1"]]
Keys of dictionary/nbt
Description: Returns an array containing the keys of the given dictionary or nbt.
Pattern: keys of {dictionary|nbttagcompound}
Exemple(s):
 keys of dictionary with [["Key 1","Value 1"]] #["Key 1"]
Frame
Client
Description: Returns a new empty frame.
Pattern: a [new] frame
Exemple(s):
 a new frame
Image widget
Client
Description: Returns a new image widget.
Pattern: [a[n]] [new] image [of] {resource}
Exemple(s):
 image test:gui/my_image.png
Button
Client
Description: Returns a new button.
Pattern: button [with texture {resource}] [displaying {string}] [at {array}] [sized {array}] [[and] with [button] id {number}]
Exemple(s):
 button with texture test:gui/button_texture.png displaying "Hi !" at [10,20] sized [20,40] and with id 0
Label
Client
Description: Returns a new label.
Pattern: [(1;centered)] label displaying [text] {string} at {array} [with scale {number}] [[and] with color {number}]
Exemple(s):
 label displaying "hello !" at [15,15] with scale 5 and with color 0xFF0000
Label display text
Client
Description: Returns the display text of a label.
Pattern: {label}['s] [display] text
Exemple(s):
 set {label} display test to "Hi !"
Length of a string
Description: Returns the number of characters in a string.
Pattern: length of {string}
Exemple(s):
 length of "Test"
String is a substring of a string
Description: Returns whether a string is a substring from another string.
Pattern: {string} is a substring of {string}
Exemple(s):
 "hey" is a substring of "hey my friend" #Returns true
Substring of a string
Description: Returns a substring from a string.
Pattern: substring of {string} from {number} to {number}
Exemple(s):
 substring of "Test string" from 1 to 4 #Returns "est"
Split of a string
Description: Returns an array of a split string.
Pattern: {string} split at each {string}
Exemple(s):
 "Hello world" split at each " " #Returns ["Hello","world"]
Character of a string
Description: Returns the character at a specific position of a string.
Pattern: character at [position] {number} of {string}
Exemple(s):
 character at position 2 of "Hello world" #Returns "l"
Execution side
Description: Returns the current execution side.
Pattern: [execution] side
Exemple(s):
 execution side
Window title
Description: Returns the current window title.
Pattern: window (name|title)
Exemple(s):
 set the window title to "Sqript"
Window icons
Description: Returns the current window icons.
Pattern: window icons
Exemple(s):
 set window icons to [sample:favicon_wb_16.png,sample:favicon_wb_32.png]
Item
Description: DEPRECATED : Use the register action instead. Define an item that will be added to the game, that you can give a certain behavior to.
Regex: ^item .*
Fields: name texture max stack size creative tab item type material protection type armor texture
Exemple(s):
 item test_item:
    name: My Test Item
    texture: sample:yellow_diamond.png
    creative tab: miscellaneous
    max stack size: 8
    type: item
Armor material
Description: Define an armor material that you will be able to apply on your armor pieces in order to give them a durability and a protection coefficient.
Regex: ^armor material .*
Fields: name durability protection array enchantability
Exemple(s):
 armor material ruby:
Event
Reloadable
Description: Run code when a specific event is triggered.
Regex: ^(on|when) .*
Fields: side
Exemple(s):
 on script load:
    print "Hello world !"
Time loop
Reloadable
Description: Define a piece of code that will be run periodically every time a specific amount of time is reached.
Regex: every .*
Fields:
Exemple(s):
 every 1 minute:
    ...
Command
Reloadable
Description: Define a new command that can be executed and have some action.
Regex: ^command /.*
Fields: side description usage aliases permission
Exemple(s):
 command /randomplayer:
    usage: /randomplayer
    description: returns a random player
    send a random element of all players to sender
Block
Description: DEPRECATED : Use the register action instead. Define a Minecraft block that will be added to the game.
Regex: ^block .*
Fields: name texture creative tab harvest level drop hardness
Exemple(s):
 block my_block:
Options
Reloadable
Description: Define options in your script to give it more flexibility and configuration.
Regex: ^options:\s*
Fields:
Exemple(s):
 options:
    my_value: 5
Function
Reloadable
Description: Define a piece of code that can be called in order to do some action or compute a result to return.
Regex: ^function .*
Fields: side
Exemple(s):
 function broadcast({message}): #Sends a message to all players
    for {p} in all players:
        send {message} to {p}
Packet
Reloadable
Description: Define a packet of data that can be sent to a player or to the server. Packets will transmit data only if the data's type is serialisable. Packets are used to transmit information between players (clients) and the server, they are useful in GUIs for example, to tell the server whenever the client clicks on a button (otherwise, as this happens on the player's computer, the server can't know it). Be careful when using packets, and always try to check if the information is verified, because anyone can send a packet with false information in order to cheat or to mess with the server. For example, checking distances can be good when a player asks the server to open an inventory.
Regex: ^packet .*
Fields: client server
Exemple(s):
 packet test_packet({message}):
	client:
		print "client side print:" + {message}
	server:
		print "server side print:" + {message} + "sent by" + player

command /sendPacket :
	send test_packet(arg-1) to player
Import
Reloadable
Description: Import a bunch of functions from another script file.
Regex: ^import(?:s)?:\s*
Fields:
Exemple(s):
 import:
    * from my_script
Tool material
Description: Define a tool material that you will be able to apply on your items in order to give them a durability and an efficiency.
Regex: ^tool material .*
Fields: name harvest level durability efficiency damage enchantability
Exemple(s):
 tool material ruby: