Skip to content

Commit

Permalink
🐛 Update for the 1.20.5 version
Browse files Browse the repository at this point in the history
  • Loading branch information
aksiome committed Apr 26, 2024
1 parent 585f287 commit 48197ee
Show file tree
Hide file tree
Showing 178 changed files with 1,648 additions and 810 deletions.
2 changes: 1 addition & 1 deletion data/game/advancements/check_inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"playerId": {
"player_id": {
"min": 0
}
}
Expand Down
2 changes: 1 addition & 1 deletion data/game/advancements/killed_by_player.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@
"bit6"
]
]
}
}
2 changes: 1 addition & 1 deletion data/game/advancements/place_useable.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"condition": "minecraft:location_check",
"predicate": {
"block": {
"tag": "game:useable"
"blocks": "#game:useable"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion data/game/advancements/player_respawn.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"respawnTimer": {
"respawn_timer": {
"min": 0
}
}
Expand Down
24 changes: 16 additions & 8 deletions data/game/advancements/replace_sword.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"swordLevel": 0
"sword_level": 0
}
}
}
],
"items": [
{
"nbt": "{swordLevel:0}"
"predicates": {
"minecraft:custom_data": "{sword_level:0}"
}
}
]
}
Expand All @@ -32,14 +34,16 @@
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"swordLevel": 1
"sword_level": 1
}
}
}
],
"items": [
{
"nbt": "{swordLevel:1}"
"predicates": {
"minecraft:custom_data": "{sword_level:1}"
}
}
]
}
Expand All @@ -54,14 +58,16 @@
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"swordLevel": 2
"sword_level": 2
}
}
}
],
"items": [
{
"nbt": "{swordLevel:2}"
"predicates": {
"minecraft:custom_data": "{sword_level:2}"
}
}
]
}
Expand All @@ -76,14 +82,16 @@
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"swordLevel": 3
"sword_level": 3
}
}
}
],
"items": [
{
"nbt": "{swordLevel:3}"
"predicates": {
"minecraft:custom_data": "{sword_level:3}"
}
}
]
}
Expand Down
20 changes: 8 additions & 12 deletions data/game/functions/events/bottle_explode.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ particle minecraft:cloud ~ ~ ~ .7 .7 .7 .2 50 normal
particle minecraft:explosion_emitter ~ ~ ~ 0 0 0 0 1 normal
playsound minecraft:entity.generic.explode master @a ~ ~ ~ 1 0.8

effect give @a[distance=0..2] minecraft:absorption 1 0 true
effect give @a[distance=0..2] minecraft:instant_damage 1 1 true
effect give @a[distance=2..3] minecraft:absorption 1 1 true
effect give @a[distance=2..3] minecraft:instant_damage 1 1 true
effect give @a[distance=3..4] minecraft:absorption 1 0 true
effect give @a[distance=3..4] minecraft:instant_damage 1 0 true
execute as @a[distance=3..4] run damage @s 3
execute as @a[distance=2..3] run damage @s 7
execute as @a[distance=1..2] run damage @s 10
execute as @a[distance=0..1] run damage @s 12

