Guardian

The Guardian is a hostile mob first introduced in 1.8. It is hostile and only spawns underwater, in Water Dungeons. Its eye will always look toward the camera.

The Guardian spawns in Water Dungeons. It also has a larger grey mini-boss variant called the Elder Guardian that spawns 3 times in set sections of the dungeon. When approaching a dungeon, a ghostly image appears of the Elder and the player is given Mining Fatigue III for 5 minutes. The effect will be restarted seconds after it wears off until all three Elders are defeated, the purpose of this being to protect the treasures (Gold Blocks And Wet Sponges) of the dungeon from being mined until after the dungeon has been fully conquered, as well as to prevent players from simply mining through the dungeon to cheat.

The Guardian attacks by sending out a large laser beam which harms the player. In addition, Guardians can target and damage players who are riding in boats; however once the player is out of range, the Guardian's laser will disengage from the player, and deal no damage.

Behavior
Guardians will swim around in water, attacking any players or squids that come into sight. They swim in abrupt charges, moving their tail rapidly when doing so. Unlike squids, Guardians will not die outside of water, instead they will jump and flail around, making wet, squishy noises. They will quickly move towards the nearest water source, at which point they swim away. When swimming, their spikes retract and they don't deal damage when attacked. Guardians are also resistant to lava and fire.

Guardians' eyes will follow and stare at any nearby players, and will always look directly at who they're attacking. This makes them the first mob with dynamic eyes.

Attacking
The Guardian has two methods of attack, firing its laser and a thorn-like attack. The laser takes several seconds to charge, doing no damage in the meantime, and changing from purple to bright yellow. Once charged, the beam abruptly ends and deals damage. The Guardian will swim around for a few seconds before firing again. If the target comes near the Guardian while it is firing its beam, it will stop firing and swim away until it is at a comfortable range, at which point it will continue attacking. The beam cannot be dodged, but can be obstructed by solid blocks. The Elder Guardian, when near, will give you Mining Fatigue III for 5 minutes.

Guardians also have spikes on their bodies. Although these spikes don't do any direct damage upon contact or as a melee attack, they act similar to the Thorns enchantment. The Guardians can extend and retract their spikes. If a player attacks the Guardian when its spikes are extended, the player takes a small amount of damage.

Combat
Guardians are very resistant to melee attacks when under water, as the player will not be able to quickly approach the Guardian due to the water's slowing effect. Guardians will swim away when approached by a player it is targeting, and the Guardian will deal 1 heart of damage every time it is hit when its spikes are extended. If cornered, the Guardian will usually extend its spikes and fire at the player, even at point blank range.

The Guardians are resistant to fire damage, but if somehow are brought to land, they might take some fall damage from their swift movement.

If the player must fight a Guardian with melee, they should try to corner it and hope for the best, or else try to maneuver it into swimming within melee range repeatedly.

The Guardian cannot shoot as fast as a player with a bow can, so a skilled player will be able to shoot the Guardian, and then hide to break the beam's lock, repeating until the Guardian is dead. If the Guardian is in shallow water the player can use a fishing rod to pull it out of the water onto land where the players can then kill it with melee without being shot at or hurt by the spikes.

The Elder Guardian has a very large amount of HP (80) and can also inflict Mining Fatigue III for 5 minutes, making melee attacks even harder. Elder Guardians do more damage than regular Guardians. Diamond equipment enchanted with Respiration and Depth Strider, swords and bows are recommended.

Fighting Guardians is incredibly dangerous without armor. Armour is essential to combating Guardians, especially within the Water Temples. Entering their territory without armor will almost always lead to a swift death, even if armed with a sword or bow and arrow.

Trivia

 * After Giants and Iron Golems, Elder Guardians have the most health points out of any non-boss mob.
 * Elder Guardians spawned with the /summon command start with only 30 HP, the same as a normal Guardian.
 * To spawn the Elder version, use
 * An easier way of spawning it is by using