Tutorials/Shelter defense

Non-explosive resistant houses
If your house isn't made of one, you should always have a moat, a man made lake, or something of that sort around your shelter to protect from creepers.

To make a moat you can dig a 2 wide and 3 deep row that stretches along the perimeter of your house. Depending on how deep your moat is, as well as the availability of water (which should be available), sometimes it is not a good idea to fill your moat with water. Mobs can swim, making your work useless. You could also fill your moat with Lava, but lava is a bit expensive (due to availability and you cannot make an infinite lava source) and you will lose all mob droppings in the lava. It can also be dangerous for yourself, if you somehow fall in.

Alternatively, make a fence with iron bars; it defends the house and catches the explosion.

Explosive resistant houses
Explosive resistant houses are fairly easy to build, and aren't extremely expensive. However, they can be time consuming, depending on the materials used. Stone or Cobblestone is an easy, cheap way to build a home, but it can be destroyed by an explosion close by. A home made out of Bricks is as the same effective as cobblestone against explosions, but is expensive and very time consuming. Clay and a Furnace are required to make bricks, but you must have a good supply of Clay. The choice between using brick and cobblestone is solely aesthetic. Obsidian is another blast-resistant block, but is extremely expensive and hard to modify your house once built. Explosive resistant houses can be pointless if your house is small and you have a good supply of light for the area. You can also use End Stone, the most explosion resistant block after Obsidian and Bedrock, but to do this, you must have reached the End and defeated the Enderdragon.

Other houses
You should have many windows, so as to be aware of any Mobs around. Light your houses and surrounding area well! It is suggested to have an automatic door and protect the surrounding area with a minefield.

Security
It can come in handy if you have some security systems up. Here are some ideas:

• Alarm, to make a alarm you will need: First, place pressure plate(s) around an area you would like to protect, try to keep them separated as much as possible (optional). Then attach the note block(s) to the pressure plate(s) with redstone wire. From now on, whenever a mob or a player walks on a pressure plate(s) the note blocks will generate a sound notifying you.
 * At least 1 pressure plate
 * Lots of redstone
 * At least 1 note block

• A self destruct system might be useful, to prevent others in SMP from stealing your belongs. For this to work, the TNT has to be concealed in a wall, and there should be redstone (that is concealed) attached to a button to activate the TNT. It is also recommended that you have a blast-proof room where you store/hide in before you activate the self destruct. The button should also be in this room.

• If you have a lot of iron ingots and pumpkins, then you can make the perfect defense. Iron Golems have 50 hearts and can kill most mobs in 1-2 hits. Make sure to keep them near your house though; as they may wander away. To prevent this, put the iron golems inside of a trench surrounding your house. The trench should be 2 wide and at least 4 deep, otherwise the golems will fling mobs back out of the trench.

You could use dispensers to defend your home but that would mean gathering lots of arrows and string, but you could if the mobs fell in a moat and then stepped on pressure plates

Snow golem towers
To prevent any mobs getting near you, you can put some towers with snow golems behind a hole with lava, the snow golems will throw snowballs at the mobs and they will fall into the lava. This will NOT work with skeletons because they don't need to be near in order to attack.

Note:
 * Snow golems will die in rain so be sure to make a roof.