-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Jiogo18/1.16.5
Updated for 1.16.5
- Loading branch information
Showing
50 changed files
with
274 additions
and
161 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
Death Swap Multi/data/death_swap_multi/functions/health.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
scoreboard objectives add health health | ||
scoreboard objectives setdisplay list health | ||
scoreboard objectives setdisplay list health | ||
tellraw @a "Health are now displayed in the tab list" |
12 changes: 5 additions & 7 deletions
12
Death Swap Multi/data/death_swap_multi/functions/load.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
#est executé au chargement du monde (donc pas de reset) | ||
|
||
scoreboard objectives add death_swap_t trigger | ||
scoreboard objectives add death_swap_m dummy | ||
scoreboard objectives add death_swap_join trigger | ||
scoreboard objectives add death_swap_main dummy | ||
scoreboard objectives add death_swap_id dummy | ||
scoreboard objectives add random_timeout dummy | ||
scoreboard objectives add death_swap_death deathCount | ||
|
||
scoreboard objectives add const dummy | ||
scoreboard players set second const 20 | ||
scoreboard players set 1 const 1 | ||
scoreboard players set 20 death_swap_main 20 | ||
|
||
execute unless score setuped death_swap_m matches 1 run function death_swap_multi:setup | ||
execute unless score setuped death_swap_main matches 1 run function death_swap_multi:setup | ||
|
||
|
||
tellraw @a {"text":" [ Death Swap Multi - By Jiogo18 ] ","bold":true,"color":"yellow","clickEvent":{"action":"run_command","value":"/function death_swap_multi:reset"},"hoverEvent":{"action":"show_text","value":{"translate":"Click to reset the datapack"}}} | ||
|
||
function death_swap_multi:tellraw/start_game | ||
function death_swap_multi:tellraw/game/start_info |
5 changes: 5 additions & 0 deletions
5
Death Swap Multi/data/death_swap_multi/functions/mega/add_me.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
tag @s add death_swap_mega | ||
|
||
function death_swap_multi:party/join | ||
|
||
scoreboard players add mega_added death_swap_main 1 |
11 changes: 2 additions & 9 deletions
11
Death Swap Multi/data/death_swap_multi/functions/mega/process.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
#toute entitée dans la partie mais trop loins (256 blocks = 16 chunks) | ||
execute as @e[type=!player,tag=death_swap_mega] at @s unless entity @p[distance=..256] run function death_swap_multi:party/leave | ||
|
||
|
||
#toute entitée non joueur proche d'un joueur (128 blocks = 8 chunks) qui est pas dans la partie | ||
execute as @a at @s run tag @e[type=!player,tag=!death_swap_m,distance=..128] add death_swap_mega_n | ||
tag @e[tag=death_swap_mega_n] add death_swap_mega | ||
|
||
execute as @e[tag=death_swap_mega_n,type=!#death_swap_multi:mega_blacklist] run function death_swap_multi:party/join | ||
execute as @a at @s as @e[type=#death_swap_multi:mega_whitelist,tag=!death_swap_m,distance=..128] run function death_swap_multi:mega/add_me | ||
|
||
execute as @e[tag=death_swap_mega_n,tag=death_swap_m] run scoreboard players add mega_added death_swap_m 1 | ||
#après 50 ajouts (pour pas spam) ou plus car plusieurs ajoutés par tick | ||
execute if score mega_added death_swap_m matches 50.. run function death_swap_multi:tellraw/mega_joined | ||
|
||
tag @e[tag=death_swap_mega_n] remove death_swap_mega_n | ||
execute if score mega_added death_swap_main matches 50.. run function death_swap_multi:tellraw/mega_joined |
6 changes: 5 additions & 1 deletion
6
Death Swap Multi/data/death_swap_multi/functions/mega/start.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
scoreboard players set mega death_swap_m 1 | ||
scoreboard players set enabled death_swap_main 1 | ||
scoreboard players enable @a death_swap_join | ||
scoreboard players reset * death_swap_death | ||
|
||
scoreboard players set mega death_swap_main 1 | ||
|
||
tellraw @a [{"translate":"[Death Swap]: "},{"translate":"Mega Death Swap has started! (with all entities in the world)"}] |
5 changes: 2 additions & 3 deletions
5
Death Swap Multi/data/death_swap_multi/functions/mega/stop.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
scoreboard players reset mega death_swap_m | ||
scoreboard players reset mega_added death_swap_m | ||
scoreboard players reset mega death_swap_main | ||
scoreboard players reset mega_added death_swap_main | ||
|
||
#les entitées peuvent rester dans un chunk non chargé donc mieux vaut les retirer : | ||
execute as @e[type=!player,tag=death_swap_mega] run function death_swap_multi:party/leave | ||
tag @e[tag=death_swap_mega_n] remove death_swap_mega_n |
12 changes: 6 additions & 6 deletions
12
Death Swap Multi/data/death_swap_multi/functions/party/count_player.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
scoreboard players set players death_swap_m 0 | ||
execute as @a[tag=death_swap_m] run scoreboard players add players death_swap_m 1 | ||
scoreboard players set players death_swap_main 0 | ||
execute as @a[tag=death_swap_m] run scoreboard players add players death_swap_main 1 | ||
|
||
scoreboard players set players_extra death_swap_m 0 | ||
execute as @e[tag=death_swap_m,type=!player] run scoreboard players add players_extra death_swap_m 1 | ||
scoreboard players set mobs death_swap_main 0 | ||
execute as @e[tag=death_swap_m,type=!player] run scoreboard players add mobs death_swap_main 1 | ||
|
||
scoreboard players operation players_total death_swap_m = players death_swap_m | ||
scoreboard players operation players_total death_swap_m += players_extra death_swap_m | ||
scoreboard players operation entities death_swap_main = players death_swap_main | ||
scoreboard players operation entities death_swap_main += mobs death_swap_main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 2 additions & 6 deletions
8
Death Swap Multi/data/death_swap_multi/functions/party/join.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
#pas encore dans la partie && pas en tant que mega | ||
execute if entity @s[tag=!death_swap_m,tag=!death_swap_mega] run function death_swap_multi:tellraw/joined | ||
|
||
scoreboard players set @s[type=player] death_swap_t 1 | ||
scoreboard players enable @s[type=player] death_swap_t | ||
execute if entity @s[type=player] run function death_swap_multi:party/join/if_player | ||
|
||
execute unless entity @s[scores={death_swap_id=1..}] run scoreboard players add id death_swap_m 1 | ||
execute unless entity @s[scores={death_swap_id=1..}] run scoreboard players operation @s death_swap_id = id death_swap_m | ||
|
||
scoreboard players set @s[type=player] death_swap_death 0 | ||
execute unless entity @s[scores={death_swap_id=1..}] run function death_swap_multi:party/join/add_id | ||
|
||
tag @s add death_swap_m |
2 changes: 2 additions & 0 deletions
2
Death Swap Multi/data/death_swap_multi/functions/party/join/add_id.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
scoreboard players operation @s death_swap_id = next_id death_swap_main | ||
scoreboard players add next_id death_swap_main 1 |
4 changes: 4 additions & 0 deletions
4
Death Swap Multi/data/death_swap_multi/functions/party/join/if_player.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
scoreboard players set @s[type=player] death_swap_join 1 | ||
scoreboard players enable @s[type=player] death_swap_join | ||
|
||
scoreboard players set @s[type=player] death_swap_death 0 |
4 changes: 2 additions & 2 deletions
4
Death Swap Multi/data/death_swap_multi/functions/party/leave.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Death Swap Multi/data/death_swap_multi/functions/party/pause.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
scoreboard players set enabled death_swap_m 0 | ||
scoreboard players set enabled death_swap_main 0 | ||
|
||
function death_swap_multi:tellraw/paused |
8 changes: 3 additions & 5 deletions
8
Death Swap Multi/data/death_swap_multi/functions/party/resume.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
scoreboard players remove * death_swap_death | ||
scoreboard players set enabled death_swap_m 1 | ||
|
||
scoreboard players enable @a death_swap_t | ||
scoreboard players set enabled death_swap_main 1 | ||
scoreboard players enable @a death_swap_join | ||
scoreboard players reset * death_swap_death | ||
|
||
function death_swap_multi:tellraw/started | ||
function death_swap_multi:tellraw/game/start_info | ||
#proposer de rejoindre ou dire si il est dans la partie |
10 changes: 5 additions & 5 deletions
10
Death Swap Multi/data/death_swap_multi/functions/process.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
function death_swap_multi:tellraw/time_if_sec | ||
|
||
execute if score timeout death_swap_m matches 0 run function death_swap_multi:swap/swap | ||
execute if score timeout death_swap_m matches ..0 unless entity @e[tag=death_swap_ms] run function death_swap_multi:random/random | ||
execute if score timeout death_swap_main matches 0 run function death_swap_multi:swap/swap | ||
execute if score timeout death_swap_main matches ..0 unless entity @e[tag=death_swap_entity_to_tp] run function death_swap_multi:random/random | ||
|
||
execute if entity @e[tag=death_swap_ms] run function death_swap_multi:swap/swap_everybody | ||
execute unless entity @e[tag=death_swap_ms] run scoreboard players remove timeout death_swap_m 1 | ||
execute if entity @e[tag=death_swap_entity_to_tp] run function death_swap_multi:swap/swap_everybody | ||
execute unless entity @e[tag=death_swap_entity_to_tp] run scoreboard players remove timeout death_swap_main 1 | ||
|
||
#mort = perdu | ||
execute as @a[tag=death_swap_m,scores={death_swap_death=1..}] run function death_swap_multi:party/game_over | ||
|
||
execute if score mega death_swap_m matches 1.. run function death_swap_multi:mega/process | ||
execute if score mega death_swap_main matches 1.. run function death_swap_multi:mega/process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 2 additions & 14 deletions
16
Death Swap Multi/data/death_swap_multi/functions/reset.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,4 @@ | ||
#reset the datapack | ||
scoreboard players reset * death_swap_m | ||
scoreboard players set setuped death_swap_m 1 | ||
scoreboard players set timeout death_swap_m -1 | ||
|
||
scoreboard players reset * death_swap_t | ||
scoreboard players enable @a death_swap_t | ||
scoreboard players reset * death_swap_id | ||
scoreboard players set id death_swap_m 0 | ||
scoreboard players reset * death_swap_death | ||
tag @e[tag=death_swap_msa] remove death_swap_msa | ||
tag @e[tag=death_swap_ms] remove death_swap_ms | ||
tag @e[tag=death_swap_m] remove death_swap_m | ||
function death_swap_multi:setup | ||
|
||
tellraw @a [{"translate":"[Death Swap]: "},{"translate":"Datapack has been reseted"}] | ||
function death_swap_multi:tellraw/start_game | ||
function death_swap_multi:tellraw/game/start_info |
17 changes: 13 additions & 4 deletions
17
Death Swap Multi/data/death_swap_multi/functions/setup.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
#config (as time_min) are only reseted if enabled=0 (at the first loading and not at the reset) | ||
|
||
#from 10s to 300s (5 min) editable | ||
scoreboard players set time_min random_timeout 200 | ||
scoreboard players set time_max random_timeout 6000 | ||
|
||
scoreboard players set setuped death_swap_m 1 | ||
#reset the datapack | ||
scoreboard players reset * death_swap_main | ||
scoreboard players set setuped death_swap_main 1 | ||
scoreboard players set timeout death_swap_main -1 | ||
scoreboard players set 20 death_swap_main 20 | ||
|
||
function death_swap_multi:reset | ||
scoreboard players reset * death_swap_join | ||
scoreboard players enable @a death_swap_join | ||
scoreboard players reset * death_swap_id | ||
scoreboard players set next_id death_swap_main 0 | ||
scoreboard players reset * death_swap_death | ||
kill @e[type=area_effect_cloud,tag=death_swap_aec] | ||
tag @e[tag=death_swap_entity_to_tp] remove death_swap_entity_to_tp | ||
tag @e[tag=death_swap_m] remove death_swap_m |
1 change: 0 additions & 1 deletion
1
Death Swap Multi/data/death_swap_multi/functions/swap/choose_area.mcfunction
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
Death Swap Multi/data/death_swap_multi/functions/swap/create_area.mcfunction
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
Death Swap Multi/data/death_swap_multi/functions/swap/create_area/create.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#remove old _aec | ||
kill @e[type=area_effect_cloud,tag=death_swap_aec] | ||
|
||
# Area Effect Cloud (One per Entity) | ||
tag @e[tag=death_swap_aec] remove death_swap_aec | ||
|
||
#la duration est sur du random: normalement tout se passe en 1 tick mais il peut etre plus long | ||
#(il y a 98% de chance que ça se passe en 4 ticks max) | ||
#si c'est plus de 20 ticks alors les areas disparaissent et on abandonne le tp (relance le timer) | ||
execute as @e[tag=death_swap_entity_to_tp] at @s run function death_swap_multi:swap/create_area/for_me |
4 changes: 4 additions & 0 deletions
4
Death Swap Multi/data/death_swap_multi/functions/swap/create_area/for_me.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tag @e[tag=death_swap_aec_new] remove death_swap_aec_new | ||
summon area_effect_cloud ~ ~ ~ {Duration:20,Tags:["death_swap_aec","death_swap_aec_new"],CustomName:["Death Swap Area"]} | ||
scoreboard players operation @e[type=area_effect_cloud,tag=death_swap_aec_new,sort=nearest,distance=..1,limit=1] death_swap_id = @s death_swap_id | ||
tag @e[tag=death_swap_aec_new] remove death_swap_aec_new |
8 changes: 0 additions & 8 deletions
8
Death Swap Multi/data/death_swap_multi/functions/swap/reset.mcfunction
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
Death Swap Multi/data/death_swap_multi/functions/swap/reset/no_aec.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#si plus de _arc (le tp a mis trop de temps = la dernière entitée n'a pas été tp) | ||
#tellraw @a [{"translate":"[Death Swap]: ","color":"dark_red"},{"translate":"Tp has timeout"}] | ||
|
||
tag @e[tag=death_swap_entity_to_tp] remove death_swap_entity_to_tp | ||
kill @e[type=area_effect_cloud,tag=death_swap_aec] |
5 changes: 5 additions & 0 deletions
5
Death Swap Multi/data/death_swap_multi/functions/swap/reset/no_to_tp.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#si plus de _ms (ils sont mort/ramassés) | ||
tellraw @a [{"translate":"[Death Swap]: ","color":"dark_red"},{"translate":"Players disappeared during the tp"}] | ||
|
||
tag @e[tag=death_swap_entity_to_tp] remove death_swap_entity_to_tp | ||
kill @e[type=area_effect_cloud,tag=death_swap_aec] |
8 changes: 4 additions & 4 deletions
8
Death Swap Multi/data/death_swap_multi/functions/swap/swap.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#players who swap: | ||
tag @e[tag=death_swap_m] add death_swap_ms | ||
tag @e[tag=death_swap_m] add death_swap_entity_to_tp | ||
|
||
scoreboard players set debug_time_swap death_swap_m 0 | ||
scoreboard players set timeout death_swap_m -1 | ||
scoreboard players set debug_time_swap death_swap_main 0 | ||
scoreboard players set timeout death_swap_main -1 | ||
|
||
#area | ||
function death_swap_multi:swap/create_area | ||
function death_swap_multi:swap/create_area/create |
16 changes: 7 additions & 9 deletions
16
Death Swap Multi/data/death_swap_multi/functions/swap/swap_everybody.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#si encore des _ms (joueurs) mais plus de _ma / si encore des _ma (area) mais plus de _ms | ||
execute if entity @e[tag=death_swap_ms] unless entity @e[tag=death_swap_ma] run function death_swap_multi:swap/reset | ||
execute if entity @e[tag=death_swap_ma] unless entity @e[tag=death_swap_ms] run function death_swap_multi:swap/reset | ||
# si plus de _aec mais encore des _to_tp (le tp a mis trop de temps => la dernière entitée n'a pas été tp) | ||
execute if entity @e[tag=death_swap_entity_to_tp] unless entity @e[tag=death_swap_aec] run function death_swap_multi:swap/reset/no_aec | ||
# si plus de _to_tp mais encore des _arc (ils sont mort/déco) | ||
execute if entity @e[tag=death_swap_aec] unless entity @e[tag=death_swap_entity_to_tp] run function death_swap_multi:swap/reset/no_to_tp | ||
|
||
execute as @e[tag=death_swap_ms,sort=random] run function death_swap_multi:swap/tp_if | ||
execute as @e[tag=death_swap_entity_to_tp,sort=random] run function death_swap_multi:swap/tp_if | ||
|
||
#si il y a pas "2 _ms ou plus" alors il en reste 1 ou 0 => on tp le dernier joueur | ||
execute unless entity @e[tag=death_swap_ms,limit=2] run function jio18_death_swap:swap/tp2mas | ||
|
||
#debug: the Duration of areas (in swap/create_area) must be greater than debug_time_swap | ||
scoreboard players add debug_time_swap death_swap_m 1 | ||
#debug: the Duration of areas (in swap/create_area/create) must be greater than debug_time_swap | ||
scoreboard players add debug_time_swap death_swap_main 1 |
7 changes: 0 additions & 7 deletions
7
Death Swap Multi/data/death_swap_multi/functions/swap/tp2mas.mcfunction
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
Death Swap Multi/data/death_swap_multi/functions/swap/tp2target.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#tp death_swap_entity_to_tp (this, the entity) to death_swap_target (area_effect_cloud) | ||
|
||
execute at @e[tag=death_swap_target,limit=1] run tp @s ~ ~ ~ | ||
kill @e[tag=death_swap_target,limit=1,type=area_effect_cloud] | ||
tag @s remove death_swap_entity_to_tp | ||
execute at @s as @a[distance=..20] run playsound minecraft:entity.enderman.teleport player @s ~ ~ ~ 0.25 |
11 changes: 7 additions & 4 deletions
11
Death Swap Multi/data/death_swap_multi/functions/swap/tp_if.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#this == _msa (a player) | ||
function death_swap_multi:swap/choose_area | ||
# this == _entity (a player) | ||
|
||
#si id != | ||
execute unless score @e[tag=death_swap_mas,limit=1] death_swap_id = @s death_swap_id run function death_swap_multi:swap/tp2mas | ||
# Select an aec => the target | ||
tag @e[tag=death_swap_target] remove death_swap_target | ||
tag @e[tag=death_swap_aec,sort=random,limit=1] add death_swap_target | ||
|
||
# if id target != id source | ||
execute unless score @e[tag=death_swap_target,limit=1] death_swap_id = @s death_swap_id run function death_swap_multi:swap/tp2target |
2 changes: 2 additions & 0 deletions
2
Death Swap Multi/data/death_swap_multi/functions/tellraw/game/start_game.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tellraw @a [{"translate":"[Death Swap]: "},{"translate":"Start the game","color":"yellow","clickEvent":{"action":"run_command","value":"/function death_swap_multi:party/resume"},"hoverEvent":{"action":"show_text","value":{"translate":"Click to start the game"}},"italic":true}] | ||
tellraw @a [{"translate":"[Death Swap]: "},{"translate":"Start Mega Death Swap","color":"yellow","clickEvent":{"action":"run_command","value":"/function death_swap_multi:mega/start"},"hoverEvent":{"action":"show_text","value":{"translate":"Click to start the mega death swap"}},"italic":true}] |
2 changes: 2 additions & 0 deletions
2
Death Swap Multi/data/death_swap_multi/functions/tellraw/game/start_info.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
execute unless score enabled death_swap_main matches 1 run function death_swap_multi:tellraw/game/start_game | ||
execute if score enabled death_swap_main matches 1 run function death_swap_multi:tellraw/game/started |
6 changes: 3 additions & 3 deletions
6
...ulti/functions/tellraw/started.mcfunction → ...functions/tellraw/game/started.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
tellraw @a[tag=death_swap_m] [{"translate":"[Death Swap]: "},{"translate":"The game has started"},". ",{"translate":"You are in the game"}] | ||
tellraw @a[tag=!death_swap_m] [{"translate":"[Death Swap]: "},{"translate":"The game has started"},". ",{"translate":"Join the game","clickEvent":{"action":"run_command","value":"/trigger death_swap_t set 1"},"hoverEvent":{"action":"show_text","value":{"translate":"Click to join the game"}},"italic":true}] | ||
function death_swap_multi:tellraw/remaining_players | ||
tellraw @a[tag=death_swap_m] [{"translate":"[Death Swap]: "},{"translate":"The game has started"},". ",{"translate":"You are in the game"}] | ||
tellraw @a[tag=!death_swap_m] [{"translate":"[Death Swap]: "},{"translate":"The game has started"},". ",{"translate":"Join the game","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger death_swap_join set 1"},"hoverEvent":{"action":"show_text","value":{"translate":"Click to join the game"}},"italic":true}] | ||
function death_swap_multi:tellraw/remaining_players | ||
function death_swap_multi:tellraw/time |
Oops, something went wrong.