diff --git a/datapacks/enchantment merger/data/ench_merger/functions/init.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/init.mcfunction new file mode 100644 index 0000000..28a31a9 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/init.mcfunction @@ -0,0 +1,5 @@ +# Desc: Creates the required scoreboard(s) +# Called by: #fh_main/init +# Datapack made by FieryHammer + +scoreboard objectives add fh_em_level dummy diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_all.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_all.mcfunction new file mode 100644 index 0000000..768f669 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_all.mcfunction @@ -0,0 +1,22 @@ +# Desc: Runs the check for all supported items +# Called by: #fh_main/second +# Datapack made by FieryHammer + +function ench_merger:merge/check_diamond_helmet +function ench_merger:merge/check_diamond_chestplate +function ench_merger:merge/check_diamond_leggings +function ench_merger:merge/check_diamond_boots +function ench_merger:merge/check_turtle_shell +function ench_merger:merge/check_diamond_sword +function ench_merger:merge/check_diamond_pickaxe +function ench_merger:merge/check_diamond_axe +function ench_merger:merge/check_diamond_shovel +function ench_merger:merge/check_diamond_hoe +function ench_merger:merge/check_bow +function ench_merger:merge/check_crossbow +function ench_merger:merge/check_fishing_rod +function ench_merger:merge/check_flint_and_steel +function ench_merger:merge/check_shears +function ench_merger:merge/check_carrot_on_a_stick +function ench_merger:merge/check_elytra +function ench_merger:merge/check_shield diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_bow.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_bow.mcfunction new file mode 100644 index 0000000..9acaa00 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_bow.mcfunction @@ -0,0 +1,9 @@ +# 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 diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_carrot_on_a_stick.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_carrot_on_a_stick.mcfunction new file mode 100644 index 0000000..c2b4f04 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_carrot_on_a_stick.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for carrot_on_a_stick 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:carrot_on_a_stick"}, {Slot:5b, id:"minecraft:carrot_on_a_stick"}]} 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:carrot_on_a_stick"}, {Slot:5b, id:"minecraft:carrot_on_a_stick"}]} run function ench_merger:merge/merge_carrot_on_a_stick diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_crossbow.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_crossbow.mcfunction new file mode 100644 index 0000000..3d82c7d --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_crossbow.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for crossbow 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:crossbow"}, {Slot:5b, id:"minecraft:crossbow"}]} 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:crossbow"}, {Slot:5b, id:"minecraft:crossbow"}]} run function ench_merger:merge/merge_crossbow diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_axe.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_axe.mcfunction new file mode 100644 index 0000000..99ea01f --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_axe.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for diamond_axe 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:diamond_axe"}, {Slot:5b, id:"minecraft:diamond_axe"}]} 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:diamond_axe"}, {Slot:5b, id:"minecraft:diamond_axe"}]} run function ench_merger:merge/merge_diamond_axe diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_boots.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_boots.mcfunction new file mode 100644 index 0000000..acf75a9 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_boots.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for diamond_boots 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:diamond_boots"}, {Slot:5b, id:"minecraft:diamond_boots"}]} 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:diamond_boots"}, {Slot:5b, id:"minecraft:diamond_boots"}]} run function ench_merger:merge/merge_diamond_boots diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_chestplate.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_chestplate.mcfunction new file mode 100644 index 0000000..7ebe155 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_chestplate.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for diamond_chestplate 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:diamond_chestplate"}, {Slot:5b, id:"minecraft:diamond_chestplate"}]} 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:diamond_chestplate"}, {Slot:5b, id:"minecraft:diamond_chestplate"}]} run function ench_merger:merge/merge_diamond_chestplate diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_helmet.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_helmet.mcfunction new file mode 100644 index 0000000..fa70aec --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_helmet.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for diamond_helmet 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:diamond_helmet"}, {Slot:5b, id:"minecraft:diamond_helmet"}]} 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:diamond_helmet"}, {Slot:5b, id:"minecraft:diamond_helmet"}]} run function ench_merger:merge/merge_diamond_helmet diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_hoe.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_hoe.mcfunction new file mode 100644 index 0000000..c4ac64c --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_hoe.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for diamond_hoe 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:diamond_hoe"}, {Slot:5b, id:"minecraft:diamond_hoe"}]} 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:diamond_hoe"}, {Slot:5b, id:"minecraft:diamond_hoe"}]} run function ench_merger:merge/merge_diamond_hoe diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_leggings.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_leggings.mcfunction new file mode 100644 index 0000000..1a0e744 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_leggings.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for diamond_leggings 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:diamond_leggings"}, {Slot:5b, id:"minecraft:diamond_leggings"}]} 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:diamond_leggings"}, {Slot:5b, id:"minecraft:diamond_leggings"}]} run function ench_merger:merge/merge_diamond_leggings diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_pickaxe.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_pickaxe.mcfunction new file mode 100644 index 0000000..b7ad19c --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_pickaxe.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for diamond_pickaxe 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:diamond_pickaxe"}, {Slot:5b, id:"minecraft:diamond_pickaxe"}]} 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:diamond_pickaxe"}, {Slot:5b, id:"minecraft:diamond_pickaxe"}]} run function ench_merger:merge/merge_diamond_pickaxe diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_shovel.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_shovel.mcfunction new file mode 100644 index 0000000..39f5478 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_shovel.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for diamond_shovel 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:diamond_shovel"}, {Slot:5b, id:"minecraft:diamond_shovel"}]} 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:diamond_shovel"}, {Slot:5b, id:"minecraft:diamond_shovel"}]} run function ench_merger:merge/merge_diamond_shovel diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_sword.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_sword.mcfunction new file mode 100644 index 0000000..8f64ae2 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_diamond_sword.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for diamond_sword 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:diamond_sword"}, {Slot:5b, id:"minecraft:diamond_sword"}]} 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:diamond_sword"}, {Slot:5b, id:"minecraft:diamond_sword"}]} run function ench_merger:merge/merge_diamond_sword diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_elytra.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_elytra.mcfunction new file mode 100644 index 0000000..48f5e08 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_elytra.mcfunction @@ -0,0 +1,9 @@ +# 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 diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_fishing_rod.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_fishing_rod.mcfunction new file mode 100644 index 0000000..7572d3e --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_fishing_rod.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for fishing_rod 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:fishing_rod"}, {Slot:5b, id:"minecraft:fishing_rod"}]} 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:fishing_rod"}, {Slot:5b, id:"minecraft:fishing_rod"}]} run function ench_merger:merge/merge_fishing_rod diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_flint_and_steel.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_flint_and_steel.mcfunction new file mode 100644 index 0000000..b7b0baf --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_flint_and_steel.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for flint_and_steel 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:flint_and_steel"}, {Slot:5b, id:"minecraft:flint_and_steel"}]} 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:flint_and_steel"}, {Slot:5b, id:"minecraft:flint_and_steel"}]} run function ench_merger:merge/merge_flint_and_steel diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_shears.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_shears.mcfunction new file mode 100644 index 0000000..299535c --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_shears.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for shears 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:shears"}, {Slot:5b, id:"minecraft:shears"}]} 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:shears"}, {Slot:5b, id:"minecraft:shears"}]} run function ench_merger:merge/merge_shears diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_shield.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_shield.mcfunction new file mode 100644 index 0000000..751ddb1 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_shield.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for shield 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:shield"}, {Slot:5b, id:"minecraft:shield"}]} 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:shield"}, {Slot:5b, id:"minecraft:shield"}]} run function ench_merger:merge/merge_shield diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_trident.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_trident.mcfunction new file mode 100644 index 0000000..ab23744 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_trident.mcfunction @@ -0,0 +1,9 @@ +# 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 diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/check_turtle_shell.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_turtle_shell.mcfunction new file mode 100644 index 0000000..f251994 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/check_turtle_shell.mcfunction @@ -0,0 +1,9 @@ +# Desc: Checks the conditions for turtle_shell 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:turtle_shell"}, {Slot:5b, id:"minecraft:turtle_shell"}]} 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:turtle_shell"}, {Slot:5b, id:"minecraft:turtle_shell"}]} run function ench_merger:merge/merge_turtle_shell diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/finish.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/finish.mcfunction new file mode 100644 index 0000000..6208a83 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/finish.mcfunction @@ -0,0 +1,20 @@ +# Desc: Runs after all merging, plays sound, makes effects, reduces exp level +# Called by: ench_merger:merge/check_* +# Datapack made by FieryHammer + +# Reduce levels +experience add @p -15 levels + +# Kill dummy Items +kill @e[tag=left_item] +kill @e[tag=right_item] + +# Empty merger +data merge block ~ ~1 ~ {Items:[]} + +particle minecraft:cloud ~ ~2.2 ~ 0.1 0.1 0.1 0.01 20 +playsound minecraft:item.trident.thunder block @p ~ ~ ~ 1 2 +playsound minecraft:block.enchantment_table.use block @p ~ ~ ~ 1 1.5 + +tag @e[tag=fh_merger_active] remove fh_merger_active +tag @e[tag=new_item] remove new_item diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_bow.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_bow.mcfunction new file mode 100644 index 0000000..bb05abc --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_bow.mcfunction @@ -0,0 +1,20 @@ +# Desc: Merges the two bows +# Called by: ench_merger:merge/check_bow +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:bow", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/power +function ench_merger:recipes/punch +function ench_merger:recipes/flame +function ench_merger:recipes/infinity +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_carrot_on_a_stick.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_carrot_on_a_stick.mcfunction new file mode 100644 index 0000000..19ce97a --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_carrot_on_a_stick.mcfunction @@ -0,0 +1,16 @@ +# Desc: Merges the two carrot_on_a_sticks +# Called by: ench_merger:merge/check_carrot_on_a_stick +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:carrot_on_a_stick", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_crossbow.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_crossbow.mcfunction new file mode 100644 index 0000000..483147c --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_crossbow.mcfunction @@ -0,0 +1,19 @@ +# Desc: Merges the two crossbows +# Called by: ench_merger:merge/check_crossbow +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:crossbow", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/quick_charge +function ench_merger:recipes/multishot +function ench_merger:recipes/piercing +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_axe.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_axe.mcfunction new file mode 100644 index 0000000..69e2514 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_axe.mcfunction @@ -0,0 +1,22 @@ +# Desc: Merges the two diamond_axes +# Called by: ench_merger:merge/check_diamond_axe +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:diamond_axe", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/efficiency +function ench_merger:recipes/fortune +function ench_merger:recipes/silk_touch +function ench_merger:recipes/unbreaking +function ench_merger:recipes/sharpness +function ench_merger:recipes/smite +function ench_merger:recipes/bane_of_arthropods +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_boots.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_boots.mcfunction new file mode 100644 index 0000000..b053e30 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_boots.mcfunction @@ -0,0 +1,25 @@ +# Desc: Merges the two diamond_bootss +# Called by: ench_merger:merge/check_diamond_boots +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:diamond_boots", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/fire_protection +function ench_merger:recipes/projectile_protection +function ench_merger:recipes/blast_protection +function ench_merger:recipes/protection +function ench_merger:recipes/feather_falling +function ench_merger:recipes/unbreaking +function ench_merger:recipes/thorns +function ench_merger:recipes/frost_walker +function ench_merger:recipes/depth_strider +function ench_merger:recipes/mending +function ench_merger:recipes/binding_curse +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_chestplate.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_chestplate.mcfunction new file mode 100644 index 0000000..6dbaf79 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_chestplate.mcfunction @@ -0,0 +1,22 @@ +# Desc: Merges the two diamond_chestplates +# Called by: ench_merger:merge/check_diamond_chestplate +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:diamond_chestplate", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/fire_protection +function ench_merger:recipes/projectile_protection +function ench_merger:recipes/blast_protection +function ench_merger:recipes/protection +function ench_merger:recipes/unbreaking +function ench_merger:recipes/thorns +function ench_merger:recipes/mending +function ench_merger:recipes/binding_curse +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_helmet.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_helmet.mcfunction new file mode 100644 index 0000000..81492f0 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_helmet.mcfunction @@ -0,0 +1,24 @@ +# Desc: Merges the two diamond_helmets +# Called by: ench_merger:merge/check_diamond_helmet +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:diamond_helmet", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/fire_protection +function ench_merger:recipes/projectile_protection +function ench_merger:recipes/blast_protection +function ench_merger:recipes/protection +function ench_merger:recipes/unbreaking +function ench_merger:recipes/respiration +function ench_merger:recipes/aqua_affinity +function ench_merger:recipes/thorns +function ench_merger:recipes/mending +function ench_merger:recipes/binding_curse +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_hoe.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_hoe.mcfunction new file mode 100644 index 0000000..4e0d19f --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_hoe.mcfunction @@ -0,0 +1,16 @@ +# Desc: Merges the two diamond_hoes +# Called by: ench_merger:merge/check_diamond_hoe +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:diamond_hoe", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_leggings.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_leggings.mcfunction new file mode 100644 index 0000000..b987da7 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_leggings.mcfunction @@ -0,0 +1,22 @@ +# Desc: Merges the two diamond_leggingss +# Called by: ench_merger:merge/check_diamond_leggings +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:diamond_leggings", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/fire_protection +function ench_merger:recipes/projectile_protection +function ench_merger:recipes/blast_protection +function ench_merger:recipes/protection +function ench_merger:recipes/unbreaking +function ench_merger:recipes/thorns +function ench_merger:recipes/mending +function ench_merger:recipes/binding_curse +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_pickaxe.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_pickaxe.mcfunction new file mode 100644 index 0000000..028248b --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_pickaxe.mcfunction @@ -0,0 +1,19 @@ +# Desc: Merges the two diamond_pickaxes +# Called by: ench_merger:merge/check_diamond_pickaxe +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:diamond_pickaxe", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/efficiency +function ench_merger:recipes/fortune +function ench_merger:recipes/silk_touch +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_shovel.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_shovel.mcfunction new file mode 100644 index 0000000..3b1eda3 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_shovel.mcfunction @@ -0,0 +1,19 @@ +# Desc: Merges the two diamond_shovels +# Called by: ench_merger:merge/check_diamond_shovel +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:diamond_shovel", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/efficiency +function ench_merger:recipes/fortune +function ench_merger:recipes/silk_touch +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_sword.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_sword.mcfunction new file mode 100644 index 0000000..c5aca69 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_diamond_sword.mcfunction @@ -0,0 +1,23 @@ +# Desc: Merges the two diamond_swords +# Called by: ench_merger:merge/check_diamond_sword +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:diamond_sword", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/fire_aspect +function ench_merger:recipes/looting +function ench_merger:recipes/unbreaking +function ench_merger:recipes/sharpness +function ench_merger:recipes/smite +function ench_merger:recipes/bane_of_arthropods +function ench_merger:recipes/knockback +function ench_merger:recipes/mending +function ench_merger:recipes/sweeping +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_elytra.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_elytra.mcfunction new file mode 100644 index 0000000..26e5c06 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_elytra.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merges the two elytras +# Called by: ench_merger:merge/check_elytra +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:elytra", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/binding_curse +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_fishing_rod.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_fishing_rod.mcfunction new file mode 100644 index 0000000..4d842c8 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_fishing_rod.mcfunction @@ -0,0 +1,18 @@ +# Desc: Merges the two fishing_rods +# Called by: ench_merger:merge/check_fishing_rod +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:fishing_rod", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/lure +function ench_merger:recipes/luck_of_the_sea +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_flint_and_steel.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_flint_and_steel.mcfunction new file mode 100644 index 0000000..9b41420 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_flint_and_steel.mcfunction @@ -0,0 +1,16 @@ +# Desc: Merges the two flint_and_steels +# Called by: ench_merger:merge/check_flint_and_steel +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:flint_and_steel", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_shears.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_shears.mcfunction new file mode 100644 index 0000000..c81604e --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_shears.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merges the two shearss +# Called by: ench_merger:merge/check_shears +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:shears", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/efficiency +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_shield.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_shield.mcfunction new file mode 100644 index 0000000..41f4b50 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_shield.mcfunction @@ -0,0 +1,16 @@ +# Desc: Merges the two shields +# Called by: ench_merger:merge/check_shield +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:shield", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_trident.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_trident.mcfunction new file mode 100644 index 0000000..8f87f2f --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_trident.mcfunction @@ -0,0 +1,20 @@ +# Desc: Merges the two tridents +# Called by: ench_merger:merge/check_trident +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:trident", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/loyalty +function ench_merger:recipes/channeling +function ench_merger:recipes/riptide +function ench_merger:recipes/impaling +function ench_merger:recipes/unbreaking +function ench_merger:recipes/mending +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_turtle_shell.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_turtle_shell.mcfunction new file mode 100644 index 0000000..bc28dd4 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/merge_turtle_shell.mcfunction @@ -0,0 +1,24 @@ +# Desc: Merges the two turtle_shells +# Called by: ench_merger:merge/check_turtle_shell +# Datapack made by FieryHammer + +# Summon new basic item +execute at @e[tag=fh_merger_active, sort=nearest] run summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:turtle_shell", Count: 1b}, Tags:["new_item"], PickupDelay:60, NoGravity:1b} + +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/setup + +# Run enchantments check for item +function ench_merger:recipes/fire_protection +function ench_merger:recipes/projectile_protection +function ench_merger:recipes/blast_protection +function ench_merger:recipes/protection +function ench_merger:recipes/unbreaking +function ench_merger:recipes/respiration +function ench_merger:recipes/aqua_affinity +function ench_merger:recipes/thorns +function ench_merger:recipes/mending +function ench_merger:recipes/binding_curse +function ench_merger:recipes/vanishing_curse + +# Finish +execute at @e[tag=fh_merger_active, sort=nearest] run function ench_merger:merge/finish diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merge/setup.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merge/setup.mcfunction new file mode 100644 index 0000000..b3e10e4 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merge/setup.mcfunction @@ -0,0 +1,16 @@ +# Desc: +# Called by: +# Datapack made by FieryHammer + +# Summon two dummy items +summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:stone", Count: 1b}, Tags:["left_item"], PickupDelay:40} +summon minecraft:item ~ ~2 ~ {Item:{id:"minecraft:dirt", Count: 1b}, Tags:["right_item"], PickupDelay:40} + +# Create a copy of the items in the Merger onto dummy items +data modify entity @e[tag=left_item, limit=1] Item set from block ~ ~1 ~ Items[0] +data modify entity @e[tag=right_item, limit=1] Item set from block ~ ~1 ~ Items[1] + +# Copy the name and damage from the left item +data modify entity @e[tag=new_item, limit=1] Item.tag.display set from entity @e[tag=left_item, limit=1] Item.tag.display +data modify entity @e[tag=new_item, limit=1] Item.tag.Damage set from entity @e[tag=left_item, limit=1] Item.tag.Damage +data modify entity @e[tag=new_item, limit=1] Item.tag.BlockEntityTag set from entity @e[tag=left_item, limit=1] Item.tag.BlockEntityTag \ No newline at end of file diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merger/check_combine.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merger/check_combine.mcfunction new file mode 100644 index 0000000..8a88a03 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merger/check_combine.mcfunction @@ -0,0 +1,5 @@ +# Desc: If there are valid items around, calls the function that creates the Merger +# Called by: ench_merger:merger/check_combine_start +# Datapack made by FieryHammer + +execute if entity @e[type=item, distance=..0.75, nbt={Item:{id:"minecraft:enchanting_table", Count:1b}}, tag=!fh_dropped] if entity @e[type=item, distance=..0.75, nbt={Item:{id:"minecraft:anvil", Count:1b}}, tag=!fh_dropped] run function ench_merger:merger/combine diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merger/check_combine_start.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merger/check_combine_start.mcfunction new file mode 100644 index 0000000..347502b --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merger/check_combine_start.mcfunction @@ -0,0 +1,5 @@ +# Desc: Checks a thrown crafting table if can be combined to a Merger +# Called by: #fh_main/second +# Datapack made by FieryHammer + +execute at @e[type=item, limit=1, nbt={Item:{id:"minecraft:crafting_table", Count:1b}}, tag=!fh_dropped] run function ench_merger:merger/check_combine diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merger/check_destroy.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merger/check_destroy.mcfunction new file mode 100644 index 0000000..d5b1785 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merger/check_destroy.mcfunction @@ -0,0 +1,5 @@ +# Desc: If the dropper for the merger is destroyed, calls the destroy function +# Called by: #fh_main/half_second +# Datapack made by FieryHammer + +execute at @e[tag=fh_merger] if block ~ ~1 ~ minecraft:air run function ench_merger:merger/destroy diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merger/combine.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merger/combine.mcfunction new file mode 100644 index 0000000..9035f62 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merger/combine.mcfunction @@ -0,0 +1,13 @@ +# Desc: Creates the Merger +# Called by: ench_merger:merger/check_combine +# Datapack made by FieryHammer + +execute align xyz run summon minecraft:armor_stand ~0.5 ~-0.40 ~0.5 {NoGravity:1b, Invisible:1b, DisabledSlots:2039583, ArmorItems:[{},{},{},{id:"minecraft:anvil", Count: 1b}], Tags:["fh_merger"]} +setblock ~ ~ ~ dropper[facing=up]{CustomName: '{"text":"Enchantment Merger","color":"dark_purple"}'} + +playsound minecraft:block.anvil.place block @a ~ ~0.5 ~ 0.5 0.45 +playsound minecraft:block.portal.ambient block @a ~ ~0.5 ~ 0.45 1.5 + +kill @e[type=item, limit=1, nbt={Item:{id:"minecraft:enchanting_table"}}, distance=..1] +kill @e[type=item, limit=1, nbt={Item:{id:"minecraft:anvil"}}, distance=..1] +kill @e[type=item, limit=1, nbt={Item:{id:"minecraft:crafting_table"}}, distance=..1] diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merger/destroy.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merger/destroy.mcfunction new file mode 100644 index 0000000..41c9100 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merger/destroy.mcfunction @@ -0,0 +1,10 @@ +# Desc: Kills the Merger armor stand and drops the build items +# Called by: ench_merger:merger/check_destroy +# Datapack made by FieryHammer + +kill @e[tag=fh_merger, distance=..1] + +summon item ~0.1 ~0.2 ~0.2 {Item:{id:"minecraft:anvil", Count: 1b}, Tags:["fh_dropped"]} +summon item ~-0.1 ~0.3 ~-0.1 {Item:{id:"minecraft:enchanting_table", Count: 1b}, Tags:["fh_dropped"]} +summon item ~0.3 ~0.3 ~-0.2 {Item:{id:"minecraft:crafting_table", Count: 1b}, Tags:["fh_dropped"]} +kill @e[type=item, limit=1, nbt={Item:{id:"minecraft:dropper"}}, sort=nearest] diff --git a/datapacks/enchantment merger/data/ench_merger/functions/merger/particle.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/merger/particle.mcfunction new file mode 100644 index 0000000..6cd5f7e --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/merger/particle.mcfunction @@ -0,0 +1,5 @@ +# Desc: Creates particle effects around merger +# Called by: #fh_main/particle +# Datapack made by FieryHammer + +execute at @e[tag=fh_merger] run particle minecraft:dust 0.8 0.45 0.9 1 ~ ~1 ~ .5 .75 .5 1 1 diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/aqua_affinity.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/aqua_affinity.mcfunction new file mode 100644 index 0000000..fc5953d --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/aqua_affinity.mcfunction @@ -0,0 +1,11 @@ +# Desc: Merge instructions for aqua_affinity +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:aqua_affinity", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:aqua_affinity", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:aqua_affinity", lvl:1s} + +# Checking level matching + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:aqua_affinity", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:aqua_affinity", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:aqua_affinity", lvl:1s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/bane_of_arthropods.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/bane_of_arthropods.mcfunction new file mode 100644 index 0000000..964b0c8 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/bane_of_arthropods.mcfunction @@ -0,0 +1,23 @@ +# Desc: Merge instructions for bane_of_arthropods +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:4s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:5s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:5s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:bane_of_arthropods", lvl:5s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/binding_curse.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/binding_curse.mcfunction new file mode 100644 index 0000000..babe1bd --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/binding_curse.mcfunction @@ -0,0 +1,11 @@ +# Desc: Merge instructions for binding_curse +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:binding_curse", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:binding_curse", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:binding_curse", lvl:1s} + +# Checking level matching + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:binding_curse", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:binding_curse", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:binding_curse", lvl:1s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/blast_protection.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/blast_protection.mcfunction new file mode 100644 index 0000000..b595673 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/blast_protection.mcfunction @@ -0,0 +1,20 @@ +# Desc: Merge instructions for blast_protection +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:4s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:4s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:blast_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:blast_protection", lvl:4s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/channeling.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/channeling.mcfunction new file mode 100644 index 0000000..0435378 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/channeling.mcfunction @@ -0,0 +1,11 @@ +# Desc: Merge instructions for channeling +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:channeling", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:channeling", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:channeling", lvl:1s} + +# Checking level matching + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:channeling", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:channeling", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:channeling", lvl:1s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/depth_strider.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/depth_strider.mcfunction new file mode 100644 index 0000000..58ac486 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/depth_strider.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for depth_strider +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:depth_strider", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:depth_strider", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:depth_strider", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:depth_strider", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:depth_strider", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:depth_strider", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:depth_strider", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:depth_strider", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:depth_strider", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/efficiency.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/efficiency.mcfunction new file mode 100644 index 0000000..ce88888 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/efficiency.mcfunction @@ -0,0 +1,23 @@ +# Desc: Merge instructions for efficiency +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:4s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:5s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:5s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:efficiency", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:efficiency", lvl:5s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/feather_falling.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/feather_falling.mcfunction new file mode 100644 index 0000000..bdf1b7c --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/feather_falling.mcfunction @@ -0,0 +1,20 @@ +# Desc: Merge instructions for feather_falling +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:4s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:4s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:feather_falling", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:feather_falling", lvl:4s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/fire_aspect.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/fire_aspect.mcfunction new file mode 100644 index 0000000..faa6ad0 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/fire_aspect.mcfunction @@ -0,0 +1,14 @@ +# Desc: Merge instructions for fire_aspect +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_aspect", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_aspect", lvl:2s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_aspect", lvl:2s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_aspect", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_aspect", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_aspect", lvl:2s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/fire_protection.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/fire_protection.mcfunction new file mode 100644 index 0000000..32a7c57 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/fire_protection.mcfunction @@ -0,0 +1,20 @@ +# Desc: Merge instructions for fire_protection +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:4s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:4s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fire_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fire_protection", lvl:4s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/flame.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/flame.mcfunction new file mode 100644 index 0000000..cf6f588 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/flame.mcfunction @@ -0,0 +1,11 @@ +# Desc: Merge instructions for flame +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:flame", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:flame", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:flame", lvl:1s} + +# Checking level matching + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:flame", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:flame", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:flame", lvl:1s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/fortune.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/fortune.mcfunction new file mode 100644 index 0000000..435d1f2 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/fortune.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for fortune +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fortune", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fortune", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fortune", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fortune", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fortune", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fortune", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fortune", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:fortune", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:fortune", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/frost_walker.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/frost_walker.mcfunction new file mode 100644 index 0000000..ca77752 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/frost_walker.mcfunction @@ -0,0 +1,14 @@ +# Desc: Merge instructions for frost_walker +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:frost_walker", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:frost_walker", lvl:2s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:frost_walker", lvl:2s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:frost_walker", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:frost_walker", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:frost_walker", lvl:2s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/impaling.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/impaling.mcfunction new file mode 100644 index 0000000..8d7e109 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/impaling.mcfunction @@ -0,0 +1,23 @@ +# Desc: Merge instructions for impaling +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:4s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:5s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:5s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:impaling", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:impaling", lvl:5s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/infinity.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/infinity.mcfunction new file mode 100644 index 0000000..a2a7d90 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/infinity.mcfunction @@ -0,0 +1,11 @@ +# Desc: Merge instructions for infinity +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:infinity", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:infinity", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:infinity", lvl:1s} + +# Checking level matching + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:infinity", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:infinity", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:infinity", lvl:1s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/knockback.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/knockback.mcfunction new file mode 100644 index 0000000..e79b5e8 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/knockback.mcfunction @@ -0,0 +1,14 @@ +# Desc: Merge instructions for knockback +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:knockback", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:knockback", lvl:2s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:knockback", lvl:2s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:knockback", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:knockback", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:knockback", lvl:2s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/looting.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/looting.mcfunction new file mode 100644 index 0000000..fcf1fae --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/looting.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for looting +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:looting", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:looting", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:looting", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:looting", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:looting", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:looting", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:looting", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:looting", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:looting", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/loyalty.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/loyalty.mcfunction new file mode 100644 index 0000000..96efbc3 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/loyalty.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for loyalty +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:loyalty", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:loyalty", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:loyalty", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:loyalty", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:loyalty", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:loyalty", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:loyalty", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:loyalty", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:loyalty", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/luck_of_the_sea.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/luck_of_the_sea.mcfunction new file mode 100644 index 0000000..b782937 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/luck_of_the_sea.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for luck_of_the_sea +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:luck_of_the_sea", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:luck_of_the_sea", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:luck_of_the_sea", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:luck_of_the_sea", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:luck_of_the_sea", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:luck_of_the_sea", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:luck_of_the_sea", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:luck_of_the_sea", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:luck_of_the_sea", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/lure.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/lure.mcfunction new file mode 100644 index 0000000..c79293c --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/lure.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for lure +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:lure", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:lure", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:lure", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:lure", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:lure", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:lure", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:lure", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:lure", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:lure", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/mending.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/mending.mcfunction new file mode 100644 index 0000000..c0225b9 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/mending.mcfunction @@ -0,0 +1,11 @@ +# Desc: Merge instructions for mending +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:mending", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:mending", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:mending", lvl:1s} + +# Checking level matching + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:mending", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:mending", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:mending", lvl:1s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/multishot.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/multishot.mcfunction new file mode 100644 index 0000000..3e9b242 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/multishot.mcfunction @@ -0,0 +1,11 @@ +# Desc: Merge instructions for multishot +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:multishot", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:multishot", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:multishot", lvl:1s} + +# Checking level matching + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:multishot", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:multishot", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:multishot", lvl:1s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/piercing.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/piercing.mcfunction new file mode 100644 index 0000000..d9f53fd --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/piercing.mcfunction @@ -0,0 +1,20 @@ +# Desc: Merge instructions for piercing +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:4s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:4s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:piercing", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:piercing", lvl:4s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/power.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/power.mcfunction new file mode 100644 index 0000000..513276a --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/power.mcfunction @@ -0,0 +1,23 @@ +# Desc: Merge instructions for power +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:4s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:5s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:5s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:power", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:power", lvl:5s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/projectile_protection.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/projectile_protection.mcfunction new file mode 100644 index 0000000..34944ea --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/projectile_protection.mcfunction @@ -0,0 +1,20 @@ +# Desc: Merge instructions for projectile_protection +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:4s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:4s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:projectile_protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:projectile_protection", lvl:4s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/protection.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/protection.mcfunction new file mode 100644 index 0000000..dc1507d --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/protection.mcfunction @@ -0,0 +1,20 @@ +# Desc: Merge instructions for protection +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:4s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:4s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:protection", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:protection", lvl:4s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/punch.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/punch.mcfunction new file mode 100644 index 0000000..2d0c666 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/punch.mcfunction @@ -0,0 +1,14 @@ +# Desc: Merge instructions for punch +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:punch", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:punch", lvl:2s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:punch", lvl:2s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:punch", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:punch", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:punch", lvl:2s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/quick_charge.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/quick_charge.mcfunction new file mode 100644 index 0000000..7ff2b3d --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/quick_charge.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for quick_charge +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:quick_charge", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:quick_charge", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:quick_charge", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:quick_charge", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:quick_charge", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:quick_charge", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:quick_charge", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:quick_charge", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:quick_charge", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/respiration.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/respiration.mcfunction new file mode 100644 index 0000000..bc4bca8 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/respiration.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for respiration +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:respiration", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:respiration", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:respiration", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:respiration", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:respiration", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:respiration", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:respiration", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:respiration", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:respiration", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/riptide.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/riptide.mcfunction new file mode 100644 index 0000000..1a2a776 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/riptide.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for riptide +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:riptide", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:riptide", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:riptide", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:riptide", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:riptide", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:riptide", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:riptide", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:riptide", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:riptide", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/sharpness.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/sharpness.mcfunction new file mode 100644 index 0000000..860471f --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/sharpness.mcfunction @@ -0,0 +1,23 @@ +# Desc: Merge instructions for sharpness +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:4s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:5s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:5s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sharpness", lvl:5s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/silk_touch.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/silk_touch.mcfunction new file mode 100644 index 0000000..0ee0104 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/silk_touch.mcfunction @@ -0,0 +1,11 @@ +# Desc: Merge instructions for silk_touch +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:silk_touch", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:silk_touch", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:silk_touch", lvl:1s} + +# Checking level matching + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:silk_touch", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:silk_touch", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:silk_touch", lvl:1s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/smite.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/smite.mcfunction new file mode 100644 index 0000000..a0c6bcb --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/smite.mcfunction @@ -0,0 +1,23 @@ +# Desc: Merge instructions for smite +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:3s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:4s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:5s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:5s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:3s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:3s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:4s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:4s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:smite", lvl:5s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:smite", lvl:5s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/sweeping.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/sweeping.mcfunction new file mode 100644 index 0000000..df18d41 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/sweeping.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for sweeping +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sweeping", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sweeping", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sweeping", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sweeping", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sweeping", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sweeping", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sweeping", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sweeping", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:sweeping", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/thorns.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/thorns.mcfunction new file mode 100644 index 0000000..dd32038 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/thorns.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for thorns +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:thorns", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:thorns", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:thorns", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:thorns", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:thorns", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:thorns", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:thorns", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:thorns", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:thorns", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/unbreaking.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/unbreaking.mcfunction new file mode 100644 index 0000000..deb64e4 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/unbreaking.mcfunction @@ -0,0 +1,17 @@ +# Desc: Merge instructions for unbreaking +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:unbreaking", lvl:1s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:2s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:unbreaking", lvl:2s} +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:3s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:unbreaking", lvl:3s} + +# Checking level matching +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:1s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:unbreaking", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:2s}]}}}] if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:2s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:unbreaking", lvl:3s} + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:1s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:unbreaking", lvl:1s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:2s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:2s}]}}}, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:unbreaking", lvl:2s} +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:3s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:unbreaking", lvl:3s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:unbreaking", lvl:3s} diff --git a/datapacks/enchantment merger/data/ench_merger/functions/recipes/vanishing_curse.mcfunction b/datapacks/enchantment merger/data/ench_merger/functions/recipes/vanishing_curse.mcfunction new file mode 100644 index 0000000..2ac8680 --- /dev/null +++ b/datapacks/enchantment merger/data/ench_merger/functions/recipes/vanishing_curse.mcfunction @@ -0,0 +1,11 @@ +# Desc: Merge instructions for vanishing_curse +# Called by: ench_merge:merge/merge_* +# Datapack made by FieryHammer + +# Checking left item +execute if entity @e[tag=left_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:vanishing_curse", lvl:1s}]}}}] if entity @e[tag=right_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:vanishing_curse", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:vanishing_curse", lvl:1s} + +# Checking level matching + +# Checking right item +execute if entity @e[tag=right_item, nbt={Item:{tag:{Enchantments:[{id:"minecraft:vanishing_curse", lvl:1s}]}}}] if entity @e[tag=new_item, nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:vanishing_curse", lvl:1s}]}}}] run data modify entity @e[tag=new_item, limit=1] Item.tag.Enchantments append value {id:"minecraft:vanishing_curse", lvl:1s} diff --git a/datapacks/enchantment merger/data/fh_main/functions/init.mcfunction b/datapacks/enchantment merger/data/fh_main/functions/init.mcfunction new file mode 100644 index 0000000..d2796a0 --- /dev/null +++ b/datapacks/enchantment merger/data/fh_main/functions/init.mcfunction @@ -0,0 +1,5 @@ +# Desc: Setting up the scoreboard(s) +# Called by: #fh_main:init +# Datapack made by FieryHammer + +scoreboard objectives add fh_tick dummy \ No newline at end of file diff --git a/datapacks/enchantment merger/data/fh_main/functions/tick.mcfunction b/datapacks/enchantment merger/data/fh_main/functions/tick.mcfunction new file mode 100644 index 0000000..17407bd --- /dev/null +++ b/datapacks/enchantment merger/data/fh_main/functions/tick.mcfunction @@ -0,0 +1,36 @@ +# Desc: Setting up the scoreboard(s) +# Called by: #minecraft:tick +# Datapack made by FieryHammer + +scoreboard players add #fh_tick fh_tick 1 + +# Every tick +function #fh_main:tick + +# Every half second +execute if score #fh_tick fh_tick matches 1 run function #fh_main:half_second +execute if score #fh_tick fh_tick matches 11 run function #fh_main:half_second +execute if score #fh_tick fh_tick matches 21 run function #fh_main:half_second +execute if score #fh_tick fh_tick matches 31 run function #fh_main:half_second +execute if score #fh_tick fh_tick matches 41 run function #fh_main:half_second +execute if score #fh_tick fh_tick matches 51 run function #fh_main:half_second +execute if score #fh_tick fh_tick matches 61 run function #fh_main:half_second +execute if score #fh_tick fh_tick matches 71 run function #fh_main:half_second +execute if score #fh_tick fh_tick matches 81 run function #fh_main:half_second +execute if score #fh_tick fh_tick matches 91 run function #fh_main:half_second + +# Every second +execute if score #fh_tick fh_tick matches 1 run function #fh_main:second +execute if score #fh_tick fh_tick matches 21 run function #fh_main:second +execute if score #fh_tick fh_tick matches 41 run function #fh_main:second +execute if score #fh_tick fh_tick matches 61 run function #fh_main:second +execute if score #fh_tick fh_tick matches 81 run function #fh_main:second + +# Every 2.5 seconds +execute if score #fh_tick fh_tick matches 1 run function #fh_main:two_and_half_second +execute if score #fh_tick fh_tick matches 51 run function #fh_main:two_and_half_second + +# Every 5 seconds +execute if score #fh_tick fh_tick matches 1 run function #fh_main:five_second + +execute if score #fh_tick fh_tick matches 100.. run scoreboard players set #fh_tick fh_tick 0 \ No newline at end of file diff --git a/datapacks/enchantment merger/data/fh_main/tags/functions/five_second.json b/datapacks/enchantment merger/data/fh_main/tags/functions/five_second.json new file mode 100644 index 0000000..77d02ba --- /dev/null +++ b/datapacks/enchantment merger/data/fh_main/tags/functions/five_second.json @@ -0,0 +1,5 @@ +{ + "values":[ + + ] +} diff --git a/datapacks/enchantment merger/data/fh_main/tags/functions/half_second.json b/datapacks/enchantment merger/data/fh_main/tags/functions/half_second.json new file mode 100644 index 0000000..0af1bc1 --- /dev/null +++ b/datapacks/enchantment merger/data/fh_main/tags/functions/half_second.json @@ -0,0 +1,5 @@ +{ + "values":[ + "ench_merger:merger/check_destroy" + ] +} diff --git a/datapacks/enchantment merger/data/fh_main/tags/functions/init.json b/datapacks/enchantment merger/data/fh_main/tags/functions/init.json new file mode 100644 index 0000000..5ae5edb --- /dev/null +++ b/datapacks/enchantment merger/data/fh_main/tags/functions/init.json @@ -0,0 +1,6 @@ +{ + "values":[ + "fh_main:init", + "ench_merger:init" + ] +} diff --git a/datapacks/enchantment merger/data/fh_main/tags/functions/second.json b/datapacks/enchantment merger/data/fh_main/tags/functions/second.json new file mode 100644 index 0000000..b69c126 --- /dev/null +++ b/datapacks/enchantment merger/data/fh_main/tags/functions/second.json @@ -0,0 +1,6 @@ +{ + "values":[ + "ench_merger:merger/check_combine_start", + "ench_merger:merge/check_all" + ] +} diff --git a/datapacks/enchantment merger/data/fh_main/tags/functions/tick.json b/datapacks/enchantment merger/data/fh_main/tags/functions/tick.json new file mode 100644 index 0000000..08f48af --- /dev/null +++ b/datapacks/enchantment merger/data/fh_main/tags/functions/tick.json @@ -0,0 +1,5 @@ +{ + "values":[ + "ench_merger:merger/particle" + ] +} diff --git a/datapacks/enchantment merger/data/fh_main/tags/functions/two_and_half_second.json b/datapacks/enchantment merger/data/fh_main/tags/functions/two_and_half_second.json new file mode 100644 index 0000000..77d02ba --- /dev/null +++ b/datapacks/enchantment merger/data/fh_main/tags/functions/two_and_half_second.json @@ -0,0 +1,5 @@ +{ + "values":[ + + ] +} diff --git a/datapacks/enchantment merger/data/minecraft/tags/functions/load.json b/datapacks/enchantment merger/data/minecraft/tags/functions/load.json new file mode 100644 index 0000000..7d4474f --- /dev/null +++ b/datapacks/enchantment merger/data/minecraft/tags/functions/load.json @@ -0,0 +1,5 @@ +{ + "values": [ + "#fh_main:init" + ] +} diff --git a/datapacks/enchantment merger/data/minecraft/tags/functions/tick.json b/datapacks/enchantment merger/data/minecraft/tags/functions/tick.json new file mode 100644 index 0000000..30941a5 --- /dev/null +++ b/datapacks/enchantment merger/data/minecraft/tags/functions/tick.json @@ -0,0 +1,5 @@ +{ + "values": [ + "fh_main:tick" + ] +} diff --git a/datapacks/enchantment merger/pack.mcmeta b/datapacks/enchantment merger/pack.mcmeta new file mode 100644 index 0000000..68da8ea --- /dev/null +++ b/datapacks/enchantment merger/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack":{ + "pack_format":2, + "description":"Merges enchantments without exclusion" + } +}