
Infuse swords with magical powers through the use of CustomModelData
CMD for specific magics is 917+[Number of magic - 1]
Every 10 minutes, an Arcane Trader spawns at a random position on the surface near spawn in the overworld. This trader sells a random sword (or a golden axe) imbued with a random magic.
Once an Arcane Trader spawns, a message is broadcast in chat.
Weapons cost 10 emeralds and a set price in diamonds (see table below)
| Weapon | Diamonds |
|---|---|
| Wooden Sword | 15 |
| Golden Sword | 25 |
| Iron Sword | 30 |
| Diamond Sword | 50 |
| Netherite Sword | 64 |
Holding a valid item (sword, golden axe, trident) in your main hand also applies the magic of the weapon in your offhand

Sets the entity hit on fire for 50 ticks (2.5 seconds) (disregarding block) and deals 1.3x damage (unless the attacker is frozen).
If not blocked, gives slowness for 60 ticks (3 seconds).
Disables lightning completely whilst they're on fire.

Gives the entity hit 80 freeze ticks (4 seconds) and deals 1.15x damage.
This magic makes some magics not deal extra damage/disables their effects.

Teleports the entity up 0.5 blocks. The more the sword wielder hits entities with sword, the higher it is teleported.
This scales up to 5 hits, and then is reset.

Smites the entity, dealing 1.5x damage.
Only deals 1.2x damage if the attacker has freeze or fire ticks.

Heals the attacker a portion of the damage dealt to the entity.
Deals 1.15x less damage if the attacker has freeze ticks.
damage_healed = damage/2.5

Gives the entity hit poison for 20 ticks (1 second), even if the attack was blocked.
If the attacker has the poison effect, the poison given has an amplitude of 5 instead of 2.
If the entity hit has the poison effect, they get nausea for 40 ticks (2 seconds)
The attack deals 1.15x less damage.

Teleports the entity hit a random location within 7 blocks of the attacker and gives it blindness for 60 ticks (3 seconds).
It also makes the attacker glow for 15 ticks (0.75 seconds)
If the attack was blocked, this only gives blindness.
The attack deals 1.15x less damage.

Launches entities within 3 blocks away from the attacker.
If the attack was blocked, entities are launched less.
The attack deals 1.15x less damage.

Launches entities within 5 blocks towards the attacker.
If the attack was blocked, entities are launched less.
This can launch entities over the attacker.
The attack deals 1.15x less damage.
Icon from game-icons.net licensed under CC-BY 3.0