This smart turret can protect your house from monsters invasion. To spawn this turret, place 4 block of irons in a T-shape, standing upright. Place a Jack-O-Lantern on the top of the T after creating it.
This turret is also fire resistant. So, you can use it in the Nether. But be careful. If you hit this turret, It will identify you as a monster and will kill you right away.