Luck

Luck is a status effect that makes it more likely to receive better loot from certain loot tables, contrary to Bad Luck.

Effect
Adds 1 × level to attribute, making loot table entries with a high   score more likely, and entries with negative   less likely. It also increases the chances of  occurring. Currently, only fishing uses. The new weight of each entry is. Negative levels decrease luck.

Using a fishing rod enchanted with Luck of the Sea increases a player's  attribute, but doesn't actually grant the Luck status effect.

Luck will not do any of the following things, Decrease mob spawning, make structures generate more often, increase critical hit chances(Critical hits are actually hitting someone in the air going up or down), make rare mobs more likely to spawn, increase wither skeleton or other mob drop chances, cure negative effects randomly, make arrows fly directly to the crosshair or cause projectiles to miss, make you survive on 1 hp.

Immune mobs
While no mobs, except bosses, are immune to Luck, only players are actually affected.

Trivia

 * Contrary to real-life superstition, a rabbit's foot has no effect on luck in the game.
 * Bedrock Edition has unused textures for Luck potions, despite the fact that Luck is not present in said edition.