data remove entity @s interaction
execute if entity @s[tag=quest3_shelf.open] run return fail
execute as @n[tag=aj.quest1_shelf.root] run function animated_java:quest1_shelf/animations/open/play
playsound block.barrel.open master @a
playsound block.chest.open master @a ~ ~ ~ 1 0.8
tag @s add quest3_shelf.open

execute if entity @s[tag=loot.key_fake] run function lbdm:quest3/shelf/loot/key {true_key:false}
execute if entity @s[tag=loot.key_true] run function lbdm:quest3/shelf/loot/key {true_key:true}

tag @s remove loot.key_fake
tag @s remove loot.key_true