Skip to content

Commit 73762e3

Browse files
L_glandieresL_glandieres
L_glandieres
authored and
L_glandieres
committed
Tutorial access button
1 parent 8078e16 commit 73762e3

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed

datapacks/Scaffolding Rush/data/scaffolding_rush/functions/lobby/interaction/__main__.mcfunction

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title @a[tag=lobby.tooltip] actionbar [""]
33
tag @a remove lobby.tooltip
44
execute as @a[x=0,y=25,z=6,distance=..3] at @s anchored eyes facing 0 25 6 positioned ~ ~0.1 ~ anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if entity @s[distance=..0.3] run function scaffolding_rush:lobby/interaction/tooltip/start_game
55
execute as @a[predicate=scaffolding_rush:looking_at/join_team] run function scaffolding_rush:lobby/interaction/tooltip/join_team
6+
execute as @a[predicate=scaffolding_rush:looking_at/join_tutorial] run function scaffolding_rush:tutorial/join
67

78
# Hover update background
89
tag @e[type=text_display,tag=looked_at] remove looked_at
@@ -11,6 +12,7 @@ execute as @a[predicate=scaffolding_rush:looking_at/previous_preset] run tag @e[
1112
execute as @a[predicate=scaffolding_rush:looking_at/team_plus] run tag @e[type=text_display,tag=LobbyTeamPlus,limit=1] add looked_at
1213
execute as @a[predicate=scaffolding_rush:looking_at/team_minus] run tag @e[type=text_display,tag=LobbyTeamMinus,limit=1] add looked_at
1314
execute as @a[predicate=scaffolding_rush:looking_at/team_random] run tag @e[type=text_display,tag=LobbyTeamRandom,limit=1] add looked_at
15+
execute as @a[predicate=scaffolding_rush:looking_at/join_tutorial] run tag @e[type=text_display,tag=LobbyTutoAccess,limit=1] add looked_at
1416

1517
execute as @e[type=text_display,tag=looked_at,tag=!lobby.refresh_interaction] run function scaffolding_rush:lobby/map/refresh/interaction
1618
execute as @e[type=text_display,tag=looked_at,tag=!lobby.refresh_interaction] run tag @s add lobby.refresh_interaction

datapacks/Scaffolding Rush/data/scaffolding_rush/functions/lobby/interaction/dispatch_on_interact.mcfunction

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ execute if entity @s[tag=LobbyPresetVillagerPrevious] on target at @s run functi
66
execute if entity @s[tag=LobbyTeamPlus] on target at @s run function scaffolding_rush:lobby/interaction/events/add_team
77
execute if entity @s[tag=LobbyTeamMinus] on target at @s run function scaffolding_rush:lobby/interaction/events/remove_team
88
execute if entity @s[tag=LobbyTeamRandom] on target at @s run function scaffolding_rush:team/randomize/randomize
9+
execute if entity @s[tag=LobbyTutoAccess] on target at @s run function scaffolding_rush:tutorial/join
910

1011
execute if entity @s[tag=teamBlue] on target at @s[team=!blue] run function scaffolding_rush:team/join/blue
1112
execute if entity @s[tag=teamGreen] on target at @s[team=!green] run function scaffolding_rush:team/join/green

datapacks/Scaffolding Rush/data/scaffolding_rush/functions/lobby/map/refresh/interaction.mcfunction

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ execute if score TeamNumber options matches 2 run data merge entity @e[type=text
1414

1515
data merge entity @e[type=text_display,tag=LobbyTeamRandom,limit=1,tag=!looked_at] {text: '{"translate":"blazing_scaffolding.random","color":"dark_purple","strikethrough":false}', background: 0}
1616
data merge entity @e[type=text_display,tag=LobbyTeamRandom,limit=1,tag=looked_at] {text: '{"translate":"blazing_scaffolding.random","color":"white","strikethrough":false}', background: -9426945}
17+
18+
# Tutorial access
19+
#data merge entity @e[type=text_display,tag=LobbyTutoAccess,limit=1,tag=!looked_at] {text: '{"color":"dark_purple","strikethrough":false}', background: 0}
20+
#data merge entity @e[type=text_display,tag=LobbyTutoAccess,limit=1,tag=looked_at] {text: '{"color":"white","strikethrough":false}', background: -9426945}
21+

datapacks/Scaffolding Rush/data/scaffolding_rush/functions/lobby/map/reset/finish.mcfunction

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@ scoreboard players set #lobby.clear data 0
66

77

88
bossbar remove reset_lobby
9-
10-
function scaffolding_rush:lobby/map/setup

datapacks/Scaffolding Rush/data/scaffolding_rush/functions/lobby/map/setup.mcfunction

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ summon minecraft:text_display -4 25.2 8 {text: '{"translate":"blazing_scaffoldin
5252
summon minecraft:text_display -5.0 27 -2.99 {text: '["",{"translate":"blazing_scaffolding.credits","underlined":true,"color":"gold","bold":true},{"text":"\\n"},{"text":"Leirof\\nLoumardes\\nTheaustudio\\nLaizo\\nascpial\\nTretinV3\\nKali\\nMrBurdy\\n","color":"#e5e5e5"},{"translate":"blazing_scaffolding.and_many_other","color":"gold"}]', Tags: ["lobbyText"], billboard: 'fixed', background: 0, brightness: {block: 10, sky: 10}}
5353
summon minecraft:text_display -5.0 26.4 -2.99 {text: '["",{"translate":"blazing_scaffolding.join_discord","color":"white"}]', Tags: ["lobbyText"], billboard: 'fixed', background: -10983950, brightness: {block: 10, sky: 10}}
5454
summon minecraft:text_display -5.0 26.1 -2.99 {text: '["",{"text":"gunivers.net","color":"gold"}]', Tags: ["lobbyText"], billboard: 'fixed', background: 0, brightness: {block: 10, sky: 10}}
55-
summon minecraft:interaction -5.0 25.5 -3.5 {height: 4f, width: 1.9f, Tags: ["lobbyInteraction", "LobbyCredits"]}
55+
summon minecraft:interaction -5.0 26 -3.5 {height: 4f, width: 1.9f, Tags: ["lobbyInteraction", "LobbyCredits"]}
56+
summon minecraft:text_display 7.9 25.1 -4.0 {text: '["",{"text":"Tutorial Area","color":"aqua"}]',transformation:[0f, 0f, -1f, 0f, 0f, 1f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 0f, 0f, 1f], Tags: ["lobbyText","LobbyTutoAccess"], billboard: 'fixed', background: 0, brightness: {block: 10, sky: 10}}
57+
summon minecraft:interaction 8.5 24.75 -4.0 {height: 1f, width: 1.9f, Tags: ["lobbyInteraction", "LobbyTutoAccess"]}
5658

5759
kill @e[type=marker,tag=lobbyLight]
5860
summon minecraft:marker 0 24 0 {Tags: ["lobbyLight"]}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"condition": "minecraft:entity_properties",
3+
"entity": "this",
4+
"predicate": {
5+
"type_specific": {
6+
"type": "player",
7+
"looking_at": {
8+
"type": "minecraft:interaction",
9+
"nbt": "{Tags:[\"LobbyTutoAccess\"]}",
10+
"distance": {
11+
"absolute": {
12+
"min": 0,
13+
"max": 3.6
14+
}
15+
}
16+
}
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)