Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
VForiel committed Oct 1, 2023
1 parent bfc4638 commit b7d589b
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 11 deletions.
7 changes: 5 additions & 2 deletions __global__/data/lobby/functions/compass/main.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ execute as @a[team=lobby,scores={tmp=2..}] run clear @s compass
execute as @a[team=lobby] store result score @s tmp run clear @s compass 0

# Cycle limits
scoreboard players set @a[team=lobby,scores={lobby.compass.select=4..}] lobby.compass.select 0
scoreboard players set @a[team=lobby,scores={lobby.compass.select=..-1}] lobby.compass.select 3
scoreboard players set @a[team=lobby,scores={lobby.compass.select=5..}] lobby.compass.select 0
scoreboard players set @a[team=lobby,scores={lobby.compass.select=..-1}] lobby.compass.select 4

# Give compass ----------------------------------------------------------------

Expand All @@ -34,3 +34,6 @@ item replace entity @a[team=lobby,scores={tmp=0,lobby.compass.select=2}] hotbar.

# Prophunt
item replace entity @a[team=lobby,scores={tmp=0,lobby.compass.select=3}] hotbar.8 with compass{display:{Name:'{"text":"PROPHUNT","color":"blue","bold":true,"italic":true}',Lore:['{"text":"This compass indicate the minigame location"}','{"text":"Drop item to select the next minigame"}','{"text":"Swap it from hands to select the previous one"}']},LodestoneDimension:"minecraft:overworld",LodestoneTracked:0b,LodestonePos:{X:112,Y:82,Z:66}}

# Dropper
item replace entity @a[team=lobby,scores={tmp=0,lobby.compass.select=4}] hotbar.8 with compass{display:{Name:'{"text":"DROPPER","color":"green","bold":true,"italic":true}',Lore:['{"text":"This compass indicate the minigame location"}','{"text":"Drop item to select the next minigame"}','{"text":"Swap it from hands to select the previous one"}']},LodestoneDimension:"minecraft:overworld",LodestoneTracked:0b,LodestonePos:{X:123,Y:99,Z:9}}
5 changes: 5 additions & 0 deletions minigames/data/dropper/functions/jump/trigger.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ scoreboard players set #dropper.didnt_jump_players data 0
execute as @a[team=dropper,tag=!dropper.jump_complete] run scoreboard players add #dropper.didnt_jump_players data 1
execute if score #dropper.timer_before_jump_reset data matches 1.. run scoreboard players add #dropper.timer_before_jump_reset data 1
execute if score #dropper.timer_before_jump_reset data matches 0 if score #dropper.didnt_jump_players data matches 0 if entity @a[team=dropper] run scoreboard players add #dropper.timer_before_jump_reset data 1

execute if score #dropper.timer_before_jump_reset data matches 1 run execute as @a[team=dropper] at @s run playsound block.stone_button.click_on master @s ~ ~ ~ 1 2 0
execute if score #dropper.timer_before_jump_reset data matches 1 run tellraw @a[team=dropper] [{"text":"\nDROPPER > ","color":"green","bold":true,"italic":true},{"text":" Round complete!\n","color":"gray","bold":false,"italic":false}]

execute if score #dropper.timer_before_jump_reset data matches 66 run scoreboard players add #dropper.round data 1
execute if score #dropper.timer_before_jump_reset data matches 66 run function dropper:obstacles/generate

execute if score #dropper.timer_before_jump_reset data matches 33 run function dropper:zone/refill
execute if score #dropper.timer_before_jump_reset data matches 100.. run function dropper:jump/reset
2 changes: 1 addition & 1 deletion minigames/data/dropper/functions/music/main.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ execute if score #dropper.music_timer data matches 1780 as @a[team=dropper] at @

# Third theme (1m 6s)
execute if score #dropper.music_timer data matches 3120 as @a[team=dropper] at @s run stopsound @s music
execute if score #dropper.music_timer data matches 3120 as @a[team=dropper] at @s run playsound dropper:theme-2 music @s ~ ~ ~ 0.5 1 0
execute if score #dropper.music_timer data matches 3120 as @a[team=dropper] at @s run playsound dropper:theme-3 music @s ~ ~ ~ 0.5 1 0


