Skip to content

Commit f448a5e

Browse files
authored
Adjust gold max damage + remove redundancy (#1167)
1 parent bd51bef commit f448a5e

File tree

6 files changed

+13
-51
lines changed

6 files changed

+13
-51
lines changed

gm4_audere_shamir/data/gm4_audere_shamir/function/active_tool.mcfunction

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
data modify storage gm4_audere_shamir:temp/player/tool SelectedItem set from entity @s SelectedItem
66
execute store result score $tool_current_damage gm4_ml_data run data get storage gm4_audere_shamir:temp/player/tool SelectedItem.components."minecraft:damage"
7-
execute store result score $tool_max_damage gm4_ml_data run data get storage gm4_audere_shamir:temp/player/tool SelectedItem.components."minecraft:custom_data".gm4_audere_shamir.max_durability
7+
execute store result score $tool_max_damage gm4_ml_data run data get storage gm4_audere_shamir:temp/player/tool SelectedItem.components."minecraft:custom_data".MaxDurability
8+
# | MaxDamage is set by gm4_moneo_shamir:store_maximum
89

910
# update newly upgraded netherite gear
1011
execute if score $tool_max_damage gm4_ml_data matches 1561 if predicate gm4_audere_shamir:holding_netherite run function gm4_audere_shamir:update_netherite
@@ -15,7 +16,8 @@ execute if score $tool_max_damage gm4_ml_data matches 131 run function gm4_auder
1516
execute if score $tool_max_damage gm4_ml_data matches 250 run function gm4_audere_shamir:tools/materials/iron
1617
execute if score $tool_max_damage gm4_ml_data matches 1561 run function gm4_audere_shamir:tools/materials/diamond
1718
execute if score $tool_max_damage gm4_ml_data matches 2031 run function gm4_audere_shamir:tools/materials/netherite
18-
execute if score $tool_max_damage gm4_ml_data matches 33 run function gm4_audere_shamir:tools/materials/gold
19+
# | gold used to be listed as 33 max damage, this is kept for compatibility with old items
20+
execute if score $tool_max_damage gm4_ml_data matches 32..33 run function gm4_audere_shamir:tools/materials/gold
1921
execute if score $tool_max_damage gm4_ml_data matches 237 run function gm4_audere_shamir:tools/shears
2022

2123
# reset storage and fake players

gm4_audere_shamir/data/gm4_audere_shamir/function/store_maximum.mcfunction

Lines changed: 0 additions & 37 deletions
This file was deleted.

gm4_audere_shamir/data/gm4_metallurgy/tags/function/apply_band.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

gm4_metallurgy/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# at @s
44
# run from gm4_arborenda:player/chop
55

6-
# get max damage for material type
6+
# get max damage - 1 for material type
77
execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $max_damage gm4_arb_data 2030
88
execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $max_damage gm4_arb_data 1560
9-
execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $max_damage gm4_arb_data 32
9+
execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $max_damage gm4_arb_data 31
1010
execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $max_damage gm4_arb_data 249
1111
execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $max_damage gm4_arb_data 130
1212
execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $max_damage gm4_arb_data 58

gm4_metallurgy/data/gm4_moneo_shamir/function/active_tool.mcfunction

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ execute if score $tool_max_damage gm4_ml_data matches 131 run function gm4_moneo
1616
execute if score $tool_max_damage gm4_ml_data matches 250 run function gm4_moneo_shamir:tools/materials/iron
1717
execute if score $tool_max_damage gm4_ml_data matches 1561 run function gm4_moneo_shamir:tools/materials/diamond
1818
execute if score $tool_max_damage gm4_ml_data matches 2031 run function gm4_moneo_shamir:tools/materials/netherite
19-
execute if score $tool_max_damage gm4_ml_data matches 33 run function gm4_moneo_shamir:tools/materials/gold
19+
# | gold used to be listed as 33 max damage, this is kept for compatibility with old items
20+
execute if score $tool_max_damage gm4_ml_data matches 32..33 run function gm4_moneo_shamir:tools/materials/gold
2021
execute if score $tool_max_damage gm4_ml_data matches 237 run function gm4_moneo_shamir:tools/shears

gm4_metallurgy/data/gm4_moneo_shamir/function/store_maximum.mcfunction

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# run from #gm4_metallurgy:apply_band
22
# @s = moneo tool item
33

4+
# used by Audere Shamir as well
45
execute if items entity @s contents minecraft:wooden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59
56
execute if items entity @s contents minecraft:wooden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59
67
execute if items entity @s contents minecraft:wooden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59
@@ -26,10 +27,10 @@ execute if items entity @s contents minecraft:netherite_pickaxe run data modify
2627
execute if items entity @s contents minecraft:netherite_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031
2728
execute if items entity @s contents minecraft:netherite_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031
2829

29-
execute if items entity @s contents minecraft:golden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 33
30-
execute if items entity @s contents minecraft:golden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 33
31-
execute if items entity @s contents minecraft:golden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 33
32-
execute if items entity @s contents minecraft:golden_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 33
30+
execute if items entity @s contents minecraft:golden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32
31+
execute if items entity @s contents minecraft:golden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32
32+
execute if items entity @s contents minecraft:golden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32
33+
execute if items entity @s contents minecraft:golden_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32
3334

3435
execute if items entity @s contents minecraft:shears run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 237
3536

0 commit comments

Comments
 (0)