-
Notifications
You must be signed in to change notification settings - Fork 5
Tutorial 1.1. A scoreboard counter
For our first application we will create a counter. It should count the positive integers from 1 to 9. We will use a dummy scoreboard COUNTER to increment the number every gametick and display it. For information on Minecraft's scoreboard system visit the Minecraft Wiki.
This is our MPL-Code:
/scoreboard players add @a COUNTER 1
/scoreboard players set @a[score_COUNTER_min=10] COUNTER 1
To compile the code press on the command block button or on the menu item "Compile to one Command" in the file menu. You can then copy the text of the dialog via CTRL+C and paste it into a command block in Minecraft. Once you activate that command block all other command blocks will be created.
We still need to setup the scoreboard, so we can actually use the counter. For this we run the commands:
- /scoreboard objectives add COUNTER dummy
- /scoreboard objectives setdisplay sidebar COUNTER
Now we can change the first generated command block to be repeat and needs redstone and supply it with a redstone signal. Voila we have a counter.
Continue with Tutorial 1.2. Command block modifiers.