When an enderman is about to get hit by a firework spawned by a player or dispenser, it does not teleport away, unlike when the enderman is about to get hit by a snowball, egg, ender pearl, arrow, trident, or fireball (large or small). Expected is that they treat the fireworks like ghast fireballs; they teleport away from direct impact, but they could still be damaged if they are close to the fireball explosion.
- Give yourself an explosive firework using the following command
- Light the firework at least one block under the enderman via placing it or using a dispenser. Alternatively you can also shoot one directly at an enderman using a crossbow.
The enderman will not teleport away, and instead take damage while glitching out.