Beta XII-A entity

Energy being that fed on hatred

A noncorporeal entity that fed on hostility and trapped Enterprise and Klingon crews in an endless, bloodless war to keep its food supply flowing.

The entity was a formless being of energy that drew sustenance from violent emotions such as fear and hate. It could alter minds, plant false memories and turn objects into weapons.
In Day of the Dove, it lured the Enterprise and a Klingon crew led by Kang to Beta XII-A with a false distress call, then trapped both groups aboard the ship. It replaced their weapons with swords, healed the wounded so the fighting never ended and kept the two sides equal in number. Kirk and Kang finally made peace and drove it off the ship with laughter.