Game mode

A game mode dictates how a player may interact with a Minecraft world.

List of game modes


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 five:


 * Survival
 * Creative
 * Adventure
 * Spectator
 * Hardcore

Demo mode, which may also be counted as a game mode, is Survival with the  attribute, which defines if the game is from a trial version or not.

True game modes
The following game modes are controlled by the "gameType" variable, and all/some are accessible in-game via the command as well as the game mode switcher.

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 a oxygen bar when underwater, suffocating, or in lava. 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 a death message. Maximum reach is 5 blocks.

Creative
The player has access to an infinite amount of almost all blocks and items available, and can destroy them instantly. Players are invulnerable, unless they fall into the void, and do not have health, armor, or hunger, and can fly. The player has access to items not available in Survival mode, e.g. spawn eggs. The player cannot see command blocks if they look through the Creative GUI - they need to spawn command blocks with the or  commands. Max reach is 6 blocks.

Adventure
Players can interact with objects such as levers and buttons, and can interact with mobs. However, they can break blocks only with tools having a CanDestroy data tag, and place blocks only if the block they are holding has a CanPlaceOn data tag, making this mode good for adventure maps. Max reach is 5 blocks.

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

$$, the player can enter the perspective of other entities by left-clicking on them, and are invisible to all players and mobs except for other spectators. When in third-person mode, they look like a transparent, floating head with no body. The player can use the scroll wheel to adjust the speed at which they are flying, unlike flying in Creative mode.

$$ however, you can access this gamemode by typing, Creative is  , Adventure is  , and Spectator is. Hardcore is Survival with the addition of  (a normal world uses   instead). This knowledge allows hacking to change game modes by editing the world's level.dat.