Difference between revisions of "Commands"

From Mine Blocks Wiki
Jump to navigation Jump to search
If you find a typo, inconsistency, or error, please sign up and help out the wiki! We can't do it without your help! :D Thank you!

(Added more info to the give command, and gave each command a section.)
m (Re-added the separators)
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Commands, or Cheats, is a way in Mine Blocks (and Minecraft) to obtain resources or change variables. The custom way to activate them (if cheats are on) is to press the " / " button.
+
__NOTOC__
  
==Commands==
+
Commands (also known as Cheats) are scripted codes that the player can write in the game console that change the game directly.
Here are a few commands to use when playing Mine Blocks:
 
  
===help===
+
==Using Commands==
Options:
+
In order to use commands, the world must have cheats enabled. This option can only be enabled on the world creation screen, and cannot be enabled after a world has already been created.
 +
 
 +
The default key binding for opening the command console is "T". This can be changed in the game settings. When the console is open, the player can write a command, and execute it by pressing Enter.
 +
 
 +
The command definition includes two different types of brackets. It's important to know the difference between them.
 +
* Parameters between the <code>&lt;</code> and <code>&gt;</code> brackets is a list of options, separated by <code>|</code> characters. For example, in <code>/gamemode <survival|creative></code>, you can either write <code>/gamemode survival</code>, or <code>/gamemode creative</code>.
 +
* Parameters between the <code>[</code> and <code>]</code> brackets is an optional parameter. When writing a command, you can omit the parameters. For example, in <code>/lightning [[~]x [~]y]</code>, you can simply omit the X and Y parameters like so: <code>/lightning</code>.
  
/help  =  Lists all the commands
+
Note that <code>[~]</code> is an optional modifier that can be added to coordinates, which makes it relative the player's location.
  
