
# -> Message
execute unless score @s OverlyRealistic.Player.HasQuitGame matches 1.. run \
    tellraw @s [{translate:"initialization.overlyrealistic.join_message_v3_12_1",fallback:"\n%2$s Successfully connected!\n\n%1$s You are not using the required resource pack! Please install it by %3$s \n",with:[{text:"x",color:"#b83030"},{text:"✔",color:"#29c94b"},{text:"[Clicking here]",bold:true,color:"gold",hover_event:{action:"show_text",value:{text:">Click here to open the resource pack download page!",color:"gold"}},click_event:{action:"open_url",url:"https://modrinth.com/resourcepack/overly-realistic-base-resources/versions"}}]}]

# -> Remove temp tag
tag @s remove OverlyRealistic.Player.TempPlayerHurt

# -> Knife stack size fix
execute if items entity @s container.* *[custom_data~{or_tool_type:"knife"}] run \
    function overly_realistic:players/custom_data/update/update_knifes
execute as @e[type=marker,tag=OverlyRealistic.Block.ContainerIsChest] at @s run \
    function overly_realistic:players/custom_data/update/update_knifes_container

# -> Tamed wolf fix
execute as @e[type=wolf] \
    if data entity @s Owner run \
        function overly_realistic:players/misc/used_bone_on_wolf/wolf_become_tamed

# -> Tamed feline fix
execute as @e[type=#overly_realistic:felines] \
    if data entity @s Owner run \
        function overly_realistic:players/misc/used_fish_on_feline/feline_become_tamed

# -> Reinforced iron armor fix
execute if items entity @s container.* *[custom_data~{reinforced_armor_type: "iron_boots"}] run \
    function overly_realistic:players/custom_data/update/update_r_iron_boots_inv
execute if items entity @s container.* *[custom_data~{reinforced_armor_type: "iron_leggings"}] run \
    function overly_realistic:players/custom_data/update/update_r_iron_legs_inv
execute as @e[type=armor_stand] if items entity @s armor.* *[custom_data~{IsReinforcedArmor: 1b}] run \
    function overly_realistic:players/custom_data/update/update_r_iron_armorstand
