Guest User

Command 3D Plotter

a guest
Mar 15th, 2016
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.26 KB | None | 0 0
  1. # Run once to setup the scoreboard
  2. scoreboard objectives add x dummy
  3. scoreboard objectives add y dummy
  4. scoreboard objectives add z dummy
  5. scoreboard objectives add res dummy
  6. scoreboard objectives add tmp dummy
  7.  
  8. give @p minecraft:armor_stand 1 0 {EntityTag:{NoGravity:1b,Tags:[PL,PL_SOURCE,PL_SPX,PL_SNX,PL_SPY,PL_SNY,PL_SPZ,PL_SNZ]}}
  9.  
  10.  
  11. # Main-Loop
  12. scoreboard players tag @e[type=ArmorStand,tag=PL] add PL_OLD
  13.  
  14. scoreboard players add @e[type=ArmorStand,tag=PL] x 0
  15.  
  16. execute @e[type=ArmorStand,score_x_min=-2147483648,tag=PL_SPX] ~ ~ ~ summon ArmorStand ~ ~ ~ {NoGravity:1b,Tags:[PL,PL_TPX,PL_SPY,PL_SNY,PL_SPZ,PL_SNZ]}
  17. execute @e[type=ArmorStand,score_x_min=-2147483648,tag=PL_SNX] ~ ~ ~ summon ArmorStand ~ ~ ~ {NoGravity:1b,Tags:[PL,PL_TNX,PL_SPY,PL_SNY,PL_SPZ,PL_SNZ]}
  18. execute @e[type=ArmorStand,score_x_min=-2147483648,tag=PL_SPY] ~ ~ ~ summon ArmorStand ~ ~ ~ {NoGravity:1b,Tags:[PL,PL_TPY]}
  19. execute @e[type=ArmorStand,score_x_min=-2147483648,tag=PL_SNY] ~ ~ ~ summon ArmorStand ~ ~ ~ {NoGravity:1b,Tags:[PL,PL_TNY]}
  20. execute @e[type=ArmorStand,score_x_min=-2147483648,tag=PL_SPZ] ~ ~ ~ summon ArmorStand ~ ~ ~ {NoGravity:1b,Tags:[PL,PL_TPZ,PL_SPY,PL_SNY]}
  21. execute @e[type=ArmorStand,score_x_min=-2147483648,tag=PL_SNZ] ~ ~ ~ summon ArmorStand ~ ~ ~ {NoGravity:1b,Tags:[PL,PL_TNZ,PL_SPY,PL_SNY]}
  22.  
  23. execute @e[type=ArmorStand,tag=PL_OLD] ~ ~ ~ scoreboard players operation @e[r=0,tag=!PL_OLD] x = @e[r=0,tag=PL_OLD] x
  24. execute @e[type=ArmorStand,tag=PL_OLD] ~ ~ ~ scoreboard players operation @e[r=0,tag=!PL_OLD] y = @e[r=0,tag=PL_OLD] y
  25. execute @e[type=ArmorStand,tag=PL_OLD] ~ ~ ~ scoreboard players operation @e[r=0,tag=!PL_OLD] z = @e[r=0,tag=PL_OLD] z
  26.  
  27. tp @e[type=ArmorStand,tag=PL_TPX] ~1 ~ ~
  28. tp @e[type=ArmorStand,tag=PL_TNX] ~-1 ~ ~
  29. tp @e[type=ArmorStand,tag=PL_TPY] ~ ~1 ~
  30. tp @e[type=ArmorStand,tag=PL_TNY] ~ ~-1 ~
  31. tp @e[type=ArmorStand,tag=PL_TPZ] ~ ~ ~1
  32. tp @e[type=ArmorStand,tag=PL_TNZ] ~ ~ ~-1
  33.  
  34. scoreboard players add @e[type=ArmorStand,tag=PL_TPX] x 1
  35. scoreboard players remove @e[type=ArmorStand,tag=PL_TNX] x 1
  36. scoreboard players add @e[type=ArmorStand,tag=PL_TPY] y 1
  37. scoreboard players remove @e[type=ArmorStand,tag=PL_TNY] y 1
  38. scoreboard players add @e[type=ArmorStand,tag=PL_TPZ] z 1
  39. scoreboard players remove @e[type=ArmorStand,tag=PL_TNZ] z 1
  40.  
  41. kill @e[tag=PL_SOURCE]
  42.  
  43.  
  44. # Circle
  45. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res = @e[r=0,tag=PL] x
  46. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res *= @e[r=0,tag=PL] x
  47. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp = @e[r=0,tag=PL] y
  48. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp *= @e[r=0,tag=PL] y
  49. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res += @e[r=0,tag=PL] tmp
  50. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp = @e[r=0,tag=PL] z
  51. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp *= @e[r=0,tag=PL] z
  52. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res += @e[r=0,tag=PL] tmp
  53.  
  54. execute @e[type=ArmorStand,tag=PL,score_res_min=100,score_res=120] ~ ~ ~ setblock ~ ~ ~ stained_glass 15 keep
  55.  
  56. kill @e[type=ArmorStand,tag=PL,score_res_min=130]
  57.  
  58.  
  59. # Pyramid
  60. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res = @e[r=0,tag=PL] x
  61. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res *= @e[r=0,tag=PL] y
  62. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res *= @e[r=0,tag=PL] z
  63. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res *= @e[r=0,tag=PL] res
  64. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res *= @e[r=0,tag=PL] res
  65.  
  66. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ setblock ~ ~ ~ stained_hardened_clay 13 keep
  67.  
  68. kill @e[type=ArmorStand,tag=PL,score_res_min=1000]
  69.  
  70.  
  71. # Golden Eye
  72. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res = @e[r=0,tag=PL] x
  73. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res *= @e[r=0,tag=PL] x
  74. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp = @e[r=0,tag=PL] y
  75. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp *= @e[r=0,tag=PL] y
  76. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res += @e[r=0,tag=PL] tmp
  77. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp = @e[r=0,tag=PL] z
  78. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp *= @e[r=0,tag=PL] z
  79. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] res += @e[r=0,tag=PL] tmp
  80.  
  81. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp += @e[r=0,tag=PL] res
  82. execute @e[type=ArmorStand,tag=PL] ~ ~ ~ scoreboard players operation @e[r=0,tag=PL] tmp *= @e[r=0,tag=PL] x
  83.  
  84. execute @e[type=ArmorStand,tag=PL,score_res_min=100,score_tmp=1000] ~ ~ ~ setblock ~ ~ ~ gold_block 15 keep
  85.  
  86. kill @e[type=ArmorStand,tag=PL,score_tmp_min=2000]
Advertisement
Add Comment
Please, Sign In to add comment