Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //generates square by makkie_master
- //You have to use command combiner pro for this to work
- //block = what kind of block you want "wool" would make it white wool "wool 4" will make it yellow wool
- //limit = How many steps an armorstand is going to make. How far it is going to go.
- //detectblock = trigger block. You have to put the armorstand on top of this block to trigger the square
- //radius = How big is one step
- //formula for how to calculate square size is: $limit*2*$radius
- //the formula above only applies when $radius < $limit
- $block = "bone_block"
- $radius = 1
- $limit = 40
- $detectblock = "diamond_block"
- $moving = $radius*2
- $result = $limit*2*$radius
- /tellraw @a ["",{"text":"Make sure $limit is bigger than $radius\nIf this is true your square is $result by $result","color":"red"},{"text":"\nMade by Quinten Cabo","color":"green"}]
- //init + makes sure you only get one
- /scoreboard players tag @a[r=20] add givetrigger
- /clear @a[r=20,tag=givetrigger] armor_stand 0 1728 {display:{Lore:["sq"]}}
- /give @a[tag=givetrigger] minecraft:armor_stand 1 0 {display:{Lore:["Made by makkie_master","sq"],Name:"Place me on $detectblock to make a $result by $result square"},EntityTag:{CustomName:"Start",CustomNameVisible:1,Tags:["start_qc"]}}
- /scoreboard players tag @a[tag=givetrigger] remove givetrigger
- //add objective
- /scoreboard objectives remove counter
- /scoreboard objectives add counter dummy
- repeat main{
- /execute @e[tag=start_qc] ~ ~ ~ detect ~ ~-1 ~ $detectblock 0 /entitydata @e[c=1] {Tags:["start_up"]}
- //summon them
- /execute @e[tag=start_up] ~ ~ ~ /summon armor_stand ~ ~ ~ {Tags:["posx","count_add","s"],NoGravity:1b}
- /execute @e[tag=start_up] ~ ~ ~ /summon armor_stand ~ ~ ~ {Tags:["posz","count_add","s"],NoGravity:1b}
- /execute @e[tag=start_up] ~ ~ ~ /summon armor_stand ~ ~ ~ {Tags:["negx","count_add","s"],NoGravity:1b}
- /execute @e[tag=start_up] ~ ~ ~ /summon armor_stand ~ ~ ~ {Tags:["negz","count_add","s"],NoGravity:1b}
- /kill @e[tag=start_qc]
- cond:/tellraw @a ["",{"text":"$detectblock not found!","color":"dark_red"}]
- /kill @e[tag=start_up]
- //make the movers summon the fillers
- /execute @e[tag=posx] ~ ~ ~ /summon armor_stand ~ ~ ~ {Tags:["posx_fill","filler","count_add"],NoGravity:1b}
- /execute @e[tag=negx] ~ ~ ~ /summon armor_stand ~ ~ ~ {Tags:["negx_fill","filler","count_add"],NoGravity:1b}
- /execute @e[tag=posz] ~ ~ ~ /summon armor_stand ~ ~ ~ {Tags:["posz_fill","filler","count_add"],NoGravity:1b}
- /execute @e[tag=negz] ~ ~ ~ /summon armor_stand ~ ~ ~ {Tags:["negz_fill","filler","count_add"],NoGravity:1b}
- //the action
- /execute @e[tag=filler] ~ ~ ~ /fill ~$radius ~-1 ~$radius ~-$radius ~-1 ~-$radius $block
- //the movement
- /tp @e[tag=posx] ~$moving ~ ~
- /tp @e[tag=negx] ~-$moving ~ ~
- /tp @e[tag=posz] ~ ~ ~$moving
- /tp @e[tag=negz] ~ ~ ~-$moving
- /tp @e[tag=posx_fill] ~ ~ ~$moving
- /tp @e[tag=negx_fill] ~ ~ ~-$moving
- /tp @e[tag=posz_fill] ~-$moving ~ ~
- /tp @e[tag=negz_fill] ~$moving ~ ~
- //adding score
- /scoreboard players add @e[tag=count_add] counter 1
- //end when 10 is reached
- /kill @e[tag=filler,score_counter_min=$limit]
- /kill @e[tag=s,score_counter_min=$limit]
- cond:/tellraw @a ["",{"text":"$result by $result square generated!","color":"dark_green"}]
- }
- /summon falling_block ~ ~10 ~ {Block:command_block,Data:0,Time:1,DropItem:0}
Add Comment
Please, Sign In to add comment