Command blocks that contain commands that are only executed if an enemy hits it, or projectile, NPC, item, etc. Each block works for different objects. Like one for collisions when enemies hit it, and another for the projectiles, and NPCs. Get it? I would love this.