Energyxxer

Advanced Note Blocks - CPM Project

May 23rd, 2016
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.59 KB | None | 0 0
  1. ::section config
  2. name: Advanced Note Blocks
  3. include-success: false
  4. shape: wall
  5. max-height: 16
  6. section-line-break: false
  7.  
  8. #=====Customization Options=====#
  9. #
  10. extend-octave-limit: true
  11. # Set to true if you want to allow notes two octaves
  12. # outside of the default Minecraft range.
  13. #
  14. include-pling: true
  15. # Set to true if you want to include
  16. # the unused "pling" instrument
  17. #
  18. #
  19. #
  20. #
  21. #
  22. #
  23. #
  24. #
  25. #
  26. #
  27. #
  28. #
  29. #
  30.  
  31. ::section before
  32. scoreboard objectives add nbi_note dummy
  33. scoreboard objectives add nbi_instr dummy
  34. scoreboard objectives add nbi_success dummy
  35. scoreboard objectives add sw_slot dummy Selected Item Slot
  36. scoreboard objectives add sw_slotBuffer dummy Selected Item Slot Buffer
  37. scoreboard objectives add sw_change dummy Selected Item Slot Change
  38.  
  39. ::section after
  40. tellraw @a [{"text":"\n\n Advanced Note Blocks have been successfully installed!\n","color":"dark_green","bold":true}," "," "," "," ",{"text":" created by Energyxxer\n\n","color":"green","bold":false,"italic":true}]
  41.  
  42. ::section assign
  43. :R:
  44. :MULTI:
  45. iterations:9
  46. !s#:2;0,8
  47. scoreboard players set @a sw_slot %s {SelectedItemSlot:%s}
  48. $newline
  49.  
  50. ::section difference
  51. :R: execute @a[score_sw_slotBuffer_min=0] ~ ~ ~ scoreboard players operation @p sw_change = @p sw_slotBuffer
  52. execute @a[score_sw_slotBuffer_min=0] ~ ~ ~ scoreboard players operation @p sw_change -= @p sw_slot
  53. execute @a[score_sw_slot_min=0] ~ ~ ~ scoreboard players operation @p sw_slotBuffer = @p sw_slot
  54. scoreboard players set @a[score_sw_change_min=5] sw_change -1
  55. scoreboard players set @a[score_sw_change=-5] sw_change 1
  56. scoreboard players tag @a[tag=sw_up] remove sw_up
  57. scoreboard players tag @a[tag=sw_down] remove sw_down
  58. scoreboard players tag @a[score_sw_change_min=1] add sw_up
  59. scoreboard players tag @a[score_sw_change=-1] add sw_down
  60. $newline
  61.  
  62. ::section adjustRange
  63. :R: execute @a[tag=sw_up] ~ ~ ~ scoreboard players add @e[type=ArmorStand,name=Note,r=5,tag=!changeInstr] nbi_note 1 {Tags:["change"]}
  64. execute @a[tag=sw_down] ~ ~ ~ scoreboard players remove @e[type=ArmorStand,name=Note,r=5,tag=!changeInstr] nbi_note 1 {Tags:["change"]}
  65. execute @a[tag=sw_up] ~ ~ ~ scoreboard players add @e[type=ArmorStand,name=Note,r=5,tag=changeInstr] nbi_instr 1 {Tags:["change"]}
  66. execute @a[tag=sw_down] ~ ~ ~ scoreboard players remove @e[type=ArmorStand,name=Note,r=5,tag=changeInstr] nbi_instr 1 {Tags:["change"]}
  67. :CONDITION: include-pling = true
  68. scoreboard players set @e[type=ArmorStand,name=Note,score_nbi_instr=0] nbi_instr 6
  69. scoreboard players set @e[type=ArmorStand,name=Note,score_nbi_instr_min=7] nbi_instr 1
  70. :CONDITION: include-pling != true
  71. scoreboard players set @e[type=ArmorStand,name=Note,score_nbi_instr=0] nbi_instr 5
  72. scoreboard players set @e[type=ArmorStand,name=Note,score_nbi_instr_min=6] nbi_instr 1
  73.  
  74. :CONDITION: extend-octave-limit = true
  75. scoreboard players set @e[type=ArmorStand,name=Note,score_nbi_note=-25] nbi_note 48
  76. scoreboard players set @e[type=ArmorStand,name=Note,score_nbi_note_min=49] nbi_note -24
  77. :CONDITION: extend-octave-limit != true
  78. scoreboard players set @e[type=ArmorStand,name=Note,score_nbi_note=-1] nbi_note 24
  79. scoreboard players set @e[type=ArmorStand,name=Note,score_nbi_note_min=25] nbi_note 0
  80. execute @a[tag=sw_up] ~ ~ ~ scoreboard players tag @e[type=ArmorStand,name=Note,r=5,tag=change] add play
  81. execute @a[tag=sw_down] ~ ~ ~ scoreboard players tag @e[type=ArmorStand,name=Note,r=5,tag=change] add play
  82. $newline
  83.  
  84. ::section activation
  85. :R: testfor @e[type=ArmorStand,name=Note]
  86. :R?: scoreboard players set @e[type=ArmorStand,name=Note] nbi_success 0
  87. execute @e[type=ArmorStand,name=Note] ~ ~ ~ stats entity @e[type=ArmorStand,name=Note,r=1,c=1] set SuccessCount @e[type=ArmorStand,name=Note,r=1,c=1] nbi_success
  88. execute @e[type=ArmorStand,name=Note] ~ ~ ~ testforblock ~ ~ ~ minecraft:noteblock -1 {powered:1b}
  89. stats entity @e[type=ArmorStand,name=Note] clear SuccessCount
  90. scoreboard players tag @e[type=ArmorStand,name=Note,score_nbi_success_min=1,tag=!powered] add play
  91. scoreboard players tag @e[type=ArmorStand,name=Note,score_nbi_success_min=1,tag=!powered] add powered
  92. scoreboard players tag @e[type=ArmorStand,name=Note,score_nbi_success=0,tag=powered] remove powered
  93. $newline
  94.  
  95. ::section note_harp
  96. :R: testfor @e[type=ArmorStand,name=Note,score_nbi_instr==1,tag=play]
  97. :R?:
  98. #Harp
  99. :CONDITION: extend-octave-limit = true
  100. #-1 Octave Shift
  101. :MULTI:
  102. iterations:24
  103. !n#:2;-24,-1
  104. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88
  105. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==1,tag=play] ~ ~ ~ playsound minecraft:block.note.harp_-1 record @a ~ ~ ~ 5.0 %p 0.0
  106. #0 Octave Shift
  107. :MULTI:
  108. iterations:25
  109. !n#:2;0,24
  110. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  111. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==1,tag=play] ~ ~ ~ playsound minecraft:block.note.harp record @a ~ ~ ~ 5.0 %p 0.0
  112. :CONDITION: extend-octave-limit = true
  113. #+1 Octave Shift
  114. :MULTI:
  115. iterations:24
  116. !n#:2;25,48
  117. !p'; 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  118. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==1,tag=play] ~ ~ ~ playsound minecraft:block.note.harp_+1 record @a ~ ~ ~ 5.0 %p 0.0
  119. $newline
  120.  
  121. ::section note_bass
  122. :R: testfor @e[type=ArmorStand,name=Note,score_nbi_instr==2,tag=play]
  123. :R?:
  124. #Bass
  125. :CONDITION: extend-octave-limit = true
  126. #-1 Octave Shift
  127. :MULTI:
  128. iterations:24
  129. !n#:2;-24,-1
  130. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88
  131. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==2,tag=play] ~ ~ ~ playsound minecraft:block.note.bass_-1 record @a ~ ~ ~ 5.0 %p 0.0
  132. #0 Octave Shift
  133. :MULTI:
  134. iterations:25
  135. !n#:2;0,24
  136. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  137. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==2,tag=play] ~ ~ ~ playsound minecraft:block.note.bass record @a ~ ~ ~ 5.0 %p 0.0
  138. :CONDITION: extend-octave-limit = true
  139. #+1 Octave Shift
  140. :MULTI:
  141. iterations:24
  142. !n#:2;25,48
  143. !p'; 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  144. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==2,tag=play] ~ ~ ~ playsound minecraft:block.note.bass_+1 record @a ~ ~ ~ 5.0 %p 0.0
  145. $newline
  146.  
  147. ::section note_bassattack
  148. :R: testfor @e[type=ArmorStand,name=Note,score_nbi_instr==3,tag=play]
  149. :R?:
  150. #Bassattack
  151. :CONDITION: extend-octave-limit = true
  152. #-1 Octave Shift
  153. :MULTI:
  154. iterations:24
  155. !n#:2;-24,-1
  156. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88
  157. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==3,tag=play] ~ ~ ~ playsound minecraft:block.note.basedrum_-1 record @a ~ ~ ~ 5.0 %p 0.0
  158. #0 Octave Shift
  159. :MULTI:
  160. iterations:25
  161. !n#:2;0,24
  162. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  163. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==3,tag=play] ~ ~ ~ playsound minecraft:block.note.basedrum record @a ~ ~ ~ 5.0 %p 0.0
  164. :CONDITION: extend-octave-limit = true
  165. #+1 Octave Shift
  166. :MULTI:
  167. iterations:24
  168. !n#:2;25,48
  169. !p'; 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  170. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==3,tag=play] ~ ~ ~ playsound minecraft:block.note.basedrum_+1 record @a ~ ~ ~ 5.0 %p 0.0
  171. $newline
  172.  
  173. ::section note_snare
  174. :R: testfor @e[type=ArmorStand,name=Note,score_nbi_instr==4,tag=play]
  175. :R?:
  176. #Snare Drum
  177. :CONDITION: extend-octave-limit = true
  178. #-1 Octave Shift
  179. :MULTI:
  180. iterations:24
  181. !n#:2;-24,-1
  182. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88
  183. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==4,tag=play] ~ ~ ~ playsound minecraft:block.note.snare_-1 record @a ~ ~ ~ 5.0 %p 0.0
  184. #0 Octave Shift
  185. :MULTI:
  186. iterations:25
  187. !n#:2;0,24
  188. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  189. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==4,tag=play] ~ ~ ~ playsound minecraft:block.note.snare record @a ~ ~ ~ 5.0 %p 0.0
  190. :CONDITION: extend-octave-limit = true
  191. #+1 Octave Shift
  192. :MULTI:
  193. iterations:24
  194. !n#:2;25,48
  195. !p'; 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  196. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==4,tag=play] ~ ~ ~ playsound minecraft:block.note.snare_+1 record @a ~ ~ ~ 5.0 %p 0.0
  197. $newline
  198.  
  199. ::section note_hat
  200. :R: testfor @e[type=ArmorStand,name=Note,score_nbi_instr==5,tag=play]
  201. :R?:
  202. #Hat
  203. :CONDITION: extend-octave-limit = true
  204. #-1 Octave Shift
  205. :MULTI:
  206. iterations:24
  207. !n#:2;-24,-1
  208. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88
  209. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==5,tag=play] ~ ~ ~ playsound minecraft:block.note.hat_-1 record @a ~ ~ ~ 5.0 %p 0.0
  210. #0 Octave Shift
  211. :MULTI:
  212. iterations:25
  213. !n#:2;0,24
  214. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  215. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==5,tag=play] ~ ~ ~ playsound minecraft:block.note.hat record @a ~ ~ ~ 5.0 %p 0.0
  216. :CONDITION: extend-octave-limit = true
  217. #+1 Octave Shift
  218. :MULTI:
  219. iterations:24
  220. !n#:2;25,48
  221. !p'; 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  222. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==5,tag=play] ~ ~ ~ playsound minecraft:block.note.hat_+1 record @a ~ ~ ~ 5.0 %p 0.0
  223. $newline
  224.  
  225. ::section note_pling
  226. #Pling (Extra)
  227. :CONDITION: include-pling = true
  228. :R: testfor @e[type=ArmorStand,name=Note,score_nbi_instr==6,tag=play]
  229. :R?:
  230. :CONDITION: extend-octave-limit = true
  231. #-1 Octave Shift
  232. :MULTI:
  233. iterations:24
  234. !n#:2;-24,-1
  235. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88
  236. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==6,tag=play] ~ ~ ~ playsound minecraft:block.note.pling_-1 record @a ~ ~ ~ 5.0 %p 0.0
  237. #0 Octave Shift
  238. :MULTI:
  239. iterations:25
  240. !n#:2;0,24
  241. !p'; 0.5, 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  242. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==6,tag=play] ~ ~ ~ playsound minecraft:block.note.pling record @a ~ ~ ~ 5.0 %p 0.0
  243. :CONDITION: extend-octave-limit = true
  244. #+1 Octave Shift
  245. :MULTI:
  246. iterations:24
  247. !n#:2;25,48
  248. !p'; 0.53, 0.56, 0.59, 0.62, 0.67, 0.7, 0.75, 0.8, 0.84, 0.9, 0.95, 1.0, 1.05, 1.12, 1.19, 1.26, 1.34, 1.42, 1.5, 1.6, 1.68, 1.78, 1.88, 2.0
  249. execute @e[type=ArmorStand,name=Note,score_nbi_note==%n,score_nbi_instr==6,tag=play] ~ ~ ~ playsound minecraft:block.note.pling_+1 record @a ~ ~ ~ 5.0 %p 0.0
  250. $newline
  251.  
  252. ::section play_end
  253. :R: testfor @e[type=ArmorStand,name=Note,tag=play]
  254. :R?: execute @e[type=ArmorStand,name=Note,tag=play] ~ ~ ~ particle note ~ ~1 ~ 0 0 0 1 1 force @a[r=16]
  255. scoreboard players tag @e[type=ArmorStand,name=Note,tag=play] remove play
  256.  
  257. ::section placing
  258. $newline
  259. $newline
  260. :I!: give @p minecraft:armor_stand 1 0 {display:{Name:"Place Advanced Note Block"},ench:[],EntityTag:{CustomName:SpawnNote,Tags:["init","valid"],NoGravity:1b,Small:1b}}
  261. :I: setblock ~ ~ ~ minecraft:stone_button 5
  262. $newline
  263. $newline
  264.  
  265. #LINE PADDING##########################################################################################################################################################################################################################################################################################################################################################################
  266. $shortcut invis ActiveEffects:[{Id:14,Duration:10000000,Amplifier:0,ShowParticles:0b}]
  267. $shortcut resis ActiveEffects:[{Id:11,Duration:10000000,Amplifier:5,ShowParticles:0b}]
  268. $shortcut invis_resis ActiveEffects:[{Id:14,Duration:10000000,Amplifier:0,ShowParticles:0b},{Id:11,Duration:10000000,Amplifier:5,ShowParticles:0b}]
  269.  
  270. ::section initializing
  271. :R: testfor @e[type=ArmorStand,name=SpawnNote]
  272. :R?: execute @e[type=ArmorStand,name=SpawnNote] ~ ~ ~ summon ArmorStand ~ ~.5 ~ {CustomName:Note,Tags:["valid"],NoGravity:1b,Small:1b,Invisible:1b,Marker:1b,ArmorItems:[{},{},{},{id:minecraft:stained_glass,Count:0b,Damage:5s,tag:{ench:[]}}],Pose:{Head:[180.0f,0.0f,0.0f]},Passengers:[{id:AreaEffectCloud,CustomName:"< Note >",Duration:5,Tags:["NoteUI","NoteUIOverlay","NoteUIOverlay1"],Passengers:[{id:Bat,NoAI:1b,Silent:1b,CustomName:"NoteButton1",Tags:["NoteUI","NoteButton1"],$s invis_resis;,Passengers:[{id:AreaEffectCloud,CustomName:"[ Close ]",Duration:5,Tags:["NoteUI","NoteUIOverlay","NoteUIOverlay2"],Passengers:[{id:Bat,NoAI:1b,Silent:1b,CustomName:"NoteButton2",Tags:["NoteUI","NoteButton2"],$s invis_resis;,Passengers:[{id:AreaEffectCloud,CustomName:"[ Lock ]",Duration:5,Tags:["NoteUI","NoteUIOverlay","NoteUIOverlay3"],Passengers:[{id:Bat,NoAI:1b,Silent:1b,CustomName:"NoteButton3",Tags:["NoteUI","NoteButton3"],$s invis_resis;}]}]}]}]}]}]}
  273. execute @e[type=ArmorStand,name=SpawnNote] ~ ~ ~ scoreboard players set @e[type=ArmorStand,name=Note,dx=0] nbi_note 0
  274. execute @e[type=ArmorStand,name=SpawnNote] ~ ~ ~ scoreboard players set @e[type=ArmorStand,name=Note,dx=0] nbi_instr 1
  275. execute @e[type=ArmorStand,name=SpawnNote] ~ ~ ~ setblock ~ ~ ~ minecraft:noteblock
  276. execute @e[type=ArmorStand,name=SpawnNote] ~ ~ ~ setblock ~ ~1 ~ minecraft:piston_extension
  277. kill @e[type=ArmorStand,name=SpawnNote]
  278. $newline
  279.  
  280. ::section disabling
  281. :R: testfor @e[type=ArmorStand,name=Note]
  282. :R?: scoreboard players tag @e[type=ArmorStand,name=Note] remove valid
  283. execute @e[type=ArmorStand,name=Note] ~ ~ ~ detect ~ ~ ~ minecraft:noteblock -1 scoreboard players tag @e[type=ArmorStand,name=Note,r=0,c=1] add valid
  284. execute @e[type=ArmorStand,name=Note,tag=!valid] ~ ~ ~ setblock ~ ~1 ~ minecraft:air
  285. kill @e[type=ArmorStand,name=Note,tag=!valid]
  286. $newline
  287.  
  288. ::section misc
  289. :R: scoreboard players tag @e[type=Bat,tag=NoteUI] add NoteUIKill
  290. scoreboard players tag @e[type=AreaEffectCloud,tag=NoteUI] add NoteUIKill
  291. execute @e[type=ArmorStand,name=Note] ~ ~ ~ scoreboard players tag @e[type=Bat,tag=NoteUI,dx=0,dy=3,dz=0] remove NoteUIKill
  292. execute @e[type=ArmorStand,name=Note] ~ ~ ~ scoreboard players tag @e[type=AreaEffectCloud,tag=NoteUI,dx=0,dy=3,dz=0] remove NoteUIKill
  293. tp @e[type=Bat,tag=NoteUIKill] ~ -512 ~
  294. kill @e[type=AreaEffectCloud,tag=NoteUIKill]
  295. entitydata @e[type=AreaEffectCloud,tag=NoteUI] {Duration:20,Age:0,Particle:"take",Radius:0.00000001f,RadiusOnUse:0,RadiusPerTick:0}
  296. $newline
  297.  
  298. ::section GUI
  299. :R: testfor @e[type=ArmorStand,name=Note]
  300. :R?: scoreboard players tag @e[type=Bat,tag=NoteUI] remove click
  301. scoreboard players tag @e[type=Bat,tag=NoteUI] add click {HurtTime:10s}
  302. execute @e[type=ArmorStand,name=Note,tag=!change] ~ ~ ~ execute @e[type=Bat,tag=click,dx=0,dy=1,dz=0] ~ ~ ~ entitydata @e[type=AreaEffectCloud,tag=NoteUIOverlay1,dx=0,dy=2,dz=0] {CustomName:"< Note >"}
  303. execute @e[type=ArmorStand,name=Note,tag=!change] ~ ~ ~ execute @e[type=Bat,tag=click,dx=0,dy=1,dz=0] ~ ~ ~ entitydata @e[type=AreaEffectCloud,tag=NoteUIOverlay2,dx=0,dy=2,dz=0] {CustomName:"[ Close ]"}
  304. execute @e[type=ArmorStand,name=Note,tag=!change] ~ ~ ~ execute @e[type=Bat,tag=click,dx=0,dy=1,dz=0] ~ ~ ~ entitydata @e[type=AreaEffectCloud,tag=NoteUIOverlay3,dx=0,dy=2,dz=0] {CustomName:"[ Lock ]"}
  305. execute @e[type=ArmorStand,name=Note,tag=!change] ~ ~ ~ entitydata @e[type=AreaEffectCloud,tag=NoteUIOverlay,dx=0,dy=3,dz=0] {CustomNameVisible:0b}
  306. execute @e[type=ArmorStand,name=Note,tag=change] ~ ~ ~ entitydata @e[type=AreaEffectCloud,tag=NoteUIOverlay,dx=0,dy=3,dz=0] {CustomNameVisible:1b}
  307. execute @e[type=ArmorStand,name=Note,tag=change] ~ ~ ~ scoreboard players tag @e[type=Bat,name=NoteButton1,tag=!changeInstr,dx=0,dy=1,dz=0] add changeInstrT {Tags:["click"]}
  308. execute @e[type=ArmorStand,name=Note,tag=change] ~ ~ ~ scoreboard players tag @e[type=Bat,name=NoteButton1,tag=click,dx=0,dy=1,dz=0] remove changeInstr {Tags:["changeInstr"]}
  309. execute @e[type=ArmorStand,name=Note,tag=change] ~ ~ ~ scoreboard players tag @e[type=Bat,name=NoteButton1,tag=changeInstrT,dx=0,dy=1,dz=0] add changeInstr
  310. execute @e[type=ArmorStand,name=Note,tag=change] ~ ~ ~ scoreboard players tag @e[type=Bat,name=NoteButton1,tag=changeInstrT,dx=0,dy=1,dz=0] remove changeInstrT
  311. scoreboard players tag @e[type=ArmorStand,name=Note,tag=change] remove changeInstr
  312. $newline
  313. :R: testfor @e[type=ArmorStand,name=Note]
  314. :R?: execute @e[type=Bat,name=NoteButton1,tag=changeInstr] ~ ~-1 ~ scoreboard players tag @e[type=ArmorStand,name=Note,tag=change,dx=0,dy=1,dz=0] add changeInstr
  315. execute @e[type=Bat,name=NoteButton1,tag=!changeInstr] ~ ~-1 ~ entitydata @e[type=AreaEffectCloud,tag=NoteUIOverlay1,dx=0,dy=1,dz=0] {CustomName:"< Note >"}
  316. execute @e[type=Bat,name=NoteButton1,tag=changeInstr] ~ ~-1 ~ entitydata @e[type=AreaEffectCloud,tag=NoteUIOverlay1,dx=0,dy=1,dz=0] {CustomName:"< Instrument >"}
  317. execute @e[type=ArmorStand,name=Note,tag=change] ~ ~ ~ particle mobSpellAmbient ~ ~ ~ .5 .5 .5 1 5
  318. execute @e[type=ArmorStand,name=Note,tag=!change] ~ ~ ~ execute @e[type=Bat,tag=click,dx=0,dy=1,dz=0] ~ ~-1 ~ tellraw @a[c=2,r=5] [{"text":" | ","color":"dark_aqua"},{"text":"Advanced Note Block","color":"aqua"},{"text":" | ","color":"dark_aqua"},{"text":"Use your scrollwheel to increase or decrease the note or instrument.","color":"green"}]
  319. execute @e[type=ArmorStand,name=Note,tag=!change] ~ ~ ~ execute @e[type=Bat,tag=click,dx=0,dy=1,dz=0] ~ ~-1 ~ scoreboard players tag @e[type=ArmorStand,name=Note,dx=0,dy=1,dz=0] add change
  320. execute @e[type=ArmorStand,name=Note,tag=change] ~ ~ ~ execute @e[type=Bat,name=NoteButton2,tag=click,dx=0,dy=1,dz=0] ~ ~-1 ~ scoreboard players tag @e[type=ArmorStand,name=Note,dx=0,dy=1,dz=0] remove change
  321. execute @e[type=ArmorStand,name=Note,tag=change] ~ ~ ~ execute @e[type=Bat,name=NoteButton3,tag=click,dx=0,dy=2,dz=0] ~ ~-2 ~ scoreboard players tag @e[type=ArmorStand,name=Note,dx=0,dy=1,dz=0] add lock
  322. execute @e[type=ArmorStand,name=Note,tag=lock] ~ ~ ~ tellraw @a[c=2,r=5] [{"text":" | ","color":"dark_aqua"},{"text":"Advanced Note Block","color":"aqua"},{"text":" | ","color":"dark_aqua"},{"text":"You have locked this note block, disabling all interactions with it, as well as reducing lag. Replace the advanced note block to edit again.","color":"red"}]
  323. execute @e[type=ArmorStand,name=Note,tag=lock] ~ ~ ~ kill @e[type=!Player,tag=NoteUI,dx=0,dy=3,dz=0]
  324. scoreboard players tag @e[type=ArmorStand,name=Note,tag=lock] remove change
  325. scoreboard players tag @e[type=ArmorStand,name=Note,tag=lock] remove changeInstr
  326. scoreboard players tag @e[type=ArmorStand,name=Note,tag=lock] remove lock
  327. $newline
  328.  
  329. ::section crafting
  330. :R: execute @e[type=Item] ~ ~ ~ detect ~ ~-1 ~ minecraft:crafting_table -1 scoreboard players tag @e[type=Item,r=0,c=1] add changeNoteBlock {Item:{id:minecraft:noteblock}}
  331. execute @e[type=Item,tag=changeNoteBlock] ~ ~ ~ particle dragonbreath ~ ~ ~ 0 0 0 1 5
  332. execute @e[type=Item,tag=changeNoteBlock] ~ ~ ~ playsound minecraft:entity.ghast.shoot master @a ~ ~ ~ 1.0 0.5 0.0
  333. execute @e[type=Item,tag=changeNoteBlock] ~ ~ ~ playsound minecraft:entity.ghast.shoot master @a ~ ~ ~ 1.0 2.0 0.0
  334. entitydata @e[type=Item,tag=changeNoteBlock] {CustomName:"Advanced Note Block",CustomNameVisible:1b,Tags:[],Item:{id:minecraft:armor_stand,tag:{ench:[],display:{Name:"Place Advanced Note Block"},EntityTag:{CustomName:SpawnNote,NoGravity:1b}}}}
Advertisement
Add Comment
Please, Sign In to add comment