GnaspGames / Smelt

A CLI tool for Minecraft map makers
http://smelt.gnasp.com
MIT License
19 stars 4 forks source link

Add JSON option "markerTag" - embed in command blocks #17

Closed GnaspGames closed 8 years ago

GnaspGames commented 8 years ago

Add an option to set a markerTag.

{"markerTag":"randomPowerup"}

This would then be used to summon an ArmorStand inside every command block following until markerTag is reset back to nothing.

Why? Well, I'm glad you asked!

# POWERUP OPTIONS
{"type":"impulse", "auto":false, "conditional":false}
{"markerTag":"randomPowerUp"}
    /scoreboard players set @e[name=SYSTEM] power_up_option 1
    /scoreboard players set @e[name=SYSTEM] power_up_option 2
    /scoreboard players set @e[name=SYSTEM] power_up_option 3
    /scoreboard players set @e[name=SYSTEM] power_up_option 4
    /scoreboard players set @e[name=SYSTEM] power_up_option 5
    /scoreboard players set @e[name=SYSTEM] power_up_option 6
{"markerTag":""}

# CYCLE POWERUP OPTIONS
!function CyclePowerups
    {"type":"chain", "conditional":false}
    /execute @e[type=ArmorStand,tag=randomPowerUp] ~ ~ ~ blockdata ~ ~ ~ {auto:0b}
    /execute @r[type=ArmorStand,tag=randomPowerUp] ~ ~ ~ blockdata ~ ~ ~ {auto:1b}
GnaspGames commented 8 years ago

Done in b15d216 :smiley_cat: