Topic category: User side tutorials
In the item Triggers, choose When right-clicked.
Go to Entity management and choose Execute command/
Type this code into the field:
/execute at @s as @e[distance=..6,type=!player] run tp ^ ^2 ^
The result will be entities will be pulled to you from a distance of 6 blocks and end up being held above your head if you hold down the right button.
You can then carry them around, but be aware that the longer you hold them, the 'higher up the distance they will fall' meaning they will hit harder and do more damage to themselves when you drop them. That is unless you drop them in water.
Also, some mobs will continue to be able to attack you.
But it's pretty darn fun to use!