===gamemode===
+
==List of Commands==
Options:
 
  
/gamemode <1|creative> = Switch from Survival to Creative.
+
{| class="wikitable" class="wikitable" style="vertical-align:top; width:100%; background-color:#F2F2F2"
 +
|-----------------------------------------------------------------------------------------------------------
 +
!width="100"|Command
 +
!width="250"|Description
 +
!width="400"|Definition
 +
!Examples
 +
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===help===
 +
| ''This command is '''always available''', even if cheats are disabled.''
  
/gamemode <0|survival> = Switch from Creative to Survival.
+
Lists all of the possible commands.
 +
|
 +
<code>/help</code>
 +
|
  
===time===
+
|-----------------------------------------------------------------------------------------------------------
Options:
+
|
 +
===seed===
 +
| ''This command is '''always available''', even if cheats are disabled.''
  
/time set 1-100 ''Sets the time to a specific spot in the day/night''
+
Shows the seed number of the current world.
 +
|
 +
<code>/seed</code>
 +
|
  
/time set <day|night>
+
|-
 +
| colspan="4" style="text-align: center;"|
  
/time get ''Returns the time of day''
+
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===cheats===
 +
| ''This command will '''only exist''' if the world was created prior to 1.26.5 (when cheats were added to the game).''
  
===weather===
+
It allows players to permanently enable or disable cheats in their world.
Options:
+
|
 +
<code>/cheats <enable|disable></code>
 +
|
  
/weather set <clear|rain|thunder>
+
|-
 +
| colspan="4" style="text-align: center;"|
  
===xp===
+
|-----------------------------------------------------------------------------------------------------------
Options:
+
|
 +
===difficulty===
 +
| Sets the difficulty mode of the world.
 +
|
 +
<code>/difficulty <peaceful|easy|normal|hard></code>
 +
|
 +
*<code>/difficulty normal</code>
 +
*: Sets the game to normal difficulty
  
/xp add (amount) ''Gives you the amount of exp.''
+
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===enchant===
 +
| Applies and enchantment to the player's equipped item.
 +
|
 +
<code>enchant enchantment_id</code>
 +
* <code>enchantment_id</code>: See list of enchantment ID's here: [[Enchantment_table#Commands|Enchantments]]
 +
|
 +
* <code>/enchant Unbreaking4</code>
 +
*: Enchants the held item with the Unbreaking 4 enchantment.
 +
* <code>/enchant LuckOfTheSeaII</code>
 +
*: Enchants the held item with the Luck of the Sea 2 enchantment.
  
/xp (amount) ''Sets your xp bar to the amount specified.''
+
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===explode===
 +
| Creates an explosion.
 +
|
 +
<code>/explode size [[~]x [~]y]</code>
 +
|
 +
* <code>/explode 10</code>
 +
*: Performs a size 10 explosion at the player's location.
 +
* <code>/explode 5 ~ ~-3</code>
 +
*: Performs a size 5 explosion, 3 blocks below the player.
  
===gamerule===
+
|-----------------------------------------------------------------------------------------------------------
Options:
+
|
 +
===fill===
 +
| Fills a region of blocks with the specified block type
 +
|
 +
<code>fill block_type [~]x [~]y width height [(replace [replace_block_type])|keep|outline|hollow|destroy]</code>
 +
* <code>block_type</code>: The [[identifiers|identifier]] for the block to fill.
 +
* <code>[~]x [~]y</code>: The x and y coordinate to start filling from.
 +
* <code>width height</code>: How many blocks rightward (width) and upward (height) to fill.
 +
* <code>oldBlockHandling</code>: Different replacement algorithms:
 +
** <code>replace replace_block_type</code> will only fill blocks that match the replace_block_type.
 +
** <code>keep</code> will only replace air blocks.
 +
** <code>outline</code> will fill blocks on only the inner edge of the rectangle.
 +
** <code>hollow</code> will fill the inner edge and clear all blocks inside.
 +
** <code>destroy</code> replaces all blocks by mining them first.
 +
|
 +
* <code>/fill diamond_block ~-5 ~ 11 1 replace</code>
 +
*: Replaces the area under the player with diamond blocks.
 +
* <code>/fill air ~-10 ~-10 21 21 replace stone</code>
 +
*: Replaces stone around the player with air.
  
/gamerule <keepinventory|dodaylightcycle|dofiretick> <true|false> ''Toggle dropping all items upon dieing, or toggle if the day/night cycle runs, or the spread of fire and the burning of fire.''
+
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===gamemode===
 +
| Switches between the game modes.
 +
|
 +
<code>/gamemode <survival|creative></code>
 +
|
 +
*<code>/gamemode creative</code>
 +
*: Switches to creative mode
 +
*: <code>/gamemode 1</code> and <code>/gamemode c</code> will also work.
 +
*<code>/gamemode survival</code>
 +
*: Switches to survival mode.
 +
*: <code>/gamemode 0</code> and <code>/gamemode s</code> will also work.
  
===kill===
+
|-----------------------------------------------------------------------------------------------------------
Instantly kills the player.
+
|
 +
===gamerule===
 +
| Sets global variables in the game world, such as the ability for players to keep their inventory when they die.
 +
|
 +
<code>/gamerule <rule> value</code>
 +
|
 +
* <code>/gamerule keepinventory true</code>
 +
*: Allows the player to keep their inventory upon death.
 +
* <code>/gamerule dodaylightcycle false</code>
 +
*: Stops the day/night cycle from continuing.
 +
* <code>/gamerule dofiretick false</code>
 +
*: Stops fire from spreading between blocks.
 +
* <code>/gamerule mobgriefing false</code>
 +
*: Disallows mobs from changing blocks in the world.
  
 +
|-----------------------------------------------------------------------------------------------------------
 +
|
 
===give===
 
===give===
Options:
+
| Gives the player any block or item.
 +
|
 
<code>give item [amount] [damage] [data_tags]</code>
 
<code>give item [amount] [damage] [data_tags]</code>
 +
* <code>item</code>: The [[identifiers|identifier]] for the item to give.
 +
* <code>amount</code>: Specifies how many of the item to give.
 +
* <code>damage</code>: How much damage the tool will have (default is 0). Positive numbers are damage, and negative numbers are durability.
 +
* <code>data_tags</code>: Specifies additional data to apply to the item. See [[data tags]] for more information.
 +
|
 +
* <code>/give diamond 12</code>
 +
*: Gives the player twelve diamonds.
 +
* <code>/give diamond_sword 1 50 {name:"Jimbo"}</code>
 +
*: Gives a diamond sword named "Jimbo" that has been damaged 50 times.
 +
* <code>/give command_book 1 0 {command:"give carrot 1 0 {name:'Perry'}"}</code>
 +
*: Gives a command book that gives the player a carrot named "Perry".
 +
* <code>/give wooden_shovel 1 0 {enchantments:["unbreaking3"]}</code>
 +
*: Gives a wooden shovel with an unbreaking enchantment.
  
*<code>item</code>: The [[identifiers|identifier]] for the item to give
+
|-----------------------------------------------------------------------------------------------------------
*<code>amount</code>: Specifies how many of the item to give
+
|
*<code>damage</code>: How much damage the tool will have (default is 0). Positive numbers are damage, and negative numbers are durability.
+
===heal===
*<code>data_tags</code>: Specifies additional data to apply to the item. See [[data tags]] for more information.
+
| Instantly heals the player.
 +
|
 +
<code>/heal</code>
  
 +
|-----------------------------------------------------------------------------------------------------------
 +
|
 
===home===
 
===home===
Options:
+
| Teleports to the player's spawn point.
 +
|
 +
<code>/home [set [~]x [~]y]</code>
 +
|
 +
* <code>/home</code>
 +
*: Goes to the player's home location.
 +
* <code>/home set ~5 ~3</code>
 +
*: Sets the player's spawn point 5 blocks to the right, and 3 blocks up.
 +
* <code>/home set 5 3</code>
 +
*: Sets the player's spawn point to the block at x=5 and y=3.
 +
 
 +
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===kill===
 +
| Instantly kills the player.
 +
|
 +
<code>/kill</code>
 +
|
 +
 
 +
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===lightning===
 +
| Generates lightning
 +
|
 +
<code>/lightning [[~]x [~]y]</code>
 +
|
 +
* <code>/lightning</code>
 +
*: Generates lightning at the player's location.
 +
* <code>/lightning ~-5 ~</code>
 +
*: Generates lightning 5 blocks to the left of the player.
 +
 
 +
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===spawnskin===
 +
| Spawns in a NPC (Non-player control)into the game. You need to have a skin ID for the NPC, which can be found on skin stats in the gallery.
 +
|
 +
<code>/spawnskin skin_id_number [amount] [[~]x [~]y]</code>
 +
|
 +
* <code>/spawnskin 58300</code>
 +
*: Spawns 1 of [//mineblocks.com/1/skin/58300 Zanzlanz's Squid skin].
 +
* <code>/spawnskin 58300 5</code>
 +
*: Spawns 5 of them.
 +
* <code>/spawnskin 58300 1 ~-5 ~3</code>
 +
*: Spawns 1 of them, 5 blocks to the left, and three blocks above the player.
 +
 
 +
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===time===
 +
| Sets/shows the current time of the day, which is a value between 1 and 100.
 +
|
 +
<code>/time <get|set [t|day|night]></code>
 +
|
 +
* <code>/time get</code>
 +
*: Displays the time of the day in the console.
 +
* <code>/time set 10</code>
 +
*: Sets time to 10, which is morning time.
 +
* <code>/time set day</code>
 +
*: Sets time to 0.
  
/home [set [~]x [~]y] ''Go to your spawn point or set your spawn point.''
 
  
 +
|-----------------------------------------------------------------------------------------------------------
 +
|
 
===tp===
 
===tp===
Options:
+
| Teleports (TPs) the player to a specific location.
 +
|
 +
<code>/tp [~]x [~]y</code>
 +
|
 +
* <code>/tp ~5 ~3</code>
 +
*: Teleports the player 5 blocks to the right, and 3 blocks up.
 +
* <code>/tp 5 3</code>
 +
*: Teleports the player to the block at x=5 and y=3.
  
/tp <[~]x[~]y> ''Teleport to a specific place.''
+
|-----------------------------------------------------------------------------------------------------------
 +
|
  
===heal===
+
===weather===
Options:
+
| Sets/shows whether it is raining in the world, or not.
 +
|
 +
<code>/weather <get|set <clear|rain|thunder>></code>
 +
|
 +
* <code>/weather get</code>
 +
*: Displays the current weather in the console.
 +
* <code>/weather set rain</code>
 +
*: Makes it start raining.
  
/heal ''Restore health to full.''
+
|-----------------------------------------------------------------------------------------------------------
 +
|
 +
===xp===
 +
| Sets the experience points of the player.
 +
|
 +
<code>/xp [add] value[L]</code>
 +
|
 +
* <code>/xp 100</code>
 +
*: Sets the player's experience to 100 points (1 level).
 +
* <code>/xp 1L</code>
 +
*: Sets the player's experience to 1 level (100 points).
 +
* <code>/xp add 10L</code>
 +
*: Adds 10 levels to the player's experience.
  
===spawnskin===
+
|}
Options:
 
  
/spawnskin skin_id_number [amount] [[~]x [~]y] ''Spawns in a NPC (Non-player control)into the game. You need to have a skin ID for the NPC. Amount is optional, place spawn is also optional.'' E.G: /spawnskin 123456
+
==History==
 +
{|class="wikitable"
 +
!Version
 +
!Date
 +
!Changes
 +
|-
 +
![[Version History#1.26.5|1.26.5]]
 +
! Jul 03, 2014
 +
|
 +
* Commands were first introduced
 +
:* Added commands: '''cheats, explode, fill, gamemode, gamerule, give, help, home, kill, seed, time, weather, xp'''
 +
|-
 +
![[Version History#1.27|1.27]]
 +
! Nov 13, 2015
 +
|
 +
* Default keybinding to open commands changed from "/" to "T"
 +
* Added commands: '''heal, spawnskin, tp'''
 +
* Added a doFireTick game rule
 +
* Added "L" modifier to xp
 +
* Added oldBlockHandling to fill
 +
|-
 +
![[Version History#1.28|1.28]]
 +
! Oct 08, 2016
 +
|
 +
* Added commands: '''difficulty, enchant, lightning'''
 +
* Added a passiveMobs game rule
 +
* Added durability and data_tags to give
 +
|}
  
==Uses for Commands==
+
== See Also ==
Commands give more control to the player over the world. It helps to expedite the building and creation process in creative mode. In survival, the player can use commands to cheat, in order to skip long procedures like rare item farming.
+
*[[Identifiers]]
 +
*[[Data tags]]
 +
*[[Enchantment_table#Commands|Enchantment IDs]]
 +
*[[Command book]]
  
[[Category:Unfinished]][[Category:Gameplay]]
+
[[Category:Gameplay]]

Revision as of 15:40, 13 April 2019


Commands (also known as Cheats) are scripted codes that the player can write in the game console that change the game directly.

Using Commands

In order to use commands, the world must have cheats enabled. This option can only be enabled on the world creation screen, and cannot be enabled after a world has already been created.

The default key binding for opening the command console is "T". This can be changed in the game settings. When the console is open, the player can write a command, and execute it by pressing Enter.

The command definition includes two different types of brackets. It's important to know the difference between them.

  • Parameters between the < and > brackets is a list of options, separated by | characters. For example, in /gamemode <survival|creative>, you can either write /gamemode survival, or /gamemode creative.
  • Parameters between the [ and ] brackets is an optional parameter. When writing a command, you can omit the parameters. For example, in /lightning [[~]x [~]y], you can simply omit the X and Y parameters like so: /lightning.

Note that [~] is an optional modifier that can be added to coordinates, which makes it relative the player's location.

List of Commands

Command Description Definition Examples

help

This command is always available, even if cheats are disabled.

Lists all of the possible commands.

/help

seed

This command is always available, even if cheats are disabled.

Shows the seed number of the current world.

/seed

cheats

This command will only exist if the world was created prior to 1.26.5 (when cheats were added to the game).

It allows players to permanently enable or disable cheats in their world.

/cheats <enable|disable>

difficulty

Sets the difficulty mode of the world.

/difficulty <peaceful|easy|normal|hard>

  • /difficulty normal
    Sets the game to normal difficulty

enchant

Applies and enchantment to the player's equipped item.

enchant enchantment_id

  • enchantment_id: See list of enchantment ID's here: Enchantments
  • /enchant Unbreaking4
    Enchants the held item with the Unbreaking 4 enchantment.
  • /enchant LuckOfTheSeaII
    Enchants the held item with the Luck of the Sea 2 enchantment.

explode

Creates an explosion.

/explode size [[~]x [~]y]

  • /explode 10
    Performs a size 10 explosion at the player's location.
  • /explode 5 ~ ~-3
    Performs a size 5 explosion, 3 blocks below the player.

fill

Fills a region of blocks with the specified block type

fill block_type [~]x [~]y width height [(replace [replace_block_type])|keep|outline|hollow|destroy]

  • block_type: The identifier for the block to fill.
  • [~]x [~]y: The x and y coordinate to start filling from.
  • width height: How many blocks rightward (width) and upward (height) to fill.
  • oldBlockHandling: Different replacement algorithms:
    • replace replace_block_type will only fill blocks that match the replace_block_type.
    • keep will only replace air blocks.
    • outline will fill blocks on only the inner edge of the rectangle.
    • hollow will fill the inner edge and clear all blocks inside.
    • destroy replaces all blocks by mining them first.
  • /fill diamond_block ~-5 ~ 11 1 replace
    Replaces the area under the player with diamond blocks.
  • /fill air ~-10 ~-10 21 21 replace stone
    Replaces stone around the player with air.

gamemode

Switches between the game modes.

/gamemode <survival|creative>

  • /gamemode creative
    Switches to creative mode
    /gamemode 1 and /gamemode c will also work.
  • /gamemode survival
    Switches to survival mode.
    /gamemode 0 and /gamemode s will also work.

gamerule

Sets global variables in the game world, such as the ability for players to keep their inventory when they die.

/gamerule <rule> value

  • /gamerule keepinventory true
    Allows the player to keep their inventory upon death.
  • /gamerule dodaylightcycle false
    Stops the day/night cycle from continuing.
  • /gamerule dofiretick false
    Stops fire from spreading between blocks.
  • /gamerule mobgriefing false
    Disallows mobs from changing blocks in the world.

give

Gives the player any block or item.

give item [amount] [damage] [data_tags]

  • item: The identifier for the item to give.
  • amount: Specifies how many of the item to give.
  • damage: How much damage the tool will have (default is 0). Positive numbers are damage, and negative numbers are durability.
  • data_tags: Specifies additional data to apply to the item. See data tags for more information.
  • /give diamond 12
    Gives the player twelve diamonds.
  • /give diamond_sword 1 50 {name:"Jimbo"}
    Gives a diamond sword named "Jimbo" that has been damaged 50 times.
  • /give command_book 1 0 {command:"give carrot 1 0 {name:'Perry'}"}
    Gives a command book that gives the player a carrot named "Perry".
  • /give wooden_shovel 1 0 {enchantments:["unbreaking3"]}
    Gives a wooden shovel with an unbreaking enchantment.

heal

Instantly heals the player.

/heal

home

Teleports to the player's spawn point.

/home [set [~]x [~]y]

  • /home
    Goes to the player's home location.
  • /home set ~5 ~3
    Sets the player's spawn point 5 blocks to the right, and 3 blocks up.
  • /home set 5 3
    Sets the player's spawn point to the block at x=5 and y=3.

kill

Instantly kills the player.

/kill

lightning

Generates lightning

/lightning [[~]x [~]y]

  • /lightning
    Generates lightning at the player's location.
  • /lightning ~-5 ~
    Generates lightning 5 blocks to the left of the player.

spawnskin

Spawns in a NPC (Non-player control)into the game. You need to have a skin ID for the NPC, which can be found on skin stats in the gallery.

/spawnskin skin_id_number [amount] [[~]x [~]y]

  • /spawnskin 58300
    Spawns 1 of Zanzlanz's Squid skin.
  • /spawnskin 58300 5
    Spawns 5 of them.
  • /spawnskin 58300 1 ~-5 ~3
    Spawns 1 of them, 5 blocks to the left, and three blocks above the player.

time

Sets/shows the current time of the day, which is a value between 1 and 100.

/time <get|set [t|day|night]>

  • /time get
    Displays the time of the day in the console.
  • /time set 10
    Sets time to 10, which is morning time.
  • /time set day
    Sets time to 0.


tp

Teleports (TPs) the player to a specific location.

/tp [~]x [~]y

  • /tp ~5 ~3
    Teleports the player 5 blocks to the right, and 3 blocks up.
  • /tp 5 3
    Teleports the player to the block at x=5 and y=3.

weather

Sets/shows whether it is raining in the world, or not.

/weather <get|set <clear|rain|thunder>>

  • /weather get
    Displays the current weather in the console.
  • /weather set rain
    Makes it start raining.

xp

Sets the experience points of the player.

/xp [add] value[L]

  • /xp 100
    Sets the player's experience to 100 points (1 level).
  • /xp 1L
    Sets the player's experience to 1 level (100 points).
  • /xp add 10L
    Adds 10 levels to the player's experience.

History

Version Date Changes
1.26.5 Jul 03, 2014
  • Commands were first introduced
  • Added commands: cheats, explode, fill, gamemode, gamerule, give, help, home, kill, seed, time, weather, xp
1.27 Nov 13, 2015
  • Default keybinding to open commands changed from "/" to "T"
  • Added commands: heal, spawnskin, tp
  • Added a doFireTick game rule
  • Added "L" modifier to xp
  • Added oldBlockHandling to fill
1.28 Oct 08, 2016
  • Added commands: difficulty, enchant, lightning
  • Added a passiveMobs game rule
  • Added durability and data_tags to give

See Also