diff --git a/data/herohost/advancement/herohost/root.json b/data/herohost/advancement/herohost/root.json new file mode 100644 index 0000000..5508ade --- /dev/null +++ b/data/herohost/advancement/herohost/root.json @@ -0,0 +1,25 @@ +{ + "display": { + "icon": { + "id": "minecraft:axolotl_bucket" + }, + "title": { + "translate": "hhost.minigame.advancement.herohost.root.title", + "fallback": "HeroHost servers." + }, + "description": { + "translate": "hhost.minigame.advancement.herohost.root.description", + "fallback": "Welcome to the HeroHost minigame server!" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": false, + "hidden": false, + "background": "minecraft:textures/block/white_concrete_powder.png" + }, + "criteria": { + "tick": { + "trigger": "minecraft:tick" + } + } +} \ No newline at end of file diff --git a/data/herohost/advancement/misc/lock.json b/data/herohost/advancement/misc/lock.json new file mode 100644 index 0000000..2a1f608 --- /dev/null +++ b/data/herohost/advancement/misc/lock.json @@ -0,0 +1,16 @@ +{ + "criteria": { + "requirement": { + "trigger": "minecraft:player_interacted_with_entity", + "conditions": { + "entity": { + "type": "minecraft:interaction", + "nbt": "{Tags:[\"locked\"]}" + } + } + } + }, + "rewards": { + "function": "herohost:misc/lock" + } +} \ No newline at end of file diff --git a/data/herohost/function/core/initialize.mcfunction b/data/herohost/function/core/initialize.mcfunction index 679555e..741ff8e 100644 --- a/data/herohost/function/core/initialize.mcfunction +++ b/data/herohost/function/core/initialize.mcfunction @@ -1,8 +1,8 @@ # --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). --- -tellraw @s [{"text":"» ","color":"gray"},{"text":"Welcome ","color":"white"},{"selector":"@s","color":"yellow"},{"text":", to the ","color":"white"},{"text":"H","color":"#fa6a52"},{"text":"e","color":"#fc7551"},{"text":"r","color":"#fd8051"},{"text":"o","color":"#fe8a52"},{"text":"H","color":"#ff9454"},{"text":"o","color":"#ff9e56"},{"text":"s","color":"#ffa85a"},{"text":"t","color":"#ffb15e"},{"text":" server!","color":"white"}] -tellraw @a[tag=hc.initialized] [{"text":"» ","color":"gray"},{"text":"Everyone, give ","color":"white"},{"selector":"@s","color":"yellow"},{"text":" a warm welcome!","color":"white"}] -execute at @s run playsound minecraft:entity.player.levelup master @s ~ ~ ~ 1 +tellraw @s [{"text":"» ","color":"gray"},{"fallback":"Welcome ","translate":"hhost.minigame.initialize.welcome_01","color":"white"},{"selector":"@s","color":"yellow"},{"fallback":" to the ","translate":"hhost.minigame.initialize.welcome_02","color":"white"},{"text":"H","color":"#fa6a52"},{"text":"e","color":"#fc7551"},{"text":"r","color":"#fd8051"},{"text":"o","color":"#fe8a52"},{"text":"H","color":"#ff9454"},{"text":"o","color":"#ff9e56"},{"text":"s","color":"#ffa85a"},{"text":"t","color":"#ffb15e"},{"fallback":" server!","translate":"hhost.minigame.initialize.welcome_03","color":"white"}] +tellraw @a[tag=hc.initialized] [{"text":"» ","color":"gray"},{"fallback":"Everyone, give ","translate":"hhost.minigame.initialize.wish_welcome_01","color":"white"},{"selector":"@s","color":"yellow"},{"fallback":" a warm welcome!","translate":"hhost.minigame.initialize.wish_welcome_02","color":"white"}] +execute at @s run playsound minecraft:entity.chicken.egg master @s ~ ~ ~ 0.6 0.7 # tp player diff --git a/data/herohost/function/core/reconnect.mcfunction b/data/herohost/function/core/reconnect.mcfunction index f3ef06c..15ab5f2 100644 --- a/data/herohost/function/core/reconnect.mcfunction +++ b/data/herohost/function/core/reconnect.mcfunction @@ -1,8 +1,8 @@ # --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). --- -tellraw @s [{"text":"» ","color":"gray"},{"text":"Welcome back ","color":"white"},{"selector":"@s","color":"yellow"},{"text":", to the ","color":"white"},{"text":"H","color":"#fa6a52"},{"text":"e","color":"#fc7551"},{"text":"r","color":"#fd8051"},{"text":"o","color":"#fe8a52"},{"text":"H","color":"#ff9454"},{"text":"o","color":"#ff9e56"},{"text":"s","color":"#ffa85a"},{"text":"t","color":"#ffb15e"},{"text":" server!","color":"white"}] -tellraw @s[tag=hc.debug] [{"text":"» ","color":"red"},{"text":"You are still in debug mode, click ","color":"white"},{"text":"here","color":"red","clickEvent":{"action":"run_command","value":"/tag @s remove hc.debug"},"hoverEvent": {"action": "show_text","value": {"text": "You need to be an operator to use this.","color": "#fc2003"}}},{"text":" to disable it.","color":"white"}] -execute at @s run playsound minecraft:entity.player.levelup master @s ~ ~ ~ 1 +tellraw @s [{"text":"» ","color":"gray"},{"fallback":"Welcome back ","translate":"hhost.minigame.reconnect.welcome_back_01","color":"white"},{"selector":"@s","color":"yellow"},{"fallback":" to the ","translate":"hhost.minigame.reconnect.welcome_back_02","color":"white"},{"text":"H","color":"#fa6a52"},{"text":"e","color":"#fc7551"},{"text":"r","color":"#fd8051"},{"text":"o","color":"#fe8a52"},{"text":"H","color":"#ff9454"},{"text":"o","color":"#ff9e56"},{"text":"s","color":"#ffa85a"},{"text":"t","color":"#ffb15e"},{"fallback":" server!","translate":"hhost.minigame.reconnect.welcome_back_03","color":"white"}] +tellraw @s[tag=hc.debug] [{"text":"» ","color":"red"},{"fallback":"You are still in debug mode, click ","translate":"hhost.minigame.reconnect.debug_01","color":"white"},{"fallback":"here","translate":"hhost.minigame.reconnect.debug_02","color":"red","clickEvent":{"action":"run_command","value":"/tag @s remove hc.debug"},"hoverEvent": {"action": "show_text","value": {"fallback":"You need to be an operator to use this.","translate":"hhost.minigame.reconnect.debug_hover","color": "#fc2003"}}},{"fallback":" to disable it.","translate":"hhost.minigame.reconnect.debug_03","color":"white"}] +execute at @s run playsound minecraft:entity.chicken.egg master @s ~ ~ ~ 0.6 0.7 # tp player diff --git a/data/herohost/function/init.mcfunction b/data/herohost/function/init.mcfunction index b26ac42..bc6dc0a 100644 --- a/data/herohost/function/init.mcfunction +++ b/data/herohost/function/init.mcfunction @@ -1,7 +1,7 @@ # --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). --- -tellraw @a [{"text":"» ","color":"green"},{"text": "Datapack resources loaded successfully.","color": "#ffffff"}] -tellraw @a[tag=hc.debug] [{"text":"» ","color":"gray"},{"text":"If any issue occurs, click ","color":"white"},{"text":"here","color":"red","clickEvent":{"action":"run_command","value":"/reload"},"hoverEvent": {"action": "show_text","value": {"text": "You need to be an operator to use this.","color": "#fc2003"}}},{"text":" to reload the server.","color":"white"}] +tellraw @a [{"text":"» ","color":"green"},{"fallback": "Datapack resources loaded successfully.","translate": "hhost.minigame.init.reload","color": "#ffffff"}] +tellraw @a[tag=hc.debug] [{"text":"» ","color":"gray"},{"fallback":"If any issues occur, click ","translate": "hhost.minigame.init.reload_issue_01","color":"white"},{"fallback":"here","translate": "hhost.minigame.init.reload_issue_02","color":"red","clickEvent":{"action":"run_command","value":"/reload"},"hoverEvent": {"action": "show_text","value": {"fallback": "You need to be an operator to use this.","translate": "hhost.minigame.init.reload_issue_hover","color": "#fc2003"}}},{"fallback":" to reload the server.","translate": "hhost.minigame.init.reload_issue_03","color":"white"}] # create scoreboard objectives scoreboard objectives add +hc.core dummy diff --git a/data/herohost/function/main.mcfunction b/data/herohost/function/main.mcfunction index ac0167c..3efe706 100644 --- a/data/herohost/function/main.mcfunction +++ b/data/herohost/function/main.mcfunction @@ -5,15 +5,11 @@ execute as @a[tag=!hc.initialized] run function herohost:core/initialize execute as @a[scores={+hc.disconnect=1..}] run function herohost:core/reconnect # protection -#kill @e[type=item,tag=!persistent] +kill @e[type=item,tag=!persistent] gamemode adventure @a[tag=!hc.debug] - -clear KingNugget minecraft:splash_potion - - # hc.debug # games -execute in herohost:world if entity @p[x=-125,y=50,z=-376,dx=250,dy=100,dz=250] run function herohost:tnt/core \ No newline at end of file +# execute in herohost:world if entity @p[x=-125,y=50,z=-376,dx=250,dy=100,dz=250] run function herohost:tnt/core \ No newline at end of file diff --git a/data/herohost/function/misc/lock.mcfunction b/data/herohost/function/misc/lock.mcfunction new file mode 100644 index 0000000..18e7992 --- /dev/null +++ b/data/herohost/function/misc/lock.mcfunction @@ -0,0 +1,5 @@ +# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). --- + +advancement revoke @s only herohost:misc/lock +title @s actionbar [{"fallback":"You can't do that! This is not yours to touch.","translate":"hhost.minigame.misc.locked"}] +playsound minecraft:block.nether_wood.break master @s ~ ~ ~ 1 1 1 \ No newline at end of file diff --git a/pack.mcmeta b/pack.mcmeta index 6c57eaa..276ce38 100644 --- a/pack.mcmeta +++ b/pack.mcmeta @@ -1,6 +1,14 @@ { "pack": { - "pack_format": 48, + "pack_format": 57, "description": "HeroHost - HeroChris 2024" + }, + "filter": { + "block": [ + { + "namespace": "minecraft", + "path": "advancement/.*" + } + ] } } \ No newline at end of file