
# -> Tag wrought iron
tag @s add OverlyRealistic.Block.HeatedWroughtIron_InteractedWith

# -> Reset completion value
scoreboard players set #or.heated_wrought_iron_completion_status OverlyRealistic.General.ArbitraryData 0

# -> Operate on player
execute on target \
    if items entity @s weapon.mainhand *[custom_data~{IsForgingHammer:1b}] run \
        function overly_realistic:general/custom_blocks/heated_wrought_iron/player_interact_with_heated_wrought_iron

# -> Untag wrought iron
tag @s remove OverlyRealistic.Block.HeatedWroughtIron_InteractedWith

# -> If completion value = 0 then return
execute if score #or.heated_wrought_iron_completion_status OverlyRealistic.General.ArbitraryData matches 0 run \
    return fail

# -> Method 1 (Complete)
execute if score #or.heated_wrought_iron_completion_status OverlyRealistic.General.ArbitraryData matches 1 run \
    return run \
        function overly_realistic:general/custom_blocks/heated_wrought_iron/method_operations/method_complete with entity @s data.wrought_iron_shape

# -> Method 2 (Reset)
execute if score #or.heated_wrought_iron_completion_status OverlyRealistic.General.ArbitraryData matches 2 run \
    return run \
        function overly_realistic:general/custom_blocks/heated_wrought_iron/method_operations/method_reset

# -> Method 3 (Vertical)
execute if score #or.heated_wrought_iron_completion_status OverlyRealistic.General.ArbitraryData matches 3 run \
    return run \
        function overly_realistic:general/custom_blocks/heated_wrought_iron/method_operations/method_vertical

# -> Method 4 (Horizontal)
execute if score #or.heated_wrought_iron_completion_status OverlyRealistic.General.ArbitraryData matches 4 run \
    return run \
        function overly_realistic:general/custom_blocks/heated_wrought_iron/method_operations/method_horizontal

# -> Method 5 (Downwards)
execute if score #or.heated_wrought_iron_completion_status OverlyRealistic.General.ArbitraryData matches 5 run \
    return run \
        function overly_realistic:general/custom_blocks/heated_wrought_iron/method_operations/method_downwards
