Compare commits

...

11 Commits

Author SHA1 Message Date
f9f10ea2df Chat type
New found feature, allowing me to change how chat is displayed by default. Other files might be added such as team-chat and msg's
2024-12-16 12:24:04 +01:00
49068b6989 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
2024-12-12 02:55:41 +01:00
cfa1761593 Enchantment & spawnpoint 2024-12-10 22:57:54 +01:00
7d15429d76 Audio reassigning
- changed record to ambient for certain sounds
2024-12-07 22:26:42 +01:00
1c477c4816 Warp functionality 2024-12-04 13:52:42 +01:00
0c3e0adbca WIP books 2024-12-03 19:13:11 +01:00
a0e5ab3306 Player stats
New version of player stats item
2024-12-02 13:20:00 +01:00
45462c4bb4 Advancements
- Baby steps advancement [ wip ]
- Hard listener advancement
2024-12-01 03:40:08 +01:00
c13825e29e New advancements + cleanup
- 2 New advancements for the locked interaction.
- Removed 2 default folder, crafting recipes and loot tables
2024-11-30 19:46:23 +01:00
95f39450e9 Translation rewrite 2024-11-29 03:26:36 +01:00
fb11a9e832 Translate & Advancement 2024-11-28 23:12:43 +01:00
17 changed files with 341 additions and 24 deletions

View File

@ -0,0 +1,37 @@
{
"parent": "herohost:herohost/root",
"display": {
"icon": {
"id": "minecraft:leather_boots"
},
"title": {
"translate": "hhost.minigame.advancement.herohost.baby_steps.title",
"fallback": "Baby steps"
},
"description": {
"translate": "hhost.minigame.advancement.herohost.baby_steps.description",
"fallback": "Take your first steps [not working yet]"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": false,
"hidden": false
},
"criteria": {
"baby_steps": {
"trigger": "minecraft:location",
"conditions": {
"player": {
"distance": {
"horizontal": {
"min": 100
}
}
}
}
}
},
"rewards": {
}
}

View File

@ -0,0 +1,34 @@
{
"parent": "herohost:herohost/root",
"display": {
"icon": {
"id": "minecraft:barrier"
},
"title": {
"translate": "hhost.minigame.advancement.herohost.hands_off.title",
"fallback": "Hands off"
},
"description": {
"translate": "hhost.minigame.advancement.herohost.hands_off.description",
"fallback": "Can't do that, it's not yours"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": false,
"hidden": true
},
"criteria": {
"hands_off": {
"trigger": "minecraft:player_interacted_with_entity",
"conditions": {
"entity": {
"type": "minecraft:interaction",
"nbt": "{Tags:[\"locked\"]}"
}
}
}
},
"rewards": {
}
}

View File

@ -0,0 +1,29 @@
{
"parent": "herohost:herohost/hands_off",
"display": {
"icon": {
"id": "minecraft:barrier"
},
"title": {
"translate": "hhost.minigame.advancement.herohost.hard_listener.title",
"fallback": "Hard listener"
},
"description": {
"translate": "hhost.minigame.advancement.herohost.hard_listener.description",
"fallback": "This could've been avoided"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": false,
"hidden": true
},
"criteria": {
"hard_listener": {
"trigger": "minecraft:impossible",
"conditions": {}
}
},
"rewards": {
}
}

View File

@ -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"
}
}
}

View File

@ -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"
}
}

View File

@ -0,0 +1,70 @@
{
"description": {
"translate": "hhost.minigame.enchantment.lobby.description",
"fallback": "Lobby enhanced"
},
"supported_items": "#minecraft:foot_armor",
"weight": 2,
"max_level": 1,
"min_cost": {
"base": 25,
"per_level_above_first": 25
},
"max_cost": {
"base": 75,
"per_level_above_first": 25
},
"anvil_cost": 4,
"slots": [
"feet"
],
"effects": {
"prevent_armor_change": {},
"attributes": [
{
"amount": -1,
"attribute": "minecraft:attack_damage",
"id": "herohost:enchantment.attack_damage",
"operation": "add_multiplied_total"
}
],
"minecraft:damage_immunity": [
{
"effect": {},
"requirements": {
"condition": "minecraft:damage_source_properties",
"predicate": {
"tags": [
{
"expected": true,
"id": "minecraft:is_fall"
},
{
"expected": false,
"id": "minecraft:bypasses_invulnerability"
}
]
}
}
},
{
"effect": {},
"requirements": {
"condition": "minecraft:damage_source_properties",
"predicate": {
"tags": [
{
"expected": true,
"id": "minecraft:is_drowning"
},
{
"expected": false,
"id": "minecraft:bypasses_invulnerability"
}
]
}
}
}
]
}
}

