Guardian

The Guardian is a hostile mob. It only spawns underwater in ocean monuments. Its eye will always look towards the viewpoint of a nearby player. It also has a larger, grey, mini-boss variant called the Elder Guardian.

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.

Appearance
The Guardian resembles an cyclopean pufferfish-like creature, characterized by a single, red eye in the center of its face that follows the player, and has no visible mouth. Its main body is colored similarly to prismarine bricks. Protruding from this portion are 12 orange spikes that can extend out retract from of the body. It also has a tail which ends in a large fin, which it uses as a method of propulsion while swimming.

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. When not swimming they sink.

Guardians' eyes will follow and stare at any nearby players, and will always look directly at who they're attacking. This happens because the "head" part of the mob's model is what we see to be the eye, similar to creeper's heads turning toward you. This gives the illusion of a dynamic eye.

When out of water, Guardians will angrily squeak at the player while flopping about. They do not suffocate in air and can live indefinitely out of water.

Attacking
The Guardian has two methods of attack, engaging a laser-like beam and a thorn-like attack. The beam takes several seconds to charge, doing no damage while doing so, and changes from purple initially to bright yellow when fully charged. Once charged, the beam abruptly disappears 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, as it follows the player, but can be obstructed by solid blocks, and has a range of approximately 14 blocks.

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 slowing effect of the water. Guardians will swim away when approached by a player it is targeting. 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 it's laser at the player, even at point-blank range.

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

If the player(s) must melee a Guardian, they should try to corner it and hope for the best; or else try to trick 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(s) can use a fishing rod to pull it out of the water where the player(s) can then kill it using melee attacks without being shot at or hurt by the spikes. (The Guardian can still shoot while out of water, but unless it's held still, it flops around too much to keep the target in range.)

Fighting Guardians is incredibly dangerous without armor. Armor is essential to combating Guardians, especially within an ocean monument. Entering their territory without armor will almost always lead to a swift death, even if armed with a sword or bow and arrows.

Farming
Since the ocean monuments usually spawn with a large space underneath them, the new sponges can remove the water in this area and walls can be built to keep it from re-flooding. Then the monument can be restructured to optimize spawn rates and the floor of the monument (or ceiling of the dry room underneath) can be replaced with signs. Iron golems can be placed in the dry room to kill the falling Guardians and hoppers to collect the loot.

This video shows an approach to this idea also, this video shows a much more advanced method of farming guardians. Although this farm is fully automatic, it has its disadvantages as well: It is extremely hard to build, as a wall has to be constructed underwater with the guardians constantly attacking and the Elder Guardians constantly causing Mining Fatigue; requires extreme amounts of iron for massive amounts of iron golems and hoppers; and the iron golems will eventually die of spike damage.

Trivia

 * Guardians' eyes will still follow a completely unarmored player under the effects of a Potion of Invisibility, but won't attack them. Guardians will still attack squids under that same potion effect though.