Difficulty



Difficulty is an option in Minecraft that has a direct impact on the ease of gameplay, tailoring your skills depends on difficulty.

World settings


There are four difficulty levels in the game: Peaceful, Easy, Normal and Hard. These can be set in the settings, as well as by the command.

Peaceful
No hostile mobs can spawn naturally, except for shulkers and the ender dragon, but they cannot deal damage to the player. Also, no spiders, cave spiders, zombie pigmen or endermen – neutral rather than hostile mobs – can spawn naturally. When any of these mobs attempt to spawn (whether naturally, through mob spawners, spawn eggs, or commands), they are removed from the game instantaneously. When the difficulty is switched from any other setting to Peaceful, all mobs that are not allowed to spawn on Peaceful are removed from the world. Players regain health rapidly over time. Despite this, it is still possible to die if damage is received quickly enough. The hunger bar never depletes and players cannot eat anything except golden apples, chorus fruits, and milk buckets unless the player has switched to Peaceful when their hunger bar was below the maximum $$. Players can eat normally though the hunger bar never depletes. Additionally, if the hunger bar is below the maximum, it quickly regenerates.

Easy
Hostile mobs spawn, but they deal less damage than on Normal difficulty. The hunger bar can deplete, leaving the player with if it drains completely. Cave spiders cannot poison players on Easy difficulty, and the wither does not cause the Wither effect, although wither skeletons do. Lightning sets only the struck block on fire, not surrounding blocks. Zombies do not turn villagers into zombie villagers.

Normal
Hostile mobs spawn and deal standard damage. The hunger bar can deplete, leaving the player with if it drains completely. Villagers killed by zombies have a 50% chance of turning into a zombie villager.

Hard
Hostile mobs spawn more and deal greater damage than on Normal difficulty. The hunger bar can deplete, and the player starves to death if it drains completely. Zombies can break through wooden doors and can spawn reinforcements when attacked. Spiders can spawn with a beneficial status effect (speed, strength, regeneration & invisibility) and these effects have an infinite duration $$. Villagers killed by zombies have a 100% chance of turning into a zombie villager.

Hardcore mode
At the world creation screen, selecting Hardcore from among the game mode options causes the player to spawn in Hard difficulty, does not allow it to be changed, and allows the player only one life. In a single player world, if the player dies, the player can choose to respawn in Spectator mode or delete the world. In Multiplayer, the player's gamemode automatically sets to Spectator mode upon the player's death.

The only way to change the difficulty of Hardcore is to use cheats and make it a LAN Server, or use an .NBT editor on the world's .NBT file.

Currently not available in the Realms.

Moon phase
The phase of the moon has effects on the spawning of slimes in swamp biomes, and contributes to the calculation of regional difficulty. The fuller the moon is, the greater the effect.

The moon does not actually have to be in the sky for this effect to take place, the moon exists in daytime and across dimensions.

Regional difficulty


Regional difficulty or local difficulty is a value between 0.00 and 6.75 that the game calculates by considering not just the world difficulty setting, but also the inhabited time of a chunk, the total play time in the world, and the phase of the moon. This value is shown on the debug screen as the first value listed after the heading "Local Difficulty". This value determines several aspects of the difficulty of gameplay (see below).

The inhabited time of a chunk increases for each tick a player spends with the chunk loaded. This is a cumulative measure of time—if 50 players spend a single hour in a chunk, it counts the same as if one player spent 50 hours there. The effect of inhabited time on regional difficulty is capped at 50 hours.

The total play time in the world is a factor that doesn't begin until after the first hour of play time, and is capped at 21 hours.

In pseudocode, the calculation of regional difficulty is: TotalTimeFactor, ChunkFactor, and RegionalDifficulty are floating-point variables MoonPhase is as in the table above.

if ( difficulty is Peaceful ) return 0

if ( TotalPlayTime > 21 hours ) TotalTimeFactor = 0.25 else if ( TotalPlayTime < 1 hour ) TotalTimeFactor = 0 else TotalTimeFactor = ( TotalPlayTimeInTicks - 72,000 ) / 5,760,000

if ( ChunkInhabitedTime > 50 hours ) ChunkFactor = 1 else ChunkFactor = ChunkInhabitedTimeInTicks / 3,600,000

if ( difficulty is Normal or Easy ) multiply ChunkFactor by 0.75

if ( MoonPhase / 4 > TotalTimeFactor ) add TotalTimeFactor to ChunkFactor else add MoonPhase / 4 to ChunkFactor

if ( difficulty is Easy ) multiply ChunkFactor by 0.5

RegionalDifficulty = 0.75 + TotalTimeFactor + ChunkFactor

if ( difficulty is Normal ) multiply RegionalDifficulty by 2 if ( difficulty is Hard ) multiply RegionalDifficulty by 3

return RegionalDifficulty

The raw regional difficulty therefore ranges from 0.0-0.0 on Peaceful, 0.75–1.5 on Easy, 1.5–4.0 on Normal, and 2.25–6.75 on Hard.

Clamped regional difficulty
The clamped regional difficulty is a value between 0.00 and 1.00 based on regional difficulty. This value is shown on the debug screen as the second value listed after the heading "Local Difficulty". This is yet another value that affects the difficulty of gameplay (see below).

The regional difficulty value is clamped as follows: if ( RegionalDifficulty < 2.0 ) { value = 0.0; } else if ( RegionalDifficulty > 4.0 ) { value = 1.0; } else { value = ( RegionalDifficulty - 2.0 ) / 2.0; }

Thus, on Easy, where regional difficulty is never higher than 1.5, the clamped value is always zero.

On Normal, the effects reach the maximum after 21 hours of play time in a fully-inhabited chunk on a full moon; and on Hard after 21 hours of play time the effects reach the maximum in chunks inhabited only $4 1/6$ hours during a full moon and remain at maximum in chunks inhabited over $16 2/3$ hours.