10 lines
837 B
Mcfunction
10 lines
837 B
Mcfunction
# Desc: Checks the conditions for bow 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:bow"}, {Slot:5b, id:"minecraft:bow"}]} 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:bow"}, {Slot:5b, id:"minecraft:bow"}]} run function ench_merger:merge/merge_bow
|