所有脚本列表 | 更新到1.12.1 |
|
|
脚本语法 | 返回数据 |
脚本简述 | 初次出现版本 |
|
|
游戏脚本 | |
CLEARCRAFTING() | none |
Clears the auto-crafting queue | |
|
|
CRAFT(<item[:damage]>,[amount],[throw],[verbose]) | none |
Queues an auto-crafting request | |
|
|
CRAFTANDWAIT(<item[:id]>,[amount],[throw],[verbose]) | |
Queues an auto-crafting request and waits for it to complete | |
|
|
DISCONNECT() | |
Disconnects from the current game or server | |
|
|
GETID(<x>,<y>,<z>,<#idvar>,[#datavar]) | ID of the block at the specified position |
Gets the ID and optionally the data value of the block at the specified coordinates in the world | |
|
|
GETIDREL(<xoffset>,<yoffset>,<zoffset>,<#idvar>,[#datavar]) | ID of the block at the specified position |
Gets the ID and optionally the data value of the block at the specified coordinates relative to the player | |
|
|
GETITEMINFO(<item[:damage]>,[<&namevar>],[#maxstacksize],[&type],[#dropid]) | Name of the item |
Gets the name and other info for the specified item id, returns "None" if the item is not valid | |
|
|
GETSLOT(<item[:damage]>,<#idvar>,[startfromslotid]) | Slot ID containing a matching item |
Gets the id of the slot containing an item matching the specified item id, returns -1 if item not found | |
|
|
GETSLOTITEM(<slotid>,<#idvar>,[#stacksizevar],[#datavar]) | Item ID of the item in the slot |
Gets information about the item in the specified slot | |
|
|
INVENTORYDOWN([amount]) | |
Scrolls the specified number of slots down through the hotbar | |
|
|
INVENTORYUP([amount]) | |
Scrolls the specified number of slots up through the hotbar | |
|
|
ITEMID(<item>) | Legacy ID for the item |
Gets the legacy (numeric) ID for the specified item | |
|
|
ITEMNAME(<id>) | Item descriptor for the specified item id |
Get the item descriptor for a legacy (numeric) item ID | |
|
|
LOOK(<yaw>,[pitch],[time]) | |
Faces the player in the specified direction, prefix angles with + or - for relative moves | |
|
|
LOOKS(<yaw>,[pitch],[time]) | |
Smoothly turnes the player to the specified direction, prefix angles with + or - for relative moves | |
|
|
PICK(<item[:damage]>,[item[:damage]],...) | Item ID of the item which was picked or -1 if not picked |
Selects the specified item id if it is on the hotbar, specify multiple items to pick in order of preference | |
|
|
PLACESIGN([line1],[line2],[line3],[line4],[showgui]) | |
Places a sign in the world with the specified text (if you have one) | |
|
|
PLAYSOUND(<sound>) | |
Plays a sound | |
|
|
RESPAWN() | |
Respawns the player if you are dead | |
|
|
SETSLOTITEM([item[:damage]],[slot],[amount]) | |
Creative mode only, set the contents of a hot bar slot | |
|
|
SLOT(<slot>) | |
Selects the specified slot on the hot bar | |
|
|
SLOTCLICK(<slot>,[button],[shift]) | |
Simulates clicking on the specified slot in the current GUI, optionally using RMB and shiftkey | |
|
|
SPRINT() | |
Sets the player state to sprinting if sufficient stamina (food) | |
|
|
TILEID(<item>) | Legacy ID for the tile |
Gets the legacy (numeric) ID for the specified tile | |
|
|
TILENAME(<id>) | Tile descriptor for the specified tile id |
Get the descriptor for a legacy (numeric) tile ID | |
|
|
TRACE(<distance>,[entities]) | Ray trace result type |
Performs a ray trace operation which sets the raytrace variables in the local scope. Distance can be 3-256. | |
|
|
UNSPRINT() | |
Sets the player state to not sprinting | |
|
|
输入脚本 | |
KEY(<bind>) | |
Activates the specified key binding for 1 tick | |
|
|
KEYDOWN(<bind>) | |
Sets the specified key binding state to pressed, only works with pressable bindings | |
|
|
KEYUP(<bind>) | |
Sets the specified key binding state to unpressed, only works with pressable bindings | |
|
|
TOGGLEKEY(<bind>) | |
Toggles the pressed state of the specified key binding, only works with pressable bindings | |
|
|
PRESS(<lwjgl_name>) | |
Injects the specified key event directly into the keyboard buffer for 1 tick | |
|
|
TYPE(<text>) | |
Injects the specified key sequence directly into the keyboard buffer at a rate of 1 key per tick | |
|
|
语言脚本 | |
<var> = <value> | |
Internal function | |
|
|
BREAK | |
Interrupts exection of the innermost loop | |
|
|
CALCYAWTO(<xpos>,<zpos>,[#yaw],[#distance]) | Yaw value to coordinates |
Calculates the absolute yaw angle to the specified coordinates | |
|
|
DEC(<#var>,[amount]) | |
Decrements the specified counter by 1 or by the specified amount | |
|
|
DECODE(<input>,[&output]) | Decoded string |
base64_decode | |
|
|
DO([count]) | |
Begins a loop, specify a number of loops to limit the loop count | |
|
|
ECHO(<text>) | |
Sends the specified message as a chat packet | |
|
|
ENCODE(<input>,[&output]) | Encoded string |
base64_encode | |
|
|
ELSE | |
ELSE clause | |
|
|
ELSEIF(<condition>) | |
ELSEIF clause | |
|
|
ENDIF | |
ENDIF clause | |
|
|
ENDUNSAFE | |
Ends an active UNSAFE block | |
|
|
EXEC(<file.txt>,[taskname],[params],...) | |
Creates a task by running the specified script file | |
|
|
FOR(<#var>,<start>,<end>,[step]) | |
Begins a FOR->NEXT loop using the specified var as a loop counter, #var can be used inside the loop | |
|
|
FOREACH(<iterator>) | |
Runs a loop over the specified iterator | |
|
|
GETPROPERTY(<control>,<property>) | |
Returns the value of the specified property from the specified GUI control | |
|
|
IF(<condition>) | |
IF clause | |
|
|
IFBEGINSWITH(<haystack>,<needle>) | |
IFBEGINSWITH clause | |
|
|
IFCONTAINS(<haystack>,<needle>) | |
IFCONTAINS clause | |
|
|
IFENDSWITH(<haystack>,<needle>) | |
IFENDSWITH clause | |
|
|
IFMATCHES(<subject>,<pattern>,[&target],[group]) | |
IFMATCHES clause | |
|
|
IIF(<condition>,<truetext>,[falsetext]) | |
Inline IF statement, sends truetext as a chat message if condition succeeds, or sends falsetext if not | |
|
|
INC(<#var>,[amount]) | |
Increments the specified counter by 1 or by the specified amount | |
|
|
ISRUNNING(<macro>) | True if the macro is running |
Returns whether the specified macro is currently running | |
|
|
JOIN(<glue>,<arrayname>,[&output]) | Joined array parts |
Implodes the specified array to a delimited string | |
|
|
LCASE(<input>,[&output]) | Input as lowercase |
Converts the input string to lower case and stores it in output | |
|
|
LOG(<text>) | |
Outputs the specified text into the local chat stream | |
|
|
LOGRAW(<json>) | |
Similar to minecraft tellraw command, parses and outputs JSON chat into local chat stream | |
|
|
LOGTO(<target>,<text>) | |
Outputs the specified text into the specified target, target can be a text file name or the name of a textarea | |
|
|
LOOP | |
Ends a loop that was started with DO | |
|
|
MATCH(<subject>,<pattern>,[&target],[group],[default]) | The matched subpatterns |
Runs a regular expression match on the subject and puts the result in &target | |
|
|
NEXT | |
Completes a FOR->NEXT loop | |
|
|
PROMPT(<&target>,<paramstring>,[prompt],[override],[default]) | The supplied value |
Displays a prompt (or prompts) by parsing the params in paramstring | |
|
|
RANDOM(<#target>,[max],[min]) | Random value |
Assigns a random number between min and max to target | |
|
|
REPLACE(<&subject>,<search>,[replace]) | Candidate with replaced values, does not alter source string if returned |
Replace all occurrences of search with replace in &subject | |
|
|
REGEXREPLACE(<&subject>,<search>,[replace]) | Candidate with replaced values, does not alter source string if returned |
Replace all occurrences of search regex with replace in &subject | |
|
|
SET(<target>,[value]) | |
Sets the value of target to value (or TRUE if value is omitted) | |
|
|
SETLABEL(<labelname>,<text>,[binding]) | |
Sets the text (and optionally binding) of the specified label | |
|
|
SETPROPERTY(<control>,<property>,<value>) | |
Sets the value of the specified property on the specified GUI control | |
|
|
SPLIT(<delimiter>,<source>,[output]) | Array containing the split parts |
Explode the supplied source string to an array | |
|
|
SQRT(<value>,[#outvar]) | The square root as an integer |
Calculate the square root of value and store it in #outvar | |
|
|
STOP([id]) | |
Stops the current macro, or macros matching the specified ID | |
|
|
STRIP(<&target>,<text>) | Stripped text |
Strips all formatting codes from the specified text and assigns the result to &target | |
|
|
TOGGLE([flag]) | |
Toggles the specified boolean flag's value | |
|
|
UCASE(<input>,[&output]) | Input as uppercase |
Converts the input string to upper case and stores it in output | |
|
|
UNSAFE(<ticks>) | |
Begins an UNSAFE block with execution limit set to ticks | |
|
|
UNSET(<flag>) | |
Un-sets the specified variable | |
|
|
UNTIL(<condition>) | |
Completes a loop started with DO but exits the loop if condition is met | |
|
|
WAIT(<time>) | |
Pauses the script for the time specified, suffix "ms" for a wait in milliseconds or "t" to wait in ticks | |
|
|
WHILE(<condition>) | |
Completes a loop started with DO but exits the loop if condition is not met | |
|
|
ARRAYSIZE(<array>,[<outvar>]) | Size of the array |
Stores the size of the specified array in outvar | |
|
|
INDEXOF(<array>,<outvar>,<searchfor>) | Index of searchfor |
Gets the first index of searchfor in array and stores it in outvar, returns -1 on failure | |
|
|
POP(<array>,<outvar>) | |
Removes the last entry from the tail of array and stores it in outvar | |
|
|
PUSH(<array>,<value>) | |
Appends value to the end of array | |
|
|
PUT(<array>,<value>) | |
Inserts value at the first empty point in array | |
|
|
模组脚本 | |
CONFIG(<configname>) | |
Switch to the specified configuration | |
|
|
IMPORT(<configname>) | |
Overlay the specified configuration | |
|
|
UNIMPORT() | |
Remove the specified configuration overlay if active | |
|
|
设置脚本 | |
BIND(<bind>,<keycode>) | |
Set the specified key binding to the specified key code | |
|
|
CAMERA([mode]) | |
Set the current camera mode, call with no arguments to toggle modes | |
|
|
CHATHEIGHT(<value>,[time]) | |
Set height of the Minecraft chat whilst ingame 20-180 | |
|
|
CHATHEIGHTFOCUSED(<value>,[time]) | |
Set height of the Minecraft chat whilst in the chat GUI 20-180 | |
|
|
CHATOPACITY(<value>,[time]) | |
Set opacity of the Minecraft chat 0-100 | |
|
|
CHATSCALE(<value>,[time]) | |
Set scale of the Minecraft chat 0-100 | |
|
|
CHATVISIBLE(<value>) | |
Set visibility of minecraft chat | |
|
|
CHATWIDTH(<value>,[time]) | |
Set width of the Minecraft chat 40-320 | |
|
|
FOG([value]) | |
Toggles render distance, or optionally specify render distance | |
|
|
FOV(<value>,[time]) | |
Sets the FOV angle in degrees, specifying time causes the value to change smoothly | |
|
|
GAMMA(<value>,[time]) | |
Sets the brightness value (percent), specifying time causes the value to change smoothly | |
|
|
MUSIC(<value>,[time]) | |
Sets the music volume, specifying time causes the value to change smoothly | |
|
|
RELOADRESOURCES | |
Reloads resource packs, same as pressing F3 + T | |
|
|
RESOURCEPACKS([pattern],[pattern...]) | |
Sets the resource pack stack to the order matching the specified patterns | |
|
|
SENSITIVITY(<value>,[time]) | |
Sets the mouse sensitivity (between 0 and 200), specifying time causes the value to change smoothly | |
|
|
SHADERGROUP([path]) | |
Sets the active shader group to the shader matching path, use "+" to select next group | |
|
|
SETRES(<width>,<height>) | |
Sets the size of the minecraft game window | |
|
|
VOLUME(<value>,[time]) | |
Sets the sound volume, specifying time causes the value to change smoothly | |
|
|
杂项脚本 | |
ACHIEVEMENTGET(<text>,[itemid[:damage]]) | |
Displays an "advancement toast" popup with a custom message | |
|
|
BINDGUI(<slot>,<screen>) | |
Binds the specified custom screen to the slot specified | |
|
|
CLEARCHAT() | |
Clears the current chat stream | |
|
|
GUI([name]) | |
Show (or hide) a gui screen | |
|
|
POPUPMESSAGE(<message>,[animate]) | |
Display a message in the action bar area | |
|
|
REPL | |
Access the REPL interface (experimental) | |
|
|
SHOWGUI(<screen>,[esc_screen]) | |
Show a custom gui screen | |
|
|
STORE(<type>,[name]) | |
Store a value into a list using the current environment | |
|
|
STOREOVER(<type>,[name]) | |
Store a value into a list using the current environment and overwrite it if exists | |
|
|
TIME(<[&target>],[format]) | Time as a string |
Stores the current time and date into &target, optionally using format specified | |
|
|
TITLE([title],[subtitle],[inticks],[showticks],[outticks]) | |
Displays the specified custom title, call with no arguments to hide current titles | |
|
|
TOAST(<type>,<icon>,<text1>,<text2>,[ticks]) | |
Displays a custom "toast" popup | |
|
|
事件脚本 | |
CHATFILTER(<enabled>) | |
Enable or disable the chat filter | |
|
|
FILTER | |
Indicate that this chat meesage should be filtered and terminate | |
|
|
MODIFY(<newmessage>) | |
Set new content for this chat message | |
|
|
PASS | |
Indicate that this chat meesage should PASS the filter and terminate | |