You Can't (Probably) Enchant All Items In Inventory, You Can Try Using This: Add enchantment (Enchantment Here) with level (Level Here) to Provided itemstack
That does not work since you're getting a copy of the item from the slot, so applying the enchant is putting the enchant on the copy that is then being dropped into the void.
Instead it would go like this:
Set i to 0
While i <= 36 {
If is enchantable item {
Set "current_item" to copy of item from slot i
Add enchantment to "current_item"
Set inventory slot i to "current_item"
}
i++
}
You Can't (Probably) Enchant All Items In Inventory, You Can Try Using This:
Add enchantment (Enchantment Here) with level (Level Here) to Provided itemstack
I don't want to enchant the currently held item at all, just literally everything else.
I have a solution:
Step 1: create a local number variable(vslot).
Step 2: Add this procedure code
"(Set (vslot) to: (0))
(Repeat (36) times)
(If (Is (get a copy of item from slot (vslot) of (event/target entity) if it has inventory) enchantable))
(add enchantment (enchantment) to (get a copy of item from slot (vslot) of (event/target entity) if it has inventory))
(Set (vslot) to: ((vslot) + (1)))
Sorry, I just realized that doesn't work. I should have tested beforehand.
I will try to give you a working solution later today.
That does not work since you're getting a copy of the item from the slot, so applying the enchant is putting the enchant on the copy that is then being dropped into the void.
Instead it would go like this:
Can you specify more please?
Well here it is in code blocks.
I can't put "Event/target entity" in the "Get a copy" block...
does not work you can not do this