Quote from Byteandahalf
Make yourself a method that can constantly get the difference between their relative position, and use Entity.setVelX(), Y(), and Z(), to move them toward each other, and use Entity.setHealth() to have them hurt each other, also, have some sound effects with Level.playSoundEnt();
I know everything else besides how I test their relative position. I haven't made a script in a long time need help and reminders... I feel stupid lol.. just please show me your idea of it... sorry I keep asking questions..