Skip to content
Open
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
@@ -1,9 +1,11 @@
# @s = player with an active shamir in their hands
# at @s
# run from player

execute if predicate gm4_metallurgy:arborenda_active run function gm4_arborenda_shamir:active
execute if predicate gm4_metallurgy:hypexperia_active run function gm4_hypexperia_shamir:active
execute if predicate gm4_metallurgy:moneo_active run function gm4_moneo_shamir:active_tool
execute if predicate gm4_metallurgy:moneo_active_offhand run function gm4_moneo_shamir:active_tool_offhand
execute if entity @s[scores={gm4_note_collect=1..},predicate=gm4_metallurgy:musical_active] run function gm4_musical_shamir:active
execute if predicate gm4_metallurgy:sensus_active run function gm4_sensus_shamir:active
execute if predicate gm4_metallurgy:infinitas_active run function gm4_infinitas_shamir:active
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:custom_data": "{gm4_metallurgy:{has_shamir:1b,active_shamir:'moneo'}}"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# @s = players holding a moneo tool
# at @s
# run from shamir_in_hand

scoreboard players set $tool_current_damage gm4_ml_data 0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# @s = players holding a moneo tool
# at @s
# run from shamir_in_hand

scoreboard players set $tool_current_damage gm4_ml_data 0
scoreboard players set $tool_max_damage gm4_ml_data 0

execute store result score $tool_current_damage gm4_ml_data run data get entity @s equipment.offhand.components."minecraft:damage"
execute store result score $tool_max_damage gm4_ml_data run data get entity @s equipment.offhand.components."minecraft:custom_data".MaxDurability

# update newly upgraded netherite gear
execute if score $tool_max_damage gm4_ml_data matches 1561 if predicate gm4_moneo_shamir:holding_netherite_offhand run function gm4_moneo_shamir:update_netherite_offhand

# activate moneo
execute if score $tool_max_damage gm4_ml_data matches 59 run function gm4_moneo_shamir:tools/materials/wood
execute if score $tool_max_damage gm4_ml_data matches 131 run function gm4_moneo_shamir:tools/materials/stone
execute if score $tool_max_damage gm4_ml_data matches 190 run function gm4_moneo_shamir:tools/materials/copper
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
# | 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,5 +1,6 @@
# run from active_tool
# @s = player holding the moneo tool
# at @s
# run from active_tool and active_tool_offhand

scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# run from active_tool
# @s = player holding the moneo tool
# at @s
# run from active_tool and active_tool_offhand

scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# run from active_tool
# @s = player holding the moneo tool
# at @s
# run from active_tool and active_tool_offhand

scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# run from active_tool
# @s = player holding the moneo tool
# at @s
# run from active_tool and active_tool_offhand

scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# run from active_tool
# @s = player holding the moneo tool
# at @s
# run from active_tool and active_tool_offhand

scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# run from active_tool
# @s = player holding the moneo tool
# at @s
# run from active_tool and active_tool_offhand

scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# run from active_tool
# @s = player holding the moneo tool
# at @s
# run from active_tool and active_tool_offhand

scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# run from active_tool
# @s = player holding the moneo tool
# at @s
# run from active_tool and active_tool_offhand

scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# @s = player holding a netherite moneo tool that has the wrong MaxDurability
# at @s
# run from active_tool

# item modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @s = player holding a netherite moneo tool that has the wrong MaxDurability
# at @s
# run from active_tool_offhand

# item modifier
item modify entity @s weapon.offhand gm4_moneo_shamir:netherite_update

# correctly set the max damage
scoreboard players set $tool_max_damage gm4_ml_data 2031
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"items": "#gm4_moneo_shamir:netherite_tools"
}
}
}
}
Loading