From cfa17615932d46be28b6c9ebe6210a5701019549 Mon Sep 17 00:00:00 2001 From: HeroChris Date: Tue, 10 Dec 2024 22:57:54 +0100 Subject: [PATCH] Enchantment & spawnpoint --- data/herohost/enchantment/lobby.json | 51 +++++++++++++++++++ .../function/core/initialize.mcfunction | 1 + .../function/core/reconnect.mcfunction | 1 + 3 files changed, 53 insertions(+) create mode 100644 data/herohost/enchantment/lobby.json diff --git a/data/herohost/enchantment/lobby.json b/data/herohost/enchantment/lobby.json new file mode 100644 index 0000000..f8d3cfa --- /dev/null +++ b/data/herohost/enchantment/lobby.json @@ -0,0 +1,51 @@ +{ + "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": { + "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" + } + ] + } + } + } + ] + } +} \ No newline at end of file diff --git a/data/herohost/function/core/initialize.mcfunction b/data/herohost/function/core/initialize.mcfunction index 61df14e..dbc10dc 100644 --- a/data/herohost/function/core/initialize.mcfunction +++ b/data/herohost/function/core/initialize.mcfunction @@ -7,6 +7,7 @@ execute at @s run playsound minecraft:block.amethyst_block.step ambient @s ~ ~ ~ # 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 # misc scoreboard players enable @s +hc.warp diff --git a/data/herohost/function/core/reconnect.mcfunction b/data/herohost/function/core/reconnect.mcfunction index ef939d3..6183100 100644 --- a/data/herohost/function/core/reconnect.mcfunction +++ b/data/herohost/function/core/reconnect.mcfunction @@ -7,6 +7,7 @@ execute at @s run playsound minecraft:block.amethyst_block.step ambient @s ~ ~ ~ # 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 # misc scoreboard players enable @s +hc.warp