## Put into suspicious sand or gravel
scoreboard players set @s vb.dummy1 0
execute if block ~ ~ ~ minecraft:sand run scoreboard players set @s vb.dummy1 1
execute if block ~ ~ ~ minecraft:sand run setblock ~ ~ ~ suspicious_sand
execute if block ~ ~ ~ minecraft:gravel run scoreboard players set @s vb.dummy1 1
execute if block ~ ~ ~ minecraft:gravel run setblock ~ ~ ~ suspicious_gravel
execute if score @s vb.dummy1 matches 1 run data modify block ~ ~ ~ item set from entity @s Item
execute if score @s vb.dummy1 matches 1 run kill @s

## Put into spawner
execute if items entity @s container.0 *[custom_data~{vb.item.mob_soul:1b}] if block ~ ~ ~ spawner run function vb:tick_entity/modified_mob/item/mob_soul

## Summon mobs
# Live catch
execute if entity @s[nbt={Item:{components:{"minecraft:custom_data":{vb.item.live_catch.drowned_necromancer:1b}}}}] run function vb:summon/drowned_necromancer
execute if entity @s[nbt={Item:{components:{"minecraft:custom_data":{vb.item.live_catch:1b}}}}] run kill @s

## Fix gate keys gravity
execute if entity @s[nbt={Item:{components:{"minecraft:custom_data":{vb.item.gate_key:1b}}}}] if block ~ ~-1 ~ trial_spawner unless data entity @s Thrower run data merge entity @s {NoGravity:1b,Motion:[0,0,0]}
execute if entity @s[nbt={Item:{components:{"minecraft:custom_data":{vb.item.gate_key:1b}}}}] if block ~ ~-1 ~ trial_spawner unless data entity @s Thrower run tag @s add vb.artificial_gravity