fill ~3 ~3 ~3 ~-3 ~-3 ~-3 air replace #game:glass
fill ~2 ~2 ~2 ~-2 ~-2 ~-2 air replace oak_planks
fill ~1 ~1 ~1 ~-1 ~-1 ~-1 air replace end_stone
fill ~1 ~ ~ ~-1 ~ ~ air replace ancient_debris
fill ~ ~ ~1 ~ ~ ~-1 air replace ancient_debris
fill ~ ~1 ~ ~ ~-1 ~ air replace ancient_debris
fill ~4 ~4 ~4 ~-4 ~-4 ~-4 air replace #game:glass
fill ~3 ~3 ~3 ~-3 ~-3 ~-3 air replace oak_planks
fill ~2 ~2 ~2 ~-2 ~-2 ~-2 air replace end_stone
fill ~1 ~1 ~1 ~-1 ~-1 ~-1 air replace ancient_debris
14 changes: 7 additions & 7 deletions data/game/functions/events/check_teams.mcfunction
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
scoreboard players set #count var 0
execute if entity @a[team=red,scores={playerId=0..}] run scoreboard players add #count var 1
execute if entity @a[team=blue,scores={playerId=0..}] run scoreboard players add #count var 1
execute if entity @a[team=green,scores={playerId=0..}] run scoreboard players add #count var 1
execute if entity @a[team=yellow,scores={playerId=0..}] run scoreboard players add #count var 1
execute if entity @a[team=red,scores={player_id=0..}] run scoreboard players add #count var 1
execute if entity @a[team=blue,scores={player_id=0..}] run scoreboard players add #count var 1
execute if entity @a[team=green,scores={player_id=0..}] run scoreboard players add #count var 1
execute if entity @a[team=yellow,scores={player_id=0..}] run scoreboard players add #count var 1

execute if score #count var matches ..1 as @a[scores={playerId=0..}] unless score @s confirm matches 0.. run tellraw @s [{"storage":"game:lang","nbt":"stop.prompt.text","color":"red"},{"text":" [","color":"gold","extra":[{"storage":"game:lang","nbt":"stop.prompt.action"},{"text":"]"}],"hoverEvent":{"action":"show_text","contents":[{"storage":"game:lang","nbt":"stop.prompt.hover"}]},"clickEvent":{"action":"run_command","value":"/trigger confirm set 1"}}]
execute if score #count var matches ..1 as @a[scores={playerId=0..}] unless score @s confirm matches 0.. run scoreboard players set @a confirm 0
execute if score #count var matches ..1 run scoreboard players enable @a[scores={playerId=0..}] confirm
execute if score #count var matches ..1 as @a[scores={player_id=0..}] unless score @s confirm matches 0.. run tellraw @s [{"storage":"game:lang","nbt":"stop.prompt.text","color":"red"},{"text":" [","color":"gold","extra":[{"storage":"game:lang","nbt":"stop.prompt.action"},{"text":"]"}],"hoverEvent":{"action":"show_text","contents":[{"storage":"game:lang","nbt":"stop.prompt.hover"}]},"clickEvent":{"action":"run_command","value":"/trigger confirm set 1"}}]
execute if score #count var matches ..1 as @a[scores={player_id=0..}] unless score @s confirm matches 0.. run scoreboard players set @a confirm 0
execute if score #count var matches ..1 run scoreboard players enable @a[scores={player_id=0..}] confirm

execute if score $status var matches 2 run schedule function #game:events/check_teams 5s
28 changes: 14 additions & 14 deletions data/game/functions/events/end_game.mcfunction
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
title @a times 20 100 20

execute if entity @a[team=red,scores={playerId=1..},limit=1] run title @a title [{"storage":"game:lang","nbt":"win.red.title","color":"red"}]
execute if entity @a[team=blue,scores={playerId=1..},limit=1] run title @a title [{"storage":"game:lang","nbt":"win.blue.title","color":"dark_aqua"}]
execute if entity @a[team=green,scores={playerId=1..},limit=1] run title @a title [{"storage":"game:lang","nbt":"win.green.title","color":"green"}]
execute if entity @a[team=yellow,scores={playerId=1..},limit=1] run title @a title [{"storage":"game:lang","nbt":"win.yellow.title","color":"yellow"}]
execute if entity @a[team=red,scores={player_id=1..},limit=1] run title @a title [{"storage":"game:lang","nbt":"win.red.title","color":"red"}]
execute if entity @a[team=blue,scores={player_id=1..},limit=1] run title @a title [{"storage":"game:lang","nbt":"win.blue.title","color":"dark_aqua"}]
execute if entity @a[team=green,scores={player_id=1..},limit=1] run title @a title [{"storage":"game:lang","nbt":"win.green.title","color":"green"}]
execute if entity @a[team=yellow,scores={player_id=1..},limit=1] run title @a title [{"storage":"game:lang","nbt":"win.yellow.title","color":"yellow"}]

