{{Redirect|Gamemode|the command|Commands/gamemode}}
{{About|how a player interacts with the world|the difficulty modes|Difficulty}}
A '''game mode''' dictates how a [[player]] may interact with a ''Minecraft'' [[world]].

== List of game modes ==
[[File:Gamemodes.gif|framed|right|Animation summarizing the game modes in ''Java Edition''.]]

The number of different game modes in ''Minecraft'' depends on the exact definition of a game mode. In practice, there are most commonly considered to be four. They are all controlled by the "gameType" variable, and all are accessible in-game via the {{cmd|gamemode}} command or the game mode switcher.{{only|java}}

=== Survival ===
{{main|Survival}}
In this mode, players have to gather all their materials to build, [[craft]] [[items]] and [[tools]] and gain [[experience]] points. There is a [[health]], [[hunger]], and [[armor]] bar, an [[inventory]], and also an [[Health#Drowning|oxygen bar]] when [[water|underwater]], [[suffocating]],{{only|bedrock|short=1}} or in [[lava]].{{only|bedrock|short=1}} If a player runs out of hearts (health), the player dies and returns to the [[spawn]] point. Upon death, the player emits smoke, loses all experience and items, and leaves a [[death message]] explaining how the player died. Max reach is 5 blocks.

[[Demo Mode]], which may also be counted as a game mode, is Survival with the <code>--demo</code> attribute, which defines if the game is from a trial version or not.

=== Creative ===
{{main|Creative}}
The player has access to an infinite amount of almost all [[block]]s and [[item]]s available, and can destroy them instantly. Players are invulnerable, unless they fall into the void,{{only|java}} and do not have health, armor, or hunger, and can [[flying|fly]]. The player has access to items not available in Survival mode, e.g. [[spawn egg]]s. The player cannot see command blocks if they look through the Creative GUI - they need to spawn command blocks with the {{cmd|give}} or {{cmd|setblock}} commands. Alternatively, the [[Operator Items Tab|Operator Utilities]] Tab can be turned on via the Controls Tab in Options, containing command blocks.{{only|java}} Max reach is 6 blocks.

=== Adventure ===
{{main|Adventure}}
Players can interact with objects such as [[lever]]s and [[button]]s, and can interact with [[mob]]s. However, they can break [[blocks]] only with [[tool]]s having a {{cd|CanDestroy}} data tag, and place blocks only if the block they are holding has a <code>CanPlaceOn</code> data tag, making this mode good for adventure maps. Max reach is 5 blocks.

=== Spectator ===
{{Main|Spectator}}
When in Spectator mode, players can clip through blocks and fly freely. The player can't interact with blocks, entities or their inventory.

Spectators are invisible to all players and mobs except for other spectators. When in third-person mode, a spectator looks like a transparent, floating head with no body. The player can use the scroll wheel to adjust the flying speed, unlike flying in Creative mode.

{{IN|java}}, the player can enter the perspective of other entities by left-clicking on them.

=== Other game modes ===
==== Default ====
{{exclusive|bedrock|section=1}}

The "Default" game mode can be accessed by typing {{cmd|gamemode default}}, which sets the player's game mode to the world's default game mode. This corresponds the game mode set in the [[Create New World]] menu under "Default Game Mode".

==== Invalid game mode ====
{{exclusive|bedrock|section=1}}

Any invalid game mode is a mix of [[Creative]] mode and [[Survival]] mode. They are accessible only using [[Tutorials/Programs and editors|third-party software]]. They cannot be accessed using {{cmd|gamemode}}.

Like [[Creative]] mode, the player has the ability to fly, cannot take any damage and is not affected by [[hunger]]. Despite this, [[health]] and [[hunger]] bars are still visible. [[Tool]]s have infinite durability and can't break.

The [[Inventory#Creative inventory|inventory]] is like the one in [[Creative]] mode, except one cannot take blocks or items from it.

=== Game states ===
Game states modify the way the player plays the world. These are [[Hardcore]] [[Modes|Mode]] & [[Demo]] [[Modes|Mode]]. [[Demo]] [[Modes|Mode]] is only available in [[Java Edition]].

==== Hardcore ====
{{main|Hardcore}}
In this mode, which plays in the same way as Survival mode, the difficulty level is locked to "Hard", and when the player dies, they are unable respawn and must either delete the map or permanently switch to [[Spectator]] mode, effectively preventing them from interacting with the world ever again.

Hardcore is not technically a game mode, but rather a game mode modifier, as it cannot be enabled with the {{cmd|gamemode}} command. However, without cheating, it is possible to get only "Hardcore Survival". To obtain "Hardcore Creative" mode, the player must edit the game world with external tools, or opening to LAN, and turning on cheats. There is almost no visible difference between "Hardcore Creative" and "Non-Hardcore Creative". Because of this, "Hardcore" usually refers to "Hardcore Survival". On a server, a player who dies gets put into [[Spectator]] mode, while all other players remain in Survival mode. When looking at a Hardcore singleplayer world, the game mode is "Hardcore Mode!" and the color is red.

{{IN|BE}}, hardcore mode is a toggle, that locks the game mode to Survival and the game's difficulty to Hard. When looking at a Hardcore singleplayer world, the game mode is Survival-Hardcore.

==== Demo mode ====
{{main|Demo Mode}}
Demo Mode functionally serves to allow the [[player]]s to try out the game before deciding to buy ''Minecraft''. It allows players to play on a single world for a 100-minute (5 in-game days) period before the map is locked and required to be reset. The game is locked to [[Survival]] mode and cheats are off by default. While the demo version does not expire, it comes with certain restrictions, by others, as its sole purpose is to allow new players to try out ''Minecraft''.

Demo Mode is not technically a game mode as it cannot be enabled with the <code>/[[Commands/gamemode|gamemode]]</code> command.

=== Summary ===
Below is a brief summary of the different available features in each game mode.

{| class="wikitable sortable" style="width: auto; text-align: center; font-size: smaller" data-description="Game mode features"
!'''Feature'''
![[Survival]]
![[Creative]]
![[Adventure]]
![[Hardcore|Survival (Hardcore)]]
![[Spectator]]
|-
! Available in Demo
| {{tc|partial|only singleplayer<ref group="fn" name="demo" />}}
| {{tc|never|no}}
| {{tc|never|no}}
| {{tc|never|no}}
| {{tc|never|no}}
|-
! [[Multiplayer]]
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
|-
! [[Crafting]]
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|no}}
|-
! [[Smelting]]
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|no}}
|-
! [[Brewing]]
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|no}}
|-
! [[Enchanting]]
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|no}}
|-
! [[Flying]]
| {{tc|no}}
| {{tc|yes}}
| {{tc|no}}
| {{tc|no}}
| {{tc|yes}}
|-
! [[Inventory]]
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|partial}}
|-
! [[Health]]
| {{tc|yes}}
| {{tc|partial|Hidden<ref group="fn" name="creative-health" />}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|partial|Hidden<ref group="fn" name="creative-health" />}}
|-
! Respawn after death
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|partial|After death you can only enter Spectator Mode or return to the title screen}}
| {{tc|yes}}
|-
! [[Block]] placing/breaking
| {{tc|yes}}
| {{tc|yes}}
| {{tc|partial|No, unless the player has a CanPlaceOn data tag}}
| {{tc|yes}}
| {{tc|no}}
|-
! [[Mobs]]
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
|-
! Maximum amount of blocks (so far)
| {{tc|partial|Partial<ref group="fn" name="survival-blocks" />}}
| {{tc|yes}}
| {{tc|no}}
| {{tc|partial|Partial<ref group="fn" name="survival-blocks" />}}
| {{tc|no}}
|-
! [[Daylight cycle]]
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
| {{tc|yes}}
|-
! [[Cheats]]
| {{tc|partial|preset to no, but changeable}}
| {{tc|yes}}
| {{tc|partial|preset to no, but changeable}}
| {{tc|no}}
| {{tc|yes}}
|-
! Preset difficulty
| {{tc|no}}
| {{tc|no}}
| {{tc|no}}
| {{tc|yes}}
| {{tc|no}}
|-
! [[Hunger]]
| {{tc|partial}}<ref group="fn" name="hunger" />
| {{tc|no}}
| {{tc|partial}}<ref group="fn" name="hunger" />
| {{tc|yes}}
| {{tc|no}}
|-
! Can phase through blocks
| {{tc|no}}
| {{tc|no}}
| {{tc|no}}
| {{tc|no}}
| {{tc|yes}}
|}

