Initial commit
commit
b05ad4a0e3
|
@ -0,0 +1 @@
|
|||
{"values": ["tct:load"]}
|
|
@ -0,0 +1 @@
|
|||
{"values": ["tct:tick"]}
|
|
@ -0,0 +1,2 @@
|
|||
scoreboard players add AYE mt_vote_balance 1
|
||||
playsound minecraft:block.note_block.pling master @a ~ ~ ~ 100 2
|
|
@ -0,0 +1,4 @@
|
|||
execute as @a[scores={mt_vote_trigger=1}] run function tct:ayevote
|
||||
execute as @a[scores={mt_vote_trigger=2}] run function tct:novote
|
||||
execute as @a[scores={mt_vote_trigger=1..2}] run clear @s written_book{certified:votebook} 1
|
||||
execute as @a[scores={mt_vote_trigger=1..2}] run scoreboard players reset @s mt_vote_trigger
|
|
@ -0,0 +1 @@
|
|||
scoreboard players remove Remaining mt_vote_balance 1
|
|
@ -0,0 +1,10 @@
|
|||
scoreboard objectives setdisplay sidebar
|
||||
scoreboard players reset Remaining mt_vote_balance
|
||||
execute as @a run clear @s written_book{certified:votebook}
|
||||
tellraw @a ["",{"text":"Vote >>","bold":true,"color":"dark_green"},{"text":" AYES: ","bold":true,"color":"dark_green"},{"score":{"name":"AYE","objective":"mt_vote_balance"},"bold":true,"color":"white"},{"text":" "},{"text":" NOES: ","bold":true,"color":"red"},{"score":{"name":"NO","objective":"mt_vote_balance"},"bold":true,"color":"white"}]
|
||||
scoreboard players reset * mt_vote_balance
|
||||
scoreboard players reset * mt_vote_trigger
|
||||
team remove green
|
||||
team remove red
|
||||
team remove yellow
|
||||
schedule function tct:notes/down_0 1t
|
|
@ -0,0 +1,2 @@
|
|||
scoreboard objectives add mt_vote_balance dummy "Vote results"
|
||||
scoreboard objectives add mt_vote_trigger trigger
|
|
@ -0,0 +1,2 @@
|
|||
playsound minecraft:block.note_block.pling master @a ~ ~ ~ 100 1.6
|
||||
schedule function tct:notes/down_1 5t
|
|
@ -0,0 +1,2 @@
|
|||
playsound minecraft:block.note_block.pling master @a ~ ~ ~ 100 1.2
|
||||
schedule function tct:notes/down_2 5t
|
|
@ -0,0 +1 @@
|
|||
playsound minecraft:block.note_block.pling master @a ~ ~ ~ 100 0.8
|
|
@ -0,0 +1,2 @@
|
|||
playsound minecraft:block.note_block.pling master @a ~ ~ ~ 100 0.8
|
||||
schedule function tct:notes/up_1 5t
|
|
@ -0,0 +1,2 @@
|
|||
playsound minecraft:block.note_block.pling master @a ~ ~ ~ 100 1.0
|
||||
schedule function tct:notes/up_2 5t
|
|
@ -0,0 +1 @@
|
|||
playsound minecraft:block.note_block.pling master @a ~ ~ ~ 100 1.6
|
|
@ -0,0 +1,2 @@
|
|||
scoreboard players add NO mt_vote_balance 1
|
||||
playsound minecraft:block.note_block.pling master @a ~ ~ ~ 100 1.6
|
|
@ -0,0 +1 @@
|
|||
execute as @a[scores={mt_vote_trigger=1..2}] run function tct:calc
|
|
@ -0,0 +1,39 @@
|
|||
tellraw @a ["",{"text":"Vote >>","bold":true,"color":"dark_green"},{"text":" Vote using the voting book now!","bold":true,"color":"white"}]
|
||||
scoreboard players reset * mt_vote_balance
|
||||
scoreboard players reset * mt_vote_trigger
|
||||
scoreboard players enable @a[tag=eligible] mt_vote_trigger
|
||||
give @a[tag=eligible] minecraft:written_book{display:{Name:'{"text":"Voting Book","color":"white","bold":true}',Lore:['{"text":"Cast your vote now!"}']},certified:votebook,title:"Voting Book",author:"Kipje",pages:['[{"text":"Cast your vote!\\n Click AYE or NO below.\\n\\n\\n"},{"text":"AYE","color":"dark_green","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"Click to vote AYE on this vote."}]},"clickEvent":{"action":"run_command","value":"/trigger mt_vote_trigger set 1"}},{"text":" | "},{"text":"NO","color":"red","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"Click to vote NO on this vote."}]},"clickEvent":{"action":"run_command","value":"/trigger mt_vote_trigger set 2"}}]']} 1
|
||||
team add green "Green"
|
||||
team modify green color dark_green
|
||||
team add red "Red"
|
||||
team modify red color red
|
||||
team add yellow "Yellow"
|
||||
team modify yellow color yellow
|
||||
team join green AYE
|
||||
team join red NO
|
||||
team join yellow Remaining
|
||||
scoreboard players set AYE mt_vote_balance 0
|
||||
scoreboard players set NO mt_vote_balance 0
|
||||
scoreboard players set Remaining mt_vote_balance 20
|
||||
scoreboard objectives setdisplay sidebar mt_vote_balance
|
||||
schedule function tct:notes/up_0 5t
|
||||
schedule function tct:decrease 1s append
|
||||
schedule function tct:decrease 2s append
|
||||
schedule function tct:decrease 3s append
|
||||
schedule function tct:decrease 4s append
|
||||
schedule function tct:decrease 5s append
|
||||
schedule function tct:decrease 6s append
|
||||
schedule function tct:decrease 7s append
|
||||
schedule function tct:decrease 8s append
|
||||
schedule function tct:decrease 9s append
|
||||
schedule function tct:decrease 10s append
|
||||
schedule function tct:decrease 11s append
|
||||
schedule function tct:decrease 12s append
|
||||
schedule function tct:decrease 13s append
|
||||
schedule function tct:decrease 14s append
|
||||
schedule function tct:decrease 15s append
|
||||
schedule function tct:decrease 16s append
|
||||
schedule function tct:decrease 17s append
|
||||
schedule function tct:decrease 18s append
|
||||
schedule function tct:decrease 19s append
|
||||
schedule function tct:halt 20s
|
|
@ -0,0 +1,38 @@
|
|||
tellraw @a ["",{"text":"Vote >>","bold":true,"color":"dark_green"},{"text":" Vote using the voting book now!","bold":true,"color":"white"}]
|
||||
scoreboard players reset * mt_vote_balance
|
||||
scoreboard players reset * mt_vote_trigger
|
||||
scoreboard players enable @a[tag=eligible] mt_vote_trigger
|
||||
give @a[tag=eligible] minecraft:written_book{display:{Name:'{"text":"Voting Book","color":"white","bold":true}',Lore:['{"text":"Cast your vote now!"}']},certified:votebook,title:"Voting Book",author:"Kipje",pages:['[{"text":"Cast your vote!\\n Click AYE or NO below.\\n\\n\\n"},{"text":"AYE","color":"dark_green","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"Click to vote AYE on this vote."}]},"clickEvent":{"action":"run_command","value":"/trigger mt_vote_trigger set 1"}},{"text":" | "},{"text":"NO","color":"red","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"Click to vote NO on this vote."}]},"clickEvent":{"action":"run_command","value":"/trigger mt_vote_trigger set 2"}}]']} 1
|
||||
team add green "Green"
|
||||
team modify green color dark_green
|
||||
team add red "Red"
|
||||
team modify red color red
|
||||
team add yellow "Yellow"
|
||||
team modify yellow color yellow
|
||||
team join green AYE
|
||||
team join red NO
|
||||
team join yellow Remaining
|
||||
scoreboard players set AYE mt_vote_balance 0
|
||||
scoreboard players set NO mt_vote_balance 0
|
||||
scoreboard players set Remaining mt_vote_balance 20
|
||||
schedule function tct:notes/up_0 5t
|
||||
schedule function tct:decrease 1s append
|
||||
schedule function tct:decrease 2s append
|
||||
schedule function tct:decrease 3s append
|
||||
schedule function tct:decrease 4s append
|
||||
schedule function tct:decrease 5s append
|
||||
schedule function tct:decrease 6s append
|
||||
schedule function tct:decrease 7s append
|
||||
schedule function tct:decrease 8s append
|
||||
schedule function tct:decrease 9s append
|
||||
schedule function tct:decrease 10s append
|
||||
schedule function tct:decrease 11s append
|
||||
schedule function tct:decrease 12s append
|
||||
schedule function tct:decrease 13s append
|
||||
schedule function tct:decrease 14s append
|
||||
schedule function tct:decrease 15s append
|
||||
schedule function tct:decrease 16s append
|
||||
schedule function tct:decrease 17s append
|
||||
schedule function tct:decrease 18s append
|
||||
schedule function tct:decrease 19s append
|
||||
schedule function tct:halt 20s
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"pack": {
|
||||
"pack_format": 6,
|
||||
"description": "Crafty Table Datapack\nMade by Juris_LLM"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue