Description
I was tired of the overpowered magnets found everywhere and complicated methods to get magnets. So I made this datapack for my friends and I, and now sharing with you. A very simple way to have magnets that aren't overpowered and easy to get without jumping through hoops and down holes.
You will be using it as-is.
1.20 version works down to 1.15
1.21 version works on only 1.21 to 1.21.4
1.21.5 version changes NBTs, requires 1.21.5 version
12.11 version changes NBTs again, requires 1.21.11 version
All it does is make sticks work as a magnet while they're in your main-hand or off-hand.
Any items placed in the last slot of your Hotbar or Inventory and renamed to Magnet will also work as a magnet.
The range is 5 blocks. 
You are free to make changes to my datapack as you see fit.
KNOWN BUGS
This pack seems to not work with items renamed to Magnet if you're using mods like Legendary Tooltip which changes the NBT data that makes the Magnet check fail. Still works for sticks, though.