When riding into an encounter with a mob, if you wish to "glitch" out the mob so they become unable to attack you must:
- Ride near/on top of them
- Allow your companion to spawn while you are standing still and score 1 hit
- Move your horse so that your companion dissapears
- Mob will now be targeting a non-existent entity
- Stand on top/near the mob and allow your companion to spawn and they can attack it at will.
Note: if you get off your horse it will cause the mob to resume attacking, and sadly you can not get on your horse during battle.