View File

@ -1,10 +1,15 @@
# --- 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"},{"translate":"hhost.minigame.welcome","fallback":"Welcome %s to the %s server!","with":[{"selector":"@s","color":"yellow"},{"text":"H","color":"#fa6a52","extra":[{"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"}]}],"color":"white"}]
tellraw @a[tag=hc.initialized] [{"text":"» ","color":"gray"},{"translate":"hhost.minigame.wish_welcome","fallback":"Everyone, give %s a warm welcome!","with":[{"selector":"@s","color":"yellow"}],"color":"white"}]
execute at @s run playsound minecraft:block.amethyst_block.step ambient @s ~ ~ ~ 0.7 0.7
# tp player
# reset player
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

View File

@ -1,10 +1,15 @@
# --- 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"},{"translate":"hhost.minigame.welcome_back","fallback":"Welcome back %s to the %s server!","with":[{"selector":"@s","color":"yellow"},{"text":"H","color":"#fa6a52","extra":[{"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"}]}],"color":"white"}]
tellraw @s[tag=hc.debug] [{"text":"» ","color":"red"},{"translate":"hhost.minigame.debug_warning","fallback":"You are still in debug mode, click %s to disable it.","with":[{"translate":"hhost.minigame.here","fallback":"here","color":"red","clickEvent":{"action":"run_command","value":"/tag @s remove hc.debug"},"hoverEvent":{"action":"show_text","contents":[{"translate":"hhost.minigame.operator_warning","fallback":"You need to be an operator to use this.","color":"red"}]}}],"color":"white"}]
execute at @s run playsound minecraft:block.amethyst_block.step ambient @s ~ ~ ~ 0.7 0.7
# tp player
# reset player
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

View 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

View File

@ -1,10 +1,15 @@
# --- 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"},{"translate": "hhost.minigame.reload","fallback": "Datapack resources loaded successfully.","color": "#ffffff"}]
tellraw @a[tag=hc.debug] [{"text":"» ","color":"gray"},{"translate":"hhost.minigame.reload_issue","fallback":"If any issues occur, click %s to reload the server.","with":[{"translate":"hhost.minigame.here","fallback":"here","color":"red","clickEvent":{"action":"run_command","value":"/reload"},"hoverEvent":{"action":"show_text","contents":[{"translate":"hhost.minigame.operator_warning","fallback":"You need to be an operator to use this.","color":"red"}]}}],"color":"white"}]
# create scoreboard objectives
scoreboard objectives add +hc.core dummy
scoreboard objectives add +hc.disconnect minecraft.custom:minecraft.leave_game
scoreboard objectives add +hc.core dummy
scoreboard objectives add +hc.disconnect minecraft.custom:minecraft.leave_game
scoreboard objectives add +hc.locked dummy
scoreboard objectives add +hc.warp trigger
# [ WIP ] scoreboard objectives add +hc.currency dummy
# [ WIP ] scoreboard objectives add +hc.currency.add dummy
# [ WIP ] scoreboard objectives add +hc.currency.remove dummy
# remove depricated scoreboard objectives

View File

@ -1,19 +1,19 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
# core handling
execute as @a[tag=!hc.initialized] run function herohost:core/initialize
execute as @a[scores={+hc.disconnect=1..}] run function herohost:core/reconnect
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]
gamemode adventure @a[tag=!hc.debug]
clear KingNugget minecraft:splash_potion
kill @e[type=item,tag=!persistent]
gamemode adventure @a[tag=!hc.debug]
# hc.debug
# misc
effect give @a[gamemode=!creative] saturation 1 1 true
execute as @a[scores={+hc.warp=1..}] run function herohost:misc/warp
execute as @a[tag=!hc.debug,predicate=herohost:world_y50] run function herohost:core/reset
# 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
# [ WIP ] execute in herohost:world if entity @p[x=-125,y=50,z=-376,dx=250,dy=100,dz=250] run function herohost:tnt/core

View File

@ -0,0 +1,9 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
advancement revoke @s only herohost:misc/lock
title @s actionbar [{"translate":"hhost.minigame.locked","fallback":"You can't do that! This is not yours to touch."}]
playsound minecraft:block.nether_wood.break master @s ~ ~ ~ 1 1 1
# advancement related
scoreboard players add @s +hc.locked 1
execute if score @s +hc.locked matches 10.. run advancement grant @s only herohost:herohost/hard_listener

View File

@ -0,0 +1,12 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
execute if score @s +hc.warp matches 1 in herohost:world run tp @s 5 109 50 -90 0
execute if score @s +hc.warp matches 2 in herohost:world run tp @s 50 125 -15 -118 0
# effects
execute at @s run playsound minecraft:block.amethyst_block.step record @s ~ ~ ~ 0.7 0.7
# [ WIP ] execute as @s at @s run particle minecraft:reverse_portal ~ ~1 ~ 0.5 0.5 0.5 0.1 20
# reset
scoreboard players set @s +hc.warp 0
scoreboard players enable @s +hc.warp

View File

@ -0,0 +1,3 @@
execute as @p run give @s minecraft:written_book[minecraft:item_model="minecraft:book",minecraft:custom_name='[{"translate":"hhost.minigame.book.warper.title","fallback":"Warp journal","color":"#ffb15e","italic":false}]',minecraft:lore=['[{"translate":"hhost.minigame.book.warper.lore","fallback":"Waypoint navigation","italic":false,"color":"white"}]','[""]','[{"translate":"hhost.minigame.by","fallback":"By: %s","with":[{"text":"H","color":"#fa6a52","extra":[{"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"}]}],"color":"white","italic":false}]'],minecraft:enchantment_glint_override=false,hide_additional_tooltip={},minecraft:written_book_content={title:"",author:"",pages:['[{"translate":"hhost.minigame.book.warper.intro","fallback":"Intro"},{"text":"\\n"},{"text":"\\n» ","color":"gray"},{"translate":"hhost.minigame.lobby","fallback":"Lobby","clickEvent":{"action":"run_command","value":"/trigger +hc.warp set 1"},"color":"#7EA270","underlined":true},{"text":"\\n» ","color":"gray"},{"translate":"hhost.minigame.payload","fallback":"Push the Payload","clickEvent":{"action":"run_command","value":"/trigger +hc.warp set 2"},"color":"#7970a2","underlined":true}]']}]
execute as @p run give @s minecraft:written_book[minecraft:item_model="minecraft:knowledge_book",minecraft:custom_name='[{"translate":"hhost.minigame.book.herohost.title","fallback":"%s servers","with":[{"text":"H","color":"#fa6a52","extra":[{"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"}]}],"color":"#ffb15e","italic":false}]',minecraft:lore=['[{"translate":"hhost.minigame.book.herohost.lore","fallback":"Server handbook","italic":false,"color":"white"}]','[""]','[{"translate":"hhost.minigame.by","fallback":"By: %s","with":[{"text":"H","color":"#fa6a52","extra":[{"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"}]}],"color":"white","italic":false}]'],minecraft:enchantment_glint_override=false,hide_additional_tooltip={},minecraft:written_book_content={title:"",author:"",pages:['{"translate":"hhost.minigame.book.warper.intro","fallback":"Test"}']}]
execute as @p run give @s minecraft:written_book[minecraft:item_model="minecraft:writable_book",minecraft:custom_name='[{"translate":"hhost.minigame.book.player_stats.title","fallback":"Player profile","color":"#ffb15e","italic":false}]',minecraft:lore=['[{"translate":"hhost.minigame.book.player_stats.lore","fallback":"Stats & Settings","italic":false,"color":"white"}]','[""]','[{"translate":"hhost.minigame.by","fallback":"By: %s","with":[{"text":"H","color":"#fa6a52","extra":[{"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"}]}],"color":"white","italic":false}]'],minecraft:enchantment_glint_override=false,hide_additional_tooltip={},minecraft:written_book_content={title:"",author:"",pages:['{"translate":"hhost.minigame.book.player_stats.intro","fallback":"Test"}']}]

View File

@ -0,0 +1,14 @@
{
"condition": "minecraft:entity_properties",
"predicate": {
"location": {
"position": {
"y": {
"max": 50
}
},
"dimension": "herohost:world"
}
},
"entity":"this"
}

View File

@ -0,0 +1,19 @@
{
"chat": {
"parameters": [
"sender",
"content"
],
"style": {
"color": "#b6b6b6"
},
"translation_key": "chat.type.text"
},
"narration": {
"parameters": [
"sender",
"content"
],
"translation_key": "chat.type.text.narrate"
}
}

View File

@ -1,6 +1,22 @@
{
"pack": {
"pack_format": 48,
"pack_format": 57,
"description": "HeroHost - HeroChris 2024"
},
"filter": {
"block": [
{
"namespace": "minecraft",
"path": "advancement/.*"
},
{
"namespace": "minecraft",
"path": "loot_table/.*"
},
{
"namespace": "minecraft",
"path": "recipe/.*"
}
]
}
}