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