execute if entity @a[team=red,scores={playerId=1..},limit=1] run title @a subtitle [{"storage":"game:lang","nbt":"win.red.subtitle","color":"gray"}]
execute if entity @a[team=blue,scores={playerId=1..},limit=1] run title @a subtitle [{"storage":"game:lang","nbt":"win.blue.subtitle","color":"gray"}]
execute if entity @a[team=green,scores={playerId=1..},limit=1] run title @a subtitle [{"storage":"game:lang","nbt":"win.green.subtitle","color":"gray"}]
execute if entity @a[team=yellow,scores={playerId=1..},limit=1] run title @a subtitle [{"storage":"game:lang","nbt":"win.yellow.subtitle","color":"gray"}]
execute if entity @a[team=red,scores={player_id=1..},limit=1] run title @a subtitle [{"storage":"game:lang","nbt":"win.red.subtitle","color":"gray"}]
execute if entity @a[team=blue,scores={player_id=1..},limit=1] run title @a subtitle [{"storage":"game:lang","nbt":"win.blue.subtitle","color":"gray"}]
execute if entity @a[team=green,scores={player_id=1..},limit=1] run title @a subtitle [{"storage":"game:lang","nbt":"win.green.subtitle","color":"gray"}]
execute if entity @a[team=yellow,scores={player_id=1..},limit=1] run title @a subtitle [{"storage":"game:lang","nbt":"win.yellow.subtitle","color":"gray"}]

execute if entity @a[team=red,scores={playerId=1..},limit=1] run tellraw @a [{"text":"\n"},{"storage":"game:lang","nbt":"win.red.message","color":"red","bold":true}]
execute if entity @a[team=blue,scores={playerId=1..},limit=1] run tellraw @a [{"text":"\n"},{"storage":"game:lang","nbt":"win.blue.message","color":"dark_aqua","bold":true}]
execute if entity @a[team=green,scores={playerId=1..},limit=1] run tellraw @a [{"text":"\n"},{"storage":"game:lang","nbt":"win.green.message","color":"green","bold":true}]
execute if entity @a[team=yellow,scores={playerId=1..},limit=1] run tellraw @a [{"text":"\n"},{"storage":"game:lang","nbt":"win.yellow.message","color":"yellow","bold":true}]
execute if entity @a[team=red,scores={player_id=1..},limit=1] run tellraw @a [{"text":"\n"},{"storage":"game:lang","nbt":"win.red.message","color":"red","bold":true}]
execute if entity @a[team=blue,scores={player_id=1..},limit=1] run tellraw @a [{"text":"\n"},{"storage":"game:lang","nbt":"win.blue.message","color":"dark_aqua","bold":true}]
execute if entity @a[team=green,scores={player_id=1..},limit=1] run tellraw @a [{"text":"\n"},{"storage":"game:lang","nbt":"win.green.message","color":"green","bold":true}]
execute if entity @a[team=yellow,scores={player_id=1..},limit=1] run tellraw @a [{"text":"\n"},{"storage":"game:lang","nbt":"win.yellow.message","color":"yellow","bold":true}]

