# Desc: Checks the conditions for elytra merging and runs the merge if possible # Called by: ench_merger:merge/check_all # Datapack made by FieryHammer execute at @e[tag=fh_merger] run execute store result score @p[distance=..5] fh_em_level run experience query @p[distance=..5] levels execute at @e[tag=fh_merger] if score @p[distance=..5] fh_em_level matches 15.. if block ~ ~1 ~ minecraft:dropper[facing=up, triggered=false]{Items:[{Slot:3b, id:"minecraft:elytra"}, {Slot:5b, id:"minecraft:elytra"}]} run tag @e[tag=fh_merger, limit=1, sort=nearest] add fh_merger_active execute at @e[tag=fh_merger_active] if score @p[distance=..5] fh_em_level matches 15.. if block ~ ~1 ~ minecraft:dropper[facing=up, triggered=false]{Items:[{Slot:3b, id:"minecraft:elytra"}, {Slot:5b, id:"minecraft:elytra"}]} run function ench_merger:merge/merge_elytra