How to deal knockback without directly hitting something. (For a custom spear recreation) (1.21.8+)
Basically I want the charge attack, and an enchantment that boosts the knockback, to deal a considerable amount of knockback. But the weapon just runs a function to attack(deal damage) once you enter the proximity of an entity, what I want to know is how if possible to deal a considerable amount of knockback in someway as well as have that knockback be saleable via an enchantment, though I'd like to fix the primary issue first before worrying about the enchantment.