-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
antD97 edited this page May 18, 2022
·
22 revisions
Shorthand Commands is a simple transpiler tool that enables Minecraft
datapack developers to use additional convenient
syntax that makes .mcfunction
files more readable and organized. Checkout the
project page for a detailed readme.
Here you can learn about all the special syntax Shorthand Commands has to offer.
Define multiple mcfunctions in a single .mcfunction
file.
execute as @a[scores={time_alive=0}] run function example:player/on_death
{
say Oh no!
say That hurt!
}
Repeat a line n
times.
#!10x
particle minecraft:ambient_entity_effect ~ ~ ~ 170 0 0 255 0
Repeat a line while replacing part of it with values from a list.
#!find=creeper
#!replace=creeper|skeleton|zombie
execute as @e[type=creeper] run say I'm a creeper!
A shortened way of writing scoreboard player ...
commands.
#!sb @s[type=creeper,scores={objective=111}] objective = 222
#!sb @s[type=creeper,scores={objective=111}] objective %= @s[type=zombie,scores={objective=222}] objective"
A shortened way of writing the namespace of your function.
function __:some/function
scoreboard players set @a __cool 100
Break up long lines into multiple lines using \
.
tellraw @a ["",{"text":"A long tellraw command\n","color":"aqua"},\
{"text":"that you can actually read.","color":"green"}]
A makeshift way of hiding text editor error indicators.
function my_namespace:introduce
#! {
say Hello!
say I am @s!
#! }
#! tellraw @a ["",{"text":"A long tellraw command\n","color":"aqua"},\
#! {"text":"that you can actually read.","color":"green"}]