Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- say this is a minecraft command which will run once when you load the structure!
- say you can put any minecraft commands here at all, such as:
- gamerule commandBlockOutput false
- //you can write a comment which will be ignored by placing two forward slashes
- //you can also leave empty lines without generating blank commands
- //here is how you do a repeating clock:
- machine mugs_clock every 1
- say all commands tab indented here will be part of a clock called "mugs_clock"
- say it will run every tick (20/second) //you can change the number after "every" to slow the clock down
- machine commands_that_runs_when_called
- say this machine will only run when told to by a command, rather than at regular intervals
- run commands_that_runs_when_called //this will make it run. You can put this command inside other clocks.
- run commands_that_runs_when_called after 20 //this will wait a second before running it
- //note that "run"ing a command more than once in a frame wont make the commands execute again.
- //to avoid that use "inline":
- inline some_random_code
- say this code isnt part of its own machine
- say instead, whenever you type its name in the future it will be *inserted* into that point in your code
- say for example:
- machine another_machine every 1
- some_random_code
- some_random_code
- //this machine will have all three commands from "some_random_code" inserted into it twice
- //so we will be adding 6 command blocks instead of just 1
- //but it allows the code to be run multiple times in a frame
- alias mugs_alias this is an alias!
- //now whenever i type "mugs_alias", it will replace that with "this is an alias"
- //you could use that like so:
- say mugs_alias //translates to "say this is an alias!"
- //I often use it for this:
- alias so+ scoreboard objectives add
- alias sp+ scoreboard players add
- //etc...
- //careful that you dont make your aliases too short or you might accidentally use them when you dont want to!
- //you can also use inlines kind of like functions in programming, effectively building temporary aliases into them:
- inline kill_near <x> <y> <z> <r>
- execute @p <x> <y> <z> kill @e[r=<r>]
- say killing all entities within <r> blocks of <x> <y> <z>!
- //now I can use it like so:
- kill_near 100 50 100 10
- //which effectively translates to "execute @p 100 50 100 kill @e[r=10]"
- //and "say killing all entities within 10 blocks of 100 50 100!"
- //if you want to run many similar commands you can use a prefix:
- prefix execute @e[c=1,type=zombie] ~ ~ ~ say
- all this indented text
- will be said by a zombie!
- grr im a zombie lol...
- //you can even use a prefix within an inline, machine or even another prefix:
- prefix tell
- prefix mug806
- only mug806 can read this message
- and this message
- prefix @p
- these messages will be whispered
- to the nearest player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement