This commit is contained in:
HeroChris 2023-09-15 19:52:54 +02:00
commit f8951522bb
17 changed files with 271 additions and 0 deletions

View File

@ -0,0 +1,42 @@
{
"criteria": {
"requirement": {
"trigger": "minecraft:entity_hurt_player",
"conditions": {
"player": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"head": {
"items": [
"minecraft:tnt"
]
}
}
}
}
}
],
"damage": {
"source_entity": {
"type": "minecraft:player",
"equipment": {
"head": {
"items": [
"minecraft:tnt"
]
}
}
}
}
}
}
},
"rewards": {
"function": "herohost:tnt/get_tnt"
}
}

View File

@ -0,0 +1,57 @@
{
"criteria": {
"requirement": {
"trigger": "minecraft:player_hurt_entity",
"conditions": {
"player": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"head": {
"items": [
"minecraft:tnt"
]
}
}
}
}
],
"entity": [
{
"condition": "minecraft:all_of",
"terms": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"head": {
"items": [
"minecraft:tnt"
]
}
}
}
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type": "minecraft:player"
}
}
]
}
]
}
}
},
"rewards": {
"function": "herohost:tnt/give_tnt"
}
}

View File

@ -0,0 +1,16 @@
{
"type": "herohost:world_type",
"generator": {
"type": "minecraft:flat",
"settings": {
"biome": "herohost:biome",
"lakes": false,
"features": false,
"layers": [{
"height": 1,
"block": "minecraft:air"
}],
"structure_overrides": []
}
}
}

View File

@ -0,0 +1,20 @@
{
"ultrawarm": false,
"natural": false,
"piglin_safe": false,
"respawn_anchor_works": true,
"bed_works": true,
"has_raids": false,
"has_skylight": true,
"has_ceiling": false,
"coordinate_scale": 1,
"ambient_light": 0.0,
"logical_height": 384,
"infiniburn": "#herohost:infiniburn_world",
"min_y": -64,
"height": 384,
"effects": "minecraft:overworld",
"sea_level": 0,
"monster_spawn_light_level": 0,
"monster_spawn_block_light_limit": 0
}

View File

@ -0,0 +1,10 @@
# --- 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
execute in herohost:world run tp @s 0 101 0 0 0
gamemode adventure @s[tag=!hc.debug]
# initialize player
tag @s add hc.initialized

View File

@ -0,0 +1,10 @@
# --- 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
execute in herohost:world run tp @s 0 101 0 0 0
gamemode adventure @s[tag=!hc.debug]
# reset player score
scoreboard players reset @s +hc.disconnect

View File

@ -0,0 +1,4 @@
# --- 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"}]

View File

@ -0,0 +1,8 @@
# --- 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
# 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

View File

@ -0,0 +1,7 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
# give and remove tnt
item replace entity @a[tag=hc.get_tnt] armor.head with tnt{HideFlags:1,Enchantments:[{id:"minecraft:binding_curse",lvl:1s}]} 1
item replace entity @a[tag=hc.give_tnt] armor.head with air 1
tag @a remove hc.get_tnt
tag @a remove hc.give_tnt

View File

@ -0,0 +1,4 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
advancement revoke @s only herohost:tnt/get_tnt
tag @s add hc.get_tnt

View File

@ -0,0 +1,4 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
advancement revoke @s only herohost:tnt/give_tnt
tag @s add hc.give_tnt

View File

@ -0,0 +1,5 @@
{
"values": [
"#minecraft:infiniburn_overworld"
]
}

View File

@ -0,0 +1,25 @@
{
"temperature": 0.8,
"downfall": 0,
"has_precipitation": true,
"category": "none",
"effects": {
"sky_color": 11652351,
"fog_color": 8432639,
"water_color": 1277345,
"water_fog_color": 1277345,
"foliage_color": 13065245,
"grass_color": 5072394,
"particle": {
"probability": 0.0005,
"options": {
"scale": 0.75,
"type": "minecraft:spore_blossom_air"
}
}
},
"spawners": {},
"spawn_costs": {},
"carvers": {},
"features": []
}

View File

@ -0,0 +1,43 @@
{
"config": {
"tries": 48,
"xz_spread": 6,
"y_spread": 1,
"feature": {
"feature": {
"config": {
"to_place": {
"entries": [
{
"data": {
"Name": "minecraft:grass"
},
"weight": 3
},
{
"data": {
"Name": "minecraft:fern"
},
"weight": 1
}
],
"type": "minecraft:weighted_state_provider"
}
},
"type": "minecraft:simple_block"
},
"placement": [
{
"predicate": {
"blocks": [
"minecraft:air"
],
"type": "minecraft:matching_blocks"
},
"type": "minecraft:block_predicate_filter"
}
]
}
},
"type": "minecraft:flower"
}

View File

@ -0,0 +1,5 @@
{
"values": [
"herohost:init"
]
}

View File

@ -0,0 +1,5 @@
{
"values": [
"herohost:main"
]
}

6
pack.mcmeta Normal file
View File

@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 15,
"description": "HeroHost - HeroChris 2023"
}
}