Difference between revisions of "Command Book"

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!

m (TheTopazRobot moved page Command Book to Command book: Capitalization)
m (Shift+click -> right-click)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{Object
 
{{Object
|image=Diamond.png
+
|image=Command book.png
 
|name=Command Book  
 
|name=Command Book  
 
|type=Creative Utility
 
|type=Creative Utility
 
|renewable=No
 
|renewable=No
 +
|stackable=No
 
|found naturally=No
 
|found naturally=No
 +
|id=command_book
 
}}
 
}}
  
[[Category:Items]][[Category:Unfinished]]
+
The command book is an item that can only be summoned with [[Commands|commands]], and issues commands when the player holds the book and right-clicks.
 +
 
 +
== Obtaining ==
 +
The command book can only be obtained using the <code>/give</code> command.
 +
 
 +
The command that the command book will run is specified with the <code>command</code> data tag. This can be set to any command. The <code>uses</code> data tag specifies how many times the command book can be used before it disappears. The <code>name</code> data tag can also be used on command books.
 +
 
 +
For example, the command <code>/give command_book 1 0 {name:"Carrot Book", command:"/give carrot 10", uses:2}</code> gives a command book named "Carrot Book" which gives ten carrots when used and can be used twice before disappearing.
 +
 
 +
== Usage ==
 +
The command book can be used to help make adventure maps easier to navigate and give players required resources, without the map player needing to type commands.
 +
 
 +
It also allows for faster command usage when using the same command repetitively, as the player does not need to open the command menu over and over again, and can just right-click the command book.
 +
 
 +
=== Running Commands ===
 +
The command book can be used by right-clicking with it while holding it in the hand. This executes its command.
 +
 
 +
If the command book has been set a limited number of uses, this adds one use to its count. Once it is used the maximum specified number of times, it disappears. If a specific number of uses has not been set, the command book can be used an unlimited number of times.
 +
 
 +
== Data Values ==
 +
''Main article: [[Data tags]]''
 +
{| class='wikitable'
 +
!Tag Name
 +
!Description
 +
!Values
 +
|-
 +
|<code>name</code>
 +
|Overrides the default naming of the item (as if it was renamed by an anvil)
 +
|''String''
 +
Name of the command book
 +
|-
 +
|<code>command</code>
 +
|Specifies the command run by a command book.
 +
|''String''
 +
Command will not be checked for errors upon creation.
 +
|-
 +
|<code>uses</code>
 +
|Specifies how many times a command book can be used before it disappears.
 +
|''Integer''
 +
Non-positive numbers are invalid. If not specified, the number of uses is unlimited.
 +
|}
 +
 
 +
== History ==
 +
{|class="wikitable"
 +
! Version
 +
! Date
 +
! Changes
 +
|-
 +
! [[Version History#1.28|1.28]]
 +
! Oct 8, 2016
 +
|
 +
* Added the command book
 +
|}
 +
 
 +
== See Also ==
 +
* [[Creative]]
 +
* [[Commands]]
 +
 
 +
[[Category:Items]]

Latest revision as of 14:46, 27 July 2024



Command Book
Command book.png
Type:Creative Utility
Stackable:No
Found naturally:No
Renewable:No
Identifier:command_book

The command book is an item that can only be summoned with commands, and issues commands when the player holds the book and right-clicks.

Obtaining

The command book can only be obtained using the /give command.

The command that the command book will run is specified with the command data tag. This can be set to any command. The uses data tag specifies how many times the command book can be used before it disappears. The name data tag can also be used on command books.

For example, the command /give command_book 1 0 {name:"Carrot Book", command:"/give carrot 10", uses:2} gives a command book named "Carrot Book" which gives ten carrots when used and can be used twice before disappearing.

Usage

The command book can be used to help make adventure maps easier to navigate and give players required resources, without the map player needing to type commands.

It also allows for faster command usage when using the same command repetitively, as the player does not need to open the command menu over and over again, and can just right-click the command book.

Running Commands

The command book can be used by right-clicking with it while holding it in the hand. This executes its command.

If the command book has been set a limited number of uses, this adds one use to its count. Once it is used the maximum specified number of times, it disappears. If a specific number of uses has not been set, the command book can be used an unlimited number of times.

Data Values

Main article: Data tags

Tag Name Description Values
name Overrides the default naming of the item (as if it was renamed by an anvil) String

Name of the command book

command Specifies the command run by a command book. String

Command will not be checked for errors upon creation.

uses Specifies how many times a command book can be used before it disappears. Integer

Non-positive numbers are invalid. If not specified, the number of uses is unlimited.

History

Version Date Changes
1.28 Oct 8, 2016
  • Added the command book

See Also