
# -> Set display
execute on passengers run \
    loot replace entity @s[type=item_display] contents loot overly_realistic:items/tool_handles/wooden_handle
execute on passengers \
    if entity @s[type=item_display] \
    at @s \
    facing entity @p[tag=OverlyRealistic.Player.PlacedCustomBlock,distance=..64] feet run \
        rotate @s ~ 0

# -> Store display rotation
execute on passengers \
    if entity @s[type=item_display] run \
        data modify storage overly_realistic:items tool_handle_rotation set from entity @s Rotation[0]
data modify entity @s data.display_rotation set from storage overly_realistic:items tool_handle_rotation

# -> Sound
playsound block.wood.place block @a ~ ~ ~ 0.8 1

# -> Set progress
scoreboard players set @s OverlyRealistic.General.ArbitraryData 0

# -> Set type value
scoreboard players set @s OverlyRealistic.World.ToolHandle_ToolProperty_HandleType 3

# -> Set max_durability modifier
scoreboard players set @s OverlyRealistic.World.ToolHandleModifier_MaxDurability 10
#execute store result score @s OverlyRealistic.World.ToolHandleModifier_MaxDurability \
    on passengers run \
        data get entity @s item.components."minecraft:entity_data".data.handle_modifier_max_damage
