Turret egg places a turret that wont move, even if you put it in mid-air or on a wall. it shoots at nearby players and does a decent amount of damage. if you want to be safe from you own turrets, just run these two commands in your chat before you place the turrets:
/scoreboard teams add Team1 Team1
/scoreboard teams join Team1 <your username>
Have Fun!