## Lock items in place
tp @e[type=item,distance=..1] ~ ~-0.5 ~
## Press coins
execute if block ~ ~ ~ minecraft:piston_head[facing=down] if score @s vb.entity.coin_press_state matches 0 as @n[type=item,nbt={Item:{id:"minecraft:gold_ingot"}}] at @s run function vb:tick_entity/custom_block/coin_press/press_this_item
execute if block ~ ~ ~ minecraft:piston_head[facing=down] run scoreboard players set @s vb.entity.coin_press_state 1
execute unless block ~ ~ ~ minecraft:piston_head[facing=down] run scoreboard players set @s vb.entity.coin_press_state 0