{{dungeons hatnote}} {{About|the gameplay mechanic|the command|Commands/difficulty}}
[[File:Skeleton Golden.png|thumb|right|300px|Mobs in full armor are a common sight in higher difficulty levels.]]
'''Difficulty''' is an [[option]] in ''[[Minecraft]]'' that has a direct impact on the ease of [[gameplay]], allowing the game's challenges to be tailored to the [[player]]'s skill level.
== World settings ==
[[File:DifficultyButton.gif|right]]
[[File:Difficulty.png|thumb|260px|The difficulty button in the options menu.]]
There are four difficulty levels in the game: Peaceful, Easy, Normal, and Hard. These can be changed when creating a world, in the pause menu [[options]], as well as with the {{cmd|difficulty}} command.
While the difficulty settings modify the challenge in [[Survival]] mode, they also affect hostile mobs in [[Creative]] mode the same as in Survival; for example:
* Hostile mobs cannot spawn naturally in Creative Peaceful.
* [[Zombie]]s have the same difficulty-dependent chances as in Survival to convert villagers into [[zombie villager]]s (0% in Creative Easy, 50% in Creative Normal, 100% in Creative Hard).
* Hostile mobs killed by [[Tutorials/Mob grinder|mob grinders]] in farms drop higher-value items in Creative Hard.
[[Survival]] mode is affected by difficulty as described in the sections below.
=== Peaceful ===
No [[hostile mob]]s can spawn naturally, except for [[shulker]]s, [[hoglin]]s, [[piglin]]s, [[piglin brute]]s{{Only|BE|short=1}}, and the [[ender dragon]]. No [[spider]]s, [[cave spider]]s, [[zombified piglin]]s, [[endermen]], or [[drowned]] – [[Mob#Neutral mobs|neutral]] rather than hostile mobs – can spawn naturally. When any of these mobs attempt to spawn (whether naturally, through [[monster spawner]]s, [[spawn egg]]s, or [[commands]]), they are removed from the game instantaneously. [[Skeleton horse]]s are also not able to spawn naturally.{{bug|MC-230843|||Invalid}} All mobs that can spawn (such as shulkers, piglins, or [[wolves]]) are completely peaceful and unable to harm the player - with the exception of the ender dragon. Additionally, [[sculk shrieker]]s do not give the [[Darkness]] effect because it can't spawn the [[warden]]. 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 [[Health#Death|die]] if damage is received quickly enough. [[TNT]] deals no direct damage to the player, but it does give knockback still, meaning a player can be killed by it if it launches them too far upward. The [[hunger bar]] never depletes; {{in|Java}}, players therefore cannot eat anything except [[golden apple]]s, [[chorus fruit]]s, [[milk bucket]]s, [[honey bottle]]s, and [[suspicious stew]], unless the player switched to Peaceful when their hunger bar was below the maximum. Players can eat normally {{in|Bedrock}}. Additionally, if the hunger bar is below the maximum, it regenerates quickly.
If a player is in a village with [[Raid Omen]] and the effect ends, [[raid]]s cannot be triggered at all as [[illager]]s (including [[evoker]]s and [[vindicator]]s) cannot spawn in peaceful difficulty.
Because of the gameplay changes and the absence of many mob types, many blocks and items are unavailable to the player. A list can be found at [[Non-renewable resource#Peaceful difficulty]]. In addition, the player is unable to get many [[advancement]]s and [[achievement]]s.
Dispensers are unable to place [[wither skeleton skull]]s even if the required blocks for summoning a [[wither]] are available.
One major effect of the lack of certain resources is that [[end portal]]s cannot be activated by the player in Peaceful difficulty, because it is impossible to acquire the [[eyes of ender]] necessary to activate an end portal. An eye of ender requires [[blaze powder]] to craft, which can be crafted only from [[blaze rod]]s; but a blaze rod can be obtained only as a drop from a [[blaze]], which is a hostile mob that cannot spawn in Peaceful. However, it is possible to switch to a non-Peaceful difficulty, let blazes spawn, kill enough for crafting eyes of ender, and switch back to Peaceful. It is also possible for an end portal to be activated by naturally generating with an eye of ender already embedded within all 12 end portal frames. For any given end portal, there is a 1 in a trillion chance of this happening.Since each end portal frame has a {{fraction|1|10}} chance of being filled, there is a ({{fraction|1|10}})12 = {{fraction|1|1 trillion}} chance of all 12 end portal frames being filled.
However, because of the huge number of possible seeds, over 8 million seeds are known to generate such end portals.https://github.com/hube12/SSGOutput/releases/tag/1.1
=== Easy ===
Hostile [[mob]]s spawn, but they deal {{frac|1|2}} of the damage they would on Normal difficulty plus {{hp|1}}. The hunger bar can deplete, damaging the player until {{hp|10}} remain if it drains completely. [[Cave spider]]s and [[bee]]s cannot poison players on Easy difficulty, and the [[wither]] does not cause the [[Wither (status effect)|Wither effect]], although [[wither skeleton]]s do. [[Lightning]] sets only the struck block on fire, not surrounding blocks. [[Zombie]]s do not break down doors, and do not turn [[villager]]s into [[zombie villager]]s. [[Zombie]]s and [[skeleton]]s do not wear full sets of armor. Hostile [[mob]]s like zombies, skeletons, [[spider]]s, [[husk]]s, and [[stray]]s deal about {{hp|1}} or {{hp|2}} damage.
If a player is in a village with [[Raid Omen]] and the effect ends, it triggers a raid that consists of 3 waves (4 waves if a player with a Raid Omen effect that is higher than one level enters a village.)
=== Normal ===
Hostile [[mob]]s spawn and deal standard damage. The hunger bar can deplete, damaging the player until {{hp|1}} remains if it drains completely. Zombies do not break down doors, but villagers killed by zombies have a 50% chance of turning into [[zombie villager]]s. Zombies and skeletons rarely wear sets of enchanted armor. [[Vindicator]]s can break doors.
If a player is in a village with [[Raid Omen]] and the effect ends, it triggers a raid that consists of 5 waves (6 waves if a player with a Raid Omen effect that is higher than one level enters a village.)
=== Hard ===
Hostile [[mob]]s deal approximately 1{{frac|1|2}} times the damage they would deal on Normal difficulty, and in some cases drop higher-value items when killed. The hunger bar can deplete, not only damaging but also killing the player if it drains completely. [[Zombie]]s can break through wooden [[door]]s and can spawn [[Zombie#Reinforcements|reinforcement]]s when attacked. {{IN|Java}}, [[spider]]s can spawn with a beneficial status effect ([[Speed]], [[Strength]], [[Regeneration]], or [[Invisibility]]), with these effects having an infinite duration. Villagers killed by zombies always turn into zombie villagers. [[Pillager]]s spawn near the player, with their attacks dealing {{hp|4}} damage. {{IN|Bedrock}}, if the world type is infinite, they deal {{hp|5}} damage.
If a player is in a village with [[Raid Omen]] and the effect ends, it triggers a raid that consists of 7 waves (8 waves if a player with a Raid Omen effect that is higher than one level enters a village.)
=== Hardcore mode ===
daytime + (dayNumber * 24,000)
. This is ''not'' the same as the actual playtime in the world (the value from {{cmd|time query gametime}}). It affects the regional difficulty after the first 3 in-game days, and has no additional effect after 63 in-game days.
In pseudocode, the calculation of regional difficulty is:
# DaytimeFactor, ChunkFactor, and RegionalDifficulty are floating-point variables
# MoonPhase is as in the table above.
if (difficulty is Peaceful) return 0
if (TotalDaytime > 63 in-game days) DaytimeFactor = 0.25
else if (TotalDaytime < 3 in-game days) DaytimeFactor = 0
else DaytimeFactor = (TotalDaytimeInTicks − 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 > DaytimeFactor) add DaytimeFactor to ChunkFactor
else add (MoonPhase ÷ 4) to ChunkFactor
if (difficulty is Easy) multiply ChunkFactor by 0.5
RegionalDifficulty = 0.75 + DaytimeFactor + ChunkFactor
if (difficulty is Normal) multiply RegionalDifficulty by 2
if (difficulty is Hard) multiply RegionalDifficulty by 3
return RegionalDifficulty
The raw regional difficulty therefore is always 0.0 on Peaceful and ranges from 0.75 to 1.5 on Easy, 1.5 to 4.0 on Normal, and 2.25 to 6.75 on Hard.
=== Clamped regional difficulty ===
[[File:Regional difficulty to Clamped regional difficulty.png|thumb|325px|How ''clamped regional difficulty'' relates to ''regional difficulty'']]
The '''clamped regional difficulty''' (also known as '''special multiplier''') also 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 [[#Other effects|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, where regional difficulty is between 1.5 and 4.0, the clamped value can be anywhere from 0.0 to 1.0. On Hard, where the regional difficulty is never lower than 2.25, the clamped value is always at least 0.125.
On Normal, the effects reach the maximum after {{convert|63|in-game day|game tick}} in a fully-inhabited chunk on a full moon; and on Hard after 63 in-game days the effects reach the maximum in chunks inhabited {{frac|4|1|6}} hours during a full moon and remain at maximum in chunks inhabited over {{frac|16|2|3}} hours.{{verify|is this paragraph talking about clamped or nonclamped?|type=current}}
== Effects ==
=== Mob damage ===
{{:Damage/Mobs}}
=== Other effects ===
{| class="wikitable col-1-left col-2-left" style="text-align:center" data-description="Attributes by conditions"
! rowspan="2" | Attribute
! rowspan="2" | Notes
! colspan="4" | Condition
|-
! World difficulty
! Regional difficulty (RD)
! Clamped regional difficulty (CRD)
! Moon phase only
|-
| {{hp|1|notag=1}} Mobs and explosions do higher damage to players.
| Peaceful: No damage
Easy: {{frac|1|2}} of Normal damage + 1 (never higher than Normal damage)
Hard: {{frac|1|1|2}} times Normal damage
| {{tc|Yes}} || {{tc|No}} || {{tc|No}} || {{tc|No}}
|-
| {{EntitySprite|guardian}} Guardians (both types) have higher laser magic damage.
| Hard: + {{hp|2}}, added before calculating the difficulty-scaled mob damage
| {{tc|Yes}} || {{tc|No}} || {{tc|No}} || {{tc|No}}
|-
| {{EffectSprite|Hunger}} Starvation more harshly affects health.
| Easy/Normal/Hard: starvation brings health down to 10/1/0 HP
| {{tc|Yes}} || {{tc|No}} || {{tc|No}} || {{tc|No}}
|-
| {{ItemSprite|diamond-chestplate}} Mobs that spawn with armor are more likely to have more armor.
| Easy & Normal: 75%/56%/42% of having 2/3/4 pieces;
Hard: 90%/81%/73% of having 2/3/4 pieces
| {{tc|Yes}} || {{tc|No}} || {{tc|No}} || {{tc|No}}
|-
| {{ItemSprite|diamond-sword}} Zombies are more likely to spawn with weapons.
| 1% on Easy and Normal,
5% on Hard
| {{tc|Yes}} || {{tc|No}} || {{tc|No}} || {{tc|No}}
|-
| {{ItemSprite|golden-helmet}} Zombies are able to spawn reinforcements.
| Hard only
| {{tc|Yes}} || {{tc|No}} || {{tc|No}} || {{tc|No}}
|-
| {{ItemSprite|oak-door}} Zombies are more likely to be able to break wooden doors.
| A zombie having the ability to break a door: (10×{{tooltip|CRD|Clamped Regional Difficulty}})%