From 723cbfc483bd5f1b76a1360ec9c99f33d99afb31 Mon Sep 17 00:00:00 2001 From: Mark Rapson Date: Sat, 17 May 2025 10:48:51 +0100 Subject: [PATCH] Data cleanup Update uninstall command Increased hammer durability --- data/lzstools/function/give/hammer.mcfunction | 2 +- data/lzstools/function/uninstall.mcfunction | 33 +++++++++++++++++-- .../function/break/break.mcfunction | 2 +- .../function/raycast/start.mcfunction | 1 + data/lzstools_hammer/recipe/hammer.json | 2 +- 5 files changed, 34 insertions(+), 6 deletions(-) diff --git a/data/lzstools/function/give/hammer.mcfunction b/data/lzstools/function/give/hammer.mcfunction index da15c77..7c36971 100644 --- a/data/lzstools/function/give/hammer.mcfunction +++ b/data/lzstools/function/give/hammer.mcfunction @@ -1 +1 @@ -give @s minecraft:iron_pickaxe[minecraft:item_name={"text":"Hammer","color":"light_purple"},minecraft:custom_model_data={strings:["lzstools:hammer"]},minecraft:custom_data={"lzstools":["hammer"]},minecraft:max_damage=1800] \ No newline at end of file +give @s minecraft:iron_pickaxe[minecraft:item_name={"text":"Hammer","color":"light_purple"},minecraft:custom_model_data={strings:["lzstools:hammer"]},minecraft:custom_data={"lzstools":["hammer"]},minecraft:max_damage=2400] \ No newline at end of file diff --git a/data/lzstools/function/uninstall.mcfunction b/data/lzstools/function/uninstall.mcfunction index ee5ea32..365024b 100644 --- a/data/lzstools/function/uninstall.mcfunction +++ b/data/lzstools/function/uninstall.mcfunction @@ -1,4 +1,31 @@ # Uninstall -scoreboard objectives remove lzt_click_check -scoreboard objectives remove lzt_wrench_success -scoreboard objectives remove lzt_wrench_raycast \ No newline at end of file + +# Click Check +scoreboard objectives remove lzt_click_check + +# Wrench +scoreboard objectives remove lzt_wrench_success +scoreboard objectives remove lzt_wrench_raycast + +# Trowel +scoreboard objectives remove lzt_trowel_success +scoreboard objectives remove lzt_trowel_raycast +scoreboard objectives remove lzt_trowel_raycast_hit +scoreboard objectives remove lzt_trowel_block_check +scoreboard objectives remove lzt_trowel_block_length +scoreboard objectives remove lzt_trowel_unbreaking_check +scoreboard objectives remove lzt_trowel_unbreaking_chance +scoreboard objectives remove lzt_trowel_damage +scoreboard objectives remove lzt_trowel_max_damage + +# Hammer +scoreboard objectives remove lzt_hammer_check +scoreboard objectives remove lzt_hammer_success +scoreboard objectives remove lzt_hammer_raycast +scoreboard objectives remove lzt_hammer_raycast_hit +scoreboard objectives remove lzt_hammer_side_raycast +scoreboard objectives remove lzt_hammer_side_raycast_hit +scoreboard objectives remove lzt_hammer_unbreaking_check +scoreboard objectives remove lzt_hammer_unbreaking_chance +scoreboard objectives remove lzt_hammer_damage +scoreboard objectives remove lzt_hammer_max_damage \ No newline at end of file diff --git a/data/lzstools_hammer/function/break/break.mcfunction b/data/lzstools_hammer/function/break/break.mcfunction index 03ce843..b6a2c1b 100644 --- a/data/lzstools_hammer/function/break/break.mcfunction +++ b/data/lzstools_hammer/function/break/break.mcfunction @@ -1,8 +1,8 @@ +# Don't run if execute if block ~ ~ ~ #lzstools:unbreakable run return fail execute if block ~ ~ ~ #minecraft:air run return fail execute if score @s lzt_hammer_damage >= @s lzt_hammer_max_damage run return fail - # Spawn item loot spawn ~ ~ ~ mine ~ ~ ~ mainhand diff --git a/data/lzstools_hammer/function/raycast/start.mcfunction b/data/lzstools_hammer/function/raycast/start.mcfunction index e8b03ce..c97712b 100644 --- a/data/lzstools_hammer/function/raycast/start.mcfunction +++ b/data/lzstools_hammer/function/raycast/start.mcfunction @@ -8,5 +8,6 @@ execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lz # Clean Data data remove storage lzstools:hammer damage +data remove storage lzstools:hammer components scoreboard players set @s lzt_hammer_damage 0 scoreboard players set @s lzt_hammer_max_damage 1 \ No newline at end of file diff --git a/data/lzstools_hammer/recipe/hammer.json b/data/lzstools_hammer/recipe/hammer.json index 45ef5ca..d57ccd3 100644 --- a/data/lzstools_hammer/recipe/hammer.json +++ b/data/lzstools_hammer/recipe/hammer.json @@ -15,7 +15,7 @@ "id": "minecraft:iron_pickaxe", "count": 1, "components": { - "minecraft:max_damage": 1800, + "minecraft:max_damage": 2400, "minecraft:item_name": { "text": "Hammer", "color": "light_purple",