Added spore blossom, as requested by miss Menace.

This commit is contained in:
Abel Hoogeveen 2021-09-18 19:15:19 +02:00
parent aff958e612
commit 9e1e85623b
Signed by: abelhooge
GPG Key ID: C540221690CBFFBA
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
# Add exchg3 tag for players within distance with 10 coins minimum
execute as @a[distance=..5] run execute store result score @s tokenCount run clear @s minecraft:sunflower{ctcb:"certified"} 0
execute as @a[distance=..5] run execute if score @s tokenCount matches 1.. run tag @s add exchg3
# Save scores on monetary and player itself
execute as @a[tag=exchg3] run scoreboard players remove @e[type=minecraft:armor_stand,tag=monetary] tokenCirculation 1
# Clear coins and give diamond
execute as @a[tag=exchg3] run clear @s minecraft:sunflower{ctcb:"certified"} 1
give @a[tag=exchg3] minecraft:spore_blossom 1
# Notify using tellraw of the results
tellraw @a[tag=exchg3] ["",{"text":"Spore Exchange >> ","bold":true,"color":"dark_green"},{"text":"Exchanged 1 CraftyCoin for 1 spore blossom.","color":"white"}]
tellraw @a[distance=..5,tag=!exchg3] ["",{"text":"Spore Exchange >> ","bold":true,"color":"dark_green"},{"text":"Could not exchange. ","bold":true,"color":"dark_red"},{"text":"Not enough CraftyCoins in your inventory.","color":"white"}]
# Remove exchange tag
tag @a[tag=exchg3] remove exchg3