Skip to content

Commit 2eb2599

Browse files
committed
added a test realm switch
1 parent 17a7837 commit 2eb2599

5 files changed

Lines changed: 42 additions & 17 deletions

File tree

data/trident/function/before_start_tick.mcfunction

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ execute if score start.counter server matches 0 run scoreboard players set start
169169

170170

171171

172-
styledplayerlist switchothers @a[scores={detailed_tablist=0}] default_spectator
173-
styledplayerlist switchothers @a[scores={detailed_tablist=1}] expanded_spectator
174-
styledplayerlist switchothers @a[scores={detailed_tablist=2}] mobcaps_spectator
172+
styledplayerlist switchothers @a[scores={detailed_tablist=0}] default_overworld
173+
styledplayerlist switchothers @a[scores={detailed_tablist=1}] expanded_overworld
174+
styledplayerlist switchothers @a[scores={detailed_tablist=2}] mobcaps_overworld
175175

176176
scoreboard players enable @a detailed_tablist
177177
scoreboard players set @a[scores={detailed_tablist=3..}] detailed_tablist 0
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
$team join $(team) @s[team=!$(team)]
2-
$execute if score @s detailed_tablist matches 0 run styledplayerlist switchothers @s default_$(dim)
3-
$execute if score @s detailed_tablist matches 1 run styledplayerlist switchothers @s expanded_$(dim)
4-
$execute if score @s detailed_tablist matches 2 run styledplayerlist switchothers @s mobcaps_$(dim)
1+
$team join $(team) @s[team=!$(team), gamemode=!spectator, gamemode=!creative]
2+
$team join $(team)_creative @s[team=!$(team)_creative, gamemode=creative]
3+
team join y_spectator @s[team=!y_spectator, gamemode=spectator]
4+
5+
$execute if score server-type server matches 0 if score @s detailed_tablist matches 0 run styledplayerlist switchothers @s default_$(dim)
6+
$execute if score server-type server matches 0 if score @s detailed_tablist matches 1 run styledplayerlist switchothers @s expanded_$(dim)
7+
$execute if score server-type server matches 0 if score @s detailed_tablist matches 2 run styledplayerlist switchothers @s mobcaps_$(dim)
8+
9+
$execute if score server-type server matches 1 if score @s detailed_tablist matches 0 run styledplayerlist switchothers @s test_realm_default_$(dim)
10+
$execute if score server-type server matches 1 if score @s detailed_tablist matches 1 run styledplayerlist switchothers @s test_realm_expanded_$(dim)
11+
$execute if score server-type server matches 1 if score @s detailed_tablist matches 2 run styledplayerlist switchothers @s test_realm_mobcaps_$(dim)
12+
13+
team leave @s[tag=!randomtp]
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
execute if score time server matches 12541..23457 run team modify b_overworld color dark_green
2+
execute if score time server matches 12541..23457 run team modify b_overworld_creative color dark_green
23
execute unless score time server matches 12541..23457 run team modify b_overworld color green
4+
execute unless score time server matches 12541..23457 run team modify b_overworld_creative color green
35
execute if entity @e[type=ender_dragon] run team modify a_end color light_purple
6+
execute if entity @e[type=ender_dragon] run team modify a_end_creative color light_purple
47
execute if entity @e[type=ender_dragon] run team modify a_end suffix {"text":" 🗡","color":"dark_purple"}
5-
execute if entity @a[team=a_end] unless entity @e[type=ender_dragon] run team modify a_end suffix {"text":"","color":"light_purple"}
8+
execute if entity @e[type=ender_dragon] run team modify a_end_creative suffix {"text":" 🗡","color":"dark_purple"}
9+
execute if entity @a[team=a_end] unless entity @e[type=ender_dragon] run team modify a_end suffix ""
10+
execute if entity @a[team=a_end] unless entity @e[type=ender_dragon] run team modify a_end_creative suffix ""
611
execute if entity @a[team=a_end] unless entity @e[type=ender_dragon] run team modify a_end color dark_purple
12+
execute if entity @a[team=a_end] unless entity @e[type=ender_dragon] run team modify a_end_creative color dark_purple
713

8-
9-
10-
11-
12-
execute as @a[nbt={Dimension:"minecraft:overworld"}] run function trident:dimension_nickname/macro {dim: overworld, team: b_overworld_day}
14+
execute as @a[nbt={Dimension:"minecraft:overworld"}] run function trident:dimension_nickname/macro {dim: overworld, team: b_overworld}
1315
execute as @a[nbt={Dimension:"minecraft:the_nether"}] run function trident:dimension_nickname/macro {dim: nether, team: c_nether}
1416
execute as @a[nbt={Dimension:"minecraft:the_end"}] run function trident:dimension_nickname/macro {dim: end, team: a_end}

data/trident/function/load.mcfunction

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
execute unless score server-type server matches -2147483648..2147483647 run scoreboard players set server-type server 0
2+
13
execute if score started server matches 1.. run function true_ending:load
24
execute if score started server matches 1.. run function ender_dragon:init
35
scoreboard players set crystalcount trueEnding_settings 0
@@ -122,20 +124,30 @@ scoreboard objectives add deathglow.itemcount dummy
122124

123125

124126
team add b_overworld {"text":"overworld","color":"dark_green"}
127+
team add b_overworld_creative {"text":"overworld","color":"dark_green"}
125128
team add c_nether {"text":"nether","color":"dark_red"}
129+
team add c_nether_creative {"text":"nether","color":"dark_red"}
126130
team add a_end {"text":"end","color":"light_purple"}
131+
team add a_end_creative {"text":"end","color":"light_purple"}
132+
133+
team modify b_overworld_creative prefix {"text": "", "color": "green"}
134+
team modify c_nether_creative prefix {"text": "", "color": "green"}
135+
team modify a_end_creative prefix {"text": "", "color": "green"}
127136

128137
team add y_spectator {"text":"spectator","color":"light_purple"}
129138
team add z_logging {"text":"logging in","color":"dark_aqua"}
130139

131140
team modify z_logging seeFriendlyInvisibles false
132141

133142
team modify b_overworld color green
143+
team modify b_overworld_creative color green
134144
team modify c_nether color red
145+
team modify c_nether_creative color red
135146
team modify a_end color dark_purple
147+
team modify a_end_creative color dark_purple
136148

137149
team modify y_spectator color dark_gray
138-
team modify z_logging color dark_gray
150+
#team modify z_logging color dark_gray
139151

140152
scoreboard objectives add end_crystal_amount dummy
141153

data/trident/function/tick.mcfunction

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
execute if score server-type server matches 1 unless score started server matches 10.. run scoreboard players set started server 10
2+
execute if score server-type server matches 1 run kill @e[type=ender_dragon]
3+
execute if score server-type server matches 1 run tag @a[tag=!randomtp.test_realm] add randomtp
4+
execute if score server-type server matches 1 run tag @a[tag=!randomtp.test_realm] add randomtp.test_realm
5+
16
execute unless score started server matches 1.. run return run function trident:before_start_tick
27
execute if score started server matches 1 run gamerule doDaylightCycle true
38
execute if score started server matches 1 run gamerule doWeatherCycle true
@@ -93,10 +98,7 @@ execute as @a[scores={totemofkeeping.death=1..}, tag= keepInventoryOnce, tag=!ke
9398

9499
function trident:death_items_glow/main
95100
function trident:death_things/main
96-
97-
98101
function trident:dimension_nickname/main
99-
100102
function trident:end_crystals/main
101103
function trident:end_falling_loop/main
102104
function trident:stonecutter_damage/main

0 commit comments

Comments
 (0)