dotlizard

shrine buffs

Jan 12th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.30 KB | None | 0 0
  1. # First it tests for the head in the chest. Then it looks for boots and tags them DropBoots
  2. # The tag will only be added to items that match the criteria. If no boots are found, the boot stack won't be activated.
  3. scoreboard players tag @e[type=Item,x=-254,y=42,z=-63,r=2,c=1] add DropBoots {Item:{id:"minecraft:leather_boots"}}
  4. scoreboard players tag @e[type=Item,x=-254,y=42,z=-63,r=2,c=1] add DropBoots {Item:{id:"minecraft:golden_boots"}}
  5. scoreboard players tag @e[type=Item,x=-254,y=42,z=-63,r=2,c=1] add DropBoots {Item:{id:"minecraft:chainmail_boots"}}
  6. scoreboard players tag @e[type=Item,x=-254,y=42,z=-63,r=2,c=1] add DropBoots {Item:{id:"minecraft:iron_boots"}}
  7. scoreboard players tag @e[type=Item,x=-254,y=42,z=-63,r=2,c=1] add DropBoots {Item:{id:"minecraft:diamond_boots"}}
  8. # then if that tag exists, it sets a redstone block at the top of the Level 1 Boots Buff stack.
  9. execute @e[tag=DropBoots] ~ ~ ~ /setblock -252 40 -68 redstone_block
  10. ##
  11. ## here, we need to add DropHat, DropPants, DropChest, and DropSword for every material of those items, followed by checking to see if that tag exists, and if it does, placing a redstone block at the top of the appropriate stack. Then we need to add four more of these, one for each buff level.
  12. ##
  13. # placing the redstone block activates this sequence:
  14. # first, the buff
  15. entitydata @e[type=Item,c=1,tag=DropBoots] {Item:{tag:{Unbreakable:1,AttributeModifiers:[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:0.05,Operation:1,UUIDLeast:894654,UUIDMost:2872,Slot:"feet"}]}}}
  16. # then the good news.
  17. title @p tile {"text":"Buffed the boots!","color":"gray","italic":"true"}
  18. title @p subtitle {"text":"Level 1 Buff","color":"red","italic":"true"}
  19. # we target the boots and give a little puff of magic
  20. execute @e[type=Item,c=1,tag=DropBoots] ~ ~ ~ particle reddust ~ ~ ~ 0.2 0.2 0.2 0 10
  21. # let's see if we can play a sound too
  22. execute @a[type=Player,x=-254,y=42,z=-63,r=8,c=1] ~ ~ ~ /playsound minecraft:entity.player.levelup master @a ~ ~ ~ 1 2 0
  23. # clone the empty chest
  24. clone -254 36 -64 -254 36 -64 -254 43 -62
  25. # remove that tag
  26. scoreboard players tag @a[tag=DropBoots] remove DropBoots
  27. # get rid of that redstone block
  28. setblock -252 40 -68 air
  29. ##
  30. ## So, we need a stack like this for every item, every buff level: Boots 1, Boots 2, etc etc.
Advertisement
Add Comment
Please, Sign In to add comment