Reset system rework
- modulair reset system - fall out of world reset - lobby enchantment additions for drowning damage negation - predicate world level 50 for herohost:world
This commit is contained in:
@ -5,12 +5,11 @@ tellraw @a[tag=hc.initialized] [{"text":"» ","color":"gray"},{"translate":"hhos
|
||||
execute at @s run playsound minecraft:block.amethyst_block.step ambient @s ~ ~ ~ 0.7 0.7
|
||||
|
||||
# reset player
|
||||
clear @s[tag=!hc.debug]
|
||||
execute in herohost:world run tp @s[tag=!hc.debug] 5 109 50 -90 0
|
||||
execute in herohost:world run spawnpoint @s 5 109 50 -90
|
||||
execute as @s[tag=!hc.debug] run function herohost:core/reset
|
||||
|
||||
# misc
|
||||
scoreboard players enable @s +hc.warp
|
||||
execute at @s run playsound minecraft:block.amethyst_block.step ambient @s ~ ~ ~ 0.7 0.7
|
||||
|
||||
# initialize player
|
||||
tag @s add hc.initialized
|
||||
tag @s add hc.initialized
|
@ -5,12 +5,11 @@ tellraw @s[tag=hc.debug] [{"text":"» ","color":"red"},{"translate":"hhost.minig
|
||||
execute at @s run playsound minecraft:block.amethyst_block.step ambient @s ~ ~ ~ 0.7 0.7
|
||||
|
||||
# reset player
|
||||
clear @s[tag=!hc.debug]
|
||||
execute in herohost:world run tp @s[tag=!hc.debug] 5 109 50 -90 0
|
||||
execute in herohost:world run spawnpoint @s 5 109 50 -90
|
||||
execute as @s[tag=!hc.debug] run function herohost:core/reset
|
||||
|
||||
# misc
|
||||
scoreboard players enable @s +hc.warp
|
||||
execute at @s run playsound minecraft:block.amethyst_block.step ambient @s ~ ~ ~ 0.7 0.7
|
||||
|
||||
# reset player score
|
||||
scoreboard players reset @s +hc.disconnect
|
||||
scoreboard players reset @s +hc.disconnect
|
18
data/herohost/function/core/reset.mcfunction
Normal file
18
data/herohost/function/core/reset.mcfunction
Normal file
@ -0,0 +1,18 @@
|
||||
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
|
||||
|
||||
# world below y50 tag
|
||||
execute if entity @s[predicate=herohost:world_y50] run tag @s add hc.world_y50
|
||||
|
||||
# default functionality
|
||||
clear @s[tag=!hc.world_y50]
|
||||
item replace entity @s armor.feet with minecraft:leather_boots[minecraft:enchantments={levels:{"herohost:lobby":1}}]
|
||||
execute in herohost:world run tp @s 5 109 50 -90 0
|
||||
execute in herohost:world run spawnpoint @s 5 109 50 -90
|
||||
|
||||
# stop execution of normal
|
||||
execute if entity @s[tag=!hc.world_y50] run return fail
|
||||
|
||||
# world below y50 execution
|
||||
execute at @s[tag=hc.world_y50] run playsound minecraft:entity.enderman.teleport ambient @s ~ ~ ~ 0.7 0.7
|
||||
title @s[tag=hc.world_y50] actionbar [{"translate":"hhost.minigame."}]
|
||||
tag @s[tag=hc.world_y50] remove hc.world_y50
|
Reference in New Issue
Block a user