Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

data modify storage gm4_audere_shamir:temp/player/tool SelectedItem set from entity @s SelectedItem
execute store result score $tool_current_damage gm4_ml_data run data get storage gm4_audere_shamir:temp/player/tool SelectedItem.components."minecraft:damage"
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
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seemed like this was not a backwards compatible change, but I realize that moneo is always installed, and thus the MaxDurability tag should be present on all tools. (I think?)

The comment in moneo's store_maximum function could probably make it clear that it runs for all shamirs.

Related, I think right now infinitas' make_unstackable runs for every shamir, not only for infinitas, which maybe isn't a problem, but still weird.

# | MaxDamage is set by gm4_moneo_shamir:store_maximum

# update newly upgraded netherite gear
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
Expand All @@ -15,7 +16,8 @@ execute if score $tool_max_damage gm4_ml_data matches 131 run function gm4_auder
execute if score $tool_max_damage gm4_ml_data matches 250 run function gm4_audere_shamir:tools/materials/iron
execute if score $tool_max_damage gm4_ml_data matches 1561 run function gm4_audere_shamir:tools/materials/diamond
execute if score $tool_max_damage gm4_ml_data matches 2031 run function gm4_audere_shamir:tools/materials/netherite
execute if score $tool_max_damage gm4_ml_data matches 33 run function gm4_audere_shamir:tools/materials/gold
# | gold used to be listed as 33 max damage, this is kept for compatibility with old items
execute if score $tool_max_damage gm4_ml_data matches 32..33 run function gm4_audere_shamir:tools/materials/gold
execute if score $tool_max_damage gm4_ml_data matches 237 run function gm4_audere_shamir:tools/shears

# reset storage and fake players
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# at @s
# run from gm4_arborenda:player/chop

# get max damage for material type
# get max damage - 1 for material type
execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $max_damage gm4_arb_data 2030
execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $max_damage gm4_arb_data 1560
execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $max_damage gm4_arb_data 32
execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $max_damage gm4_arb_data 31
execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $max_damage gm4_arb_data 249
execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $max_damage gm4_arb_data 130
execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $max_damage gm4_arb_data 58
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ execute if score $tool_max_damage gm4_ml_data matches 131 run function gm4_moneo
execute if score $tool_max_damage gm4_ml_data matches 250 run function gm4_moneo_shamir:tools/materials/iron
execute if score $tool_max_damage gm4_ml_data matches 1561 run function gm4_moneo_shamir:tools/materials/diamond
execute if score $tool_max_damage gm4_ml_data matches 2031 run function gm4_moneo_shamir:tools/materials/netherite
execute if score $tool_max_damage gm4_ml_data matches 33 run function gm4_moneo_shamir:tools/materials/gold
# | gold used to be listed as 33 max damage, this is kept for compatibility with old items
execute if score $tool_max_damage gm4_ml_data matches 32..33 run function gm4_moneo_shamir:tools/materials/gold
execute if score $tool_max_damage gm4_ml_data matches 237 run function gm4_moneo_shamir:tools/shears
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# run from #gm4_metallurgy:apply_band
# @s = moneo tool item

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

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

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

Expand Down
Loading