scoreboard players add #dropper.music_timer data 1
Expand Down
37 changes: 29 additions & 8 deletions minigames/data/dropper/functions/obstacles/generate.mcfunction
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@

function dropper:obstacles/remove_all

execute if score #dropper.timer_before_jump_reset data matches 66 run execute as @a[team=dropper] at @s run playsound block.stone_button.click_on master @s ~ ~ ~ 1 2 0


execute store result score #dropper.obstacle data run random value 0..4
execute if score #dropper.obstacle data > #dropper.round data run scoreboard players set #dropper.obstacle data 0
execute if score #dropper.round data matches 1 run scoreboard players set #dropper.obstacle data 0

execute if score #dropper.obstacle data matches 1 run place template dropper:obstacle_1 113 105 -15
execute if score #dropper.obstacle data matches 2 run place template dropper:obstacle_2 113 105 -15
execute if score #dropper.obstacle data matches 3 run place template dropper:obstacle_3 113 105 -15
execute if score #dropper.obstacle data matches 4 run place template dropper:obstacle_4 113 105 -15
execute if score #dropper.obstacle data matches 0 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 1: Nothing","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 1 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 1: Cross-shaped sail","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 2 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 1: Grid","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 3 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 1: Steering Wheel","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 4 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 1: Round-shaped sail","color":"yellow","bold":false,"italic":false}]

execute if score #dropper.obstacle data matches 1 run place template dropper:obstacle_1 113 165 -15
execute if score #dropper.obstacle data matches 2 run place template dropper:obstacle_2 113 165 -15
execute if score #dropper.obstacle data matches 3 run place template dropper:obstacle_3 113 165 -15
execute if score #dropper.obstacle data matches 4 run place template dropper:obstacle_4 113 165 -15

execute store result score #dropper.obstacle data run random value 0..4
execute if score #dropper.obstacle data > #dropper.round data run scoreboard players set #dropper.obstacle data 0
execute if score #dropper.round data matches 2 run scoreboard players set #dropper.obstacle data 0

execute if score #dropper.obstacle data matches 0 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 2: Nothing","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 1 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 2: Cross-shaped sail","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 2 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 2: Grid","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 3 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 2: Steering Wheel","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 4 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 2: Round-shaped sail","color":"yellow","bold":false,"italic":false}]

execute if score #dropper.obstacle data matches 1 run place template dropper:obstacle_1 113 135 -15
execute if score #dropper.obstacle data matches 2 run place template dropper:obstacle_2 113 135 -15
execute if score #dropper.obstacle data matches 3 run place template dropper:obstacle_3 113 135 -15
Expand All @@ -23,7 +38,13 @@ execute store result score #dropper.obstacle data run random value 0..4
execute if score #dropper.obstacle data > #dropper.round data run scoreboard players set #dropper.obstacle data 0
execute if score #dropper.round data matches 1 run scoreboard players set #dropper.obstacle data 0

execute if score #dropper.obstacle data matches 1 run place template dropper:obstacle_1 113 165 -15
execute if score #dropper.obstacle data matches 2 run place template dropper:obstacle_2 113 165 -15
execute if score #dropper.obstacle data matches 3 run place template dropper:obstacle_3 113 165 -15
execute if score #dropper.obstacle data matches 4 run place template dropper:obstacle_4 113 165 -15
execute if score #dropper.obstacle data matches 0 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 3: Nothing\n","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 1 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 3: Cross-shaped sail\n","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 2 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 3: Grid\n","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 3 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 3: Steering Wheel\n","color":"yellow","bold":false,"italic":false}]
execute if score #dropper.obstacle data matches 4 run tellraw @a[team=dropper] [{"text":"DROPPER > ","color":"green","bold":true,"italic":true},{"text":" Obstacle 3: Round-shaped sail\n","color":"yellow","bold":false,"italic":false}]

execute if score #dropper.obstacle data matches 1 run place template dropper:obstacle_1 113 105 -15
execute if score #dropper.obstacle data matches 2 run place template dropper:obstacle_2 113 105 -15
execute if score #dropper.obstacle data matches 3 run place template dropper:obstacle_3 113 105 -15
execute if score #dropper.obstacle data matches 4 run place template dropper:obstacle_4 113 105 -15

0 comments on commit b7d589b

Please sign in to comment.