{{notelist|fn|notes=
<ref name="survival-blocks">In Survival, there are methods to obtain unlimited amounts of specific [[renewable resources]] such as [[logs]], [[cobblestone]], and [[water]]. In addition, the vast map area allows one to gather plenty of anything with enough effort.</ref>
<ref name="creative-health">In Creative or in Spectator, health is still there but hidden from GUI, the player can show this by falling into the [[void]].</ref>
<ref name="demo">Demo Mode allows gameplay of only the Survival game mode without a premium account, and only in singleplayer. This does have a time limit though.</ref>
<ref name="hunger">Hunger mechanics are implemented, but only kill the player if the difficulty is set to Hard mode and do not affect players on Peaceful.</ref>
}}

== Changing game mode ==
The [[command]] {{cmd|gamemode}} can be used to switch between true game modes. For example, {{cmd|gamemode creative}} puts the player into Creative mode. As hardcore is handled differently, it cannot be set via commands.

{{IN|java}}, a player with operator permissions on a server or [[cheat]]s enabled is able to open a GUI by pressing {{key|F3}} and {{key|F4}}, which then allows the player to cycle through the four available game modes available with {{cmd|gamemode}} by pressing {{key|F4}}.

{{IN|bedrock}}, the game mode can also be changed by quitting the world, going to Edit World, tapping either Creative or Survival, and then returning to the game if cheats are enabled.

== Data values ==
In the <samp>[[level.dat]]</samp> file, Survival mode is <code>gametype=0</code>, Creative is <code>gametype=1</code>, Adventure is <code>gametype=2</code>, and Spectator is <code>gametype=3</code>. Hardcore is Survival with the addition of <code>hardcore=1</code> (a normal world uses <code>hardcore=0</code> instead). This knowledge allows hacking to change game modes by editing the world's level.dat.

== See also ==
* [[Gameplay]]

== External links ==
* [https://help.minecraft.net/hc/en-us/articles/360058743992-All-Game-Modes-in-Minecraft All Game Modes in Minecraft] – [[Minecraft Help Center]]

== Navigation ==
{{Navbox game modes}}

[[de:Spielmodus]]
[[es:Modo de juego]]
[[lzh:法]]
[[pt:Modo de jogo]]
[[uk:Ігрові режими]]
[[zh:游戏模式]]