execute as @a[scores={killCount=0..}] run tellraw @s [{"text":"","color":"gray"},{"storage":"game:lang","nbt":"stats.kill[0]"},{"score":{"name":"@s","objective":"killCount"},"color":"gold"},{"storage":"game:lang","nbt":"stats.kill[1]"}]
execute as @a[scores={deathCount=0..}] run tellraw @s [{"text":"","color":"gray"},{"storage":"game:lang","nbt":"stats.death[0]"},{"score":{"name":"@s","objective":"deathCount"},"color":"gold"},{"storage":"game:lang","nbt":"stats.death[1]"},{"text":"\n"}]
execute as @a[scores={kill_count=0..}] run tellraw @s [{"text":"","color":"gray"},{"storage":"game:lang","nbt":"stats.kill[0]"},{"score":{"name":"@s","objective":"kill_count"},"color":"gold"},{"storage":"game:lang","nbt":"stats.kill[1]"}]
execute as @a[scores={death_count=0..}] run tellraw @s [{"text":"","color":"gray"},{"storage":"game:lang","nbt":"stats.death[0]"},{"score":{"name":"@s","objective":"death_count"},"color":"gold"},{"storage":"game:lang","nbt":"stats.death[1]"},{"text":"\n"}]

playsound minecraft:entity.wither.death master @s 5000 216 0 1000000

Expand Down
2 changes: 1 addition & 1 deletion data/game/functions/events/killed_by_player.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ execute if entity @s[advancements={game:killed_by_player={bit6=true}}] run score
advancement revoke @s only game:killed_by_player

tag @s add victim
execute as @a if score @s playerId = #source var run function #game:events/killed_player
execute as @a if score @s player_id = #source var run function #game:events/killed_player
tag @s remove victim
2 changes: 1 addition & 1 deletion data/game/functions/events/player_death.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ execute if entity @s[team=blue] unless entity @e[type=minecraft:shulker,team=blu
execute if entity @s[team=green] unless entity @e[type=minecraft:shulker,team=green] run function game:managers/players/eliminate
execute if entity @s[team=yellow] unless entity @e[type=minecraft:shulker,team=yellow] run function game:managers/players/eliminate

scoreboard players operation @s[team=!players] respawnTimer = $timer.respawn config
scoreboard players operation @s[team=!players] respawn_timer = $timer.respawn config
4 changes: 2 additions & 2 deletions data/game/functions/events/player_hurt.mcfunction
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
execute at @s run particle block redstone_block ~ ~.6 ~ .15 .3 .15 0 15 normal @a
execute if entity @s[nbt={Health:0f}] run function #game:events/player_death
execute at @s run particle block{block_state:{Name:"redstone_block"}} ~ ~.6 ~ .15 .3 .15 0 15 normal @a
execute if entity @s[nbt={Health:0.0f}] run function #game:events/player_death
4 changes: 2 additions & 2 deletions data/game/functions/events/player_joined.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
scoreboard players reset @s connect

scoreboard players enable @s rules
execute unless score @s playerId matches 0.. run function game:managers/players/connect
execute if score @s playerId matches 0.. run function game:managers/players/resume
execute unless score @s player_id matches 0.. run function game:managers/players/connect
execute if score @s player_id matches 0.. run function game:managers/players/resume
6 changes: 3 additions & 3 deletions data/game/functions/events/player_respawn.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scoreboard players operation #respawn var = @s respawnTimer
scoreboard players operation #respawn var = @s respawn_timer
scoreboard players operation #respawn var %= #20 const

execute if entity @s[team=red] run spectate @e[type=minecraft:area_effect_cloud,tag=spawnpoint,tag=red,limit=1]
Expand All @@ -7,6 +7,6 @@ execute if entity @s[team=green] run spectate @e[type=minecraft:area_effect_clou
execute if entity @s[team=yellow] run spectate @e[type=minecraft:area_effect_cloud,tag=spawnpoint,tag=yellow,limit=1]

execute if score #respawn var matches 0 run function game:resources/views/screen/respawning
execute if score @s respawnTimer matches 0 run function game:managers/players/respawn
execute if score @s respawn_timer matches 0 run function game:managers/players/respawn

scoreboard players remove @s[scores={respawnTimer=1..}] respawnTimer 1
scoreboard players remove @s[scores={respawn_timer=1..}] respawn_timer 1
Loading

0 comments on commit 48197ee

Please sign in to comment.