Guardian

The Guardian is an underwater hostile mob.

Spawning
Guardians only spawn naturally in and around ocean monuments. They require water to spawn. Specifically, they can only spawn if the spawning block and the block below the spawning block are water (regardless of stationary water or flowing water), and the block above the spawning block has no collision mask (air, water, sign, etc.).

Guardians spawn less often in ocean open to the sky than they do in covered areas (i.e. inside the monument). Specifically, spawning will fail 95% of the time if the spawning water block is below sea level (Y=63 by default), all blocks between the spawning water block and sea level are liquid or fully transparent, and the block at sea level has a view of the sky. Above sea level, spawning will fail 95% of the time if the spawning water block has a view of the sky.

Drops
Guardians drop 0 to 2 prismarine shards. Looting increases the maximum prismarine shard drop by one per level.

Additionally, the guardian has a 40% chance of dropping a raw fish, a 40% chance of dropping a prismarine crystal instead, and a 20% chance of dropping neither. The maximum drop count is increased by one per level of Looting.

Guardians have a 2.5% chance of dropping fish as a rare drop when killed by the player. The type of fish is the same as when fishing: 60% chance for raw fish, 25% chance for raw salmon, 2% chance for clownfish, and 13% chance for pufferfish. The chance of getting a rare drop is increased by 1 percentage point per level of Looting.

Guardians also drop 10 experience when killed by a player or tamed wolf.

Note that burning a guardian to death will not cook any dropped fish.

Behavior
Guardians swim around in water, attacking any players or squid that come into sight. They swim in abrupt charges, moving their tail rapidly when doing so. When swimming, their spikes retract. When not swimming they sink slowly and their spikes extend.

The guardian's eye follows and stares at any nearby players, and always looks directly at its target. The eye still follows a completely unarmored player under the effects of a potion of invisibility, but the guardian won't attack them. However, guardians still attack squids under that same status effect.

Stationary guardians can be pushed by flowing water, but swimming guardians cannot. When pushed horizontally they move significantly faster than other mobs pushed by water.

When out of water, guardians angrily squeak at the player while flopping about. They do not suffocate in air and can live indefinitely out of water. They always extend their spikes when out of water.

Combat
Guardians have two methods of attack: a laser and a defensive thorn like attack. Unlike most other hostile mobs, a guardian will not follow the player if they move out of sight. Instead, it will simply continue swimming until the player becomes visible again, and will then start to charge its attack.

The laser takes several seconds to charge, doing no damage in the meantime, and changing from purple to bright yellow (thus, acts like a warning indicator). Once charged, the beam abruptly ends and deals damage on normal difficulty. Guardians 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, and has a maximum range of approximately 15 blocks. Once the player is out of range, or if the beam is obstructed by solid blocks, the guardian's beam will disengage from the player, and deal no damage.

The guardian's laser is able to penetrate armor to some extent, making strong tiers of armor with enchantments even more essential. While a guardian does of damage (hard difficulty) to an unarmored player, it deals  to a player in diamond armor - one would expect that the attack would get reduced to  of damage. That means that while guardian attack stats do not look very impressive, it still deals more damage to players wearing armor than other mobs with higher stats, although using enchanted armor can still reduce damage further.

Guardians deal damage each time it is hit when its pufferfish-type spikes are extended. If cornered, the guardian will usually extend its spikes and fire at the player, even at point blank range.

Data values
Guardians have entity data associated with them that contain various properties of the mob. Their entity ID is.

Trivia

 * A guardian's eye is actually the "head" part of the mob's model. This gives the illusion of a dynamic eye.
 * Underwater, guardians emit deep, growl-like sounds, but on land they emit high-pitched squeaks. This probably reflects the fact that water can alter sounds.
 * Guardians' laser-beam attacks are affected by the potion of strength, which normally only affects melee attacks of mobs.
 * When placed or spawned on a slime block, guardians will start bouncing and continue, each bounce higher than the last, until each bounce brings the guardian to 17 blocks height.
 * In the texture file for the guardian, "jeb" is written in the bottom right corner.
 * If summoned with, the guardian's eye still follows the player.

Gallery
Wächter Guardián Gardien ガーディアン 가디언 Strażnik pt-br:Guardião Страж 守卫者