Difference between revisions of "Itemstrings"

From Minetest Wiki
Jump to navigation Jump to search
(→‎Items: added links)
(→‎Special itemstrings: There's no used for. There's only is.)
 
(22 intermediate revisions by 5 users not shown)
Line 1: Line 1:
These are the default arguments used for the <code>/give</code> and <code>/giveme</code> commands. Item codes are case sensitive.
+
{{Languages|nocat=1}}
  
Example: <code>/give Name torch 1 </code>
+
'''Itemstrings''' are the internal names for items, blocks, nodes (everything which can be stored in an [[inventory]]).
  
== Default ==
+
== Syntax ==
 +
An usual itemstring consists of a the name of the [[Mods|mod]] where the item originates from followed by a “:” followed by an item name. All itemstrings are case sensitive.
 +
<mod_name>:<item_name>
 +
Examples:
 +
*<code>default:torch</code> — a [[torch]] (from mod “default”)
 +
*<code>default:dirt</code> — [[dirt]] (from mod “default”)
 +
*<code>farming:bread</code> — [[bread]] (from mod “farming”)
 +
*<code>wool:orange</code> — orange [[wool]] (from mod “wool”)
 +
*<code>screwdriver:screwdriver</code> — [[screwdriver]] (from mod “screwdriver”)
  
See [[Item_Codes/default|this page]] for item codes of the "default" mod.
+
There are itemstrings which don’t follow the syntax rules, see [[#Special itemstrings]].
  
== Bucket (included in "minetest_game" repository) ==
+
== Usages ==
 +
Itemstrings can be used as arguments used for the <code>/give</code> and <code>/giveme</code> [[Server commands|commands]].
  
''Prefix: bucket:''
+
Example: <code>/giveme default:torch</code>—give yourself a [[torch]]
  
=== Items ===
+
== Special itemstrings ==
 
+
There are itemstrings which do not follow the usual syntax rules. These itemstrings are always available, regardless of the activated [[mods]]:
* [[Bucket|bucket]]
+
* [[Air|<code>air</code>]]
* [[Bucket|bucket_water]]
+
* [[Ignore|<code>ignore</code>]]
* [[Bucket|bucket_lava]]
 
 
 
== Mesecons ==
 
 
 
See [[Item_Codes/mesecons|this page]] for item codes of the "mesecons" mod.
 
 
 
== More Blocks ==
 
 
 
See [[Item_Codes/moreblocks|this page]] for item codes of the "moreblocks" mod.
 
 
 
== More Ores ==
 
 
 
See [[Item_Codes/moreores|this page]] for item codes of the "moreores" mod.
 
 
 
== Wool 16 ==
 
 
 
See [[Item_Codes/Wool 16|this page]] for item codes of the 16-color version of the "Wool" mod.
 
 
 
== Wool 32 ==
 
 
 
See [[Item_Codes/Wool 32|this page]] for item codes of the 32-color version of the "Wool" mod.
 
  
 
== See also ==
 
== See also ==
Line 41: Line 29:
 
*[[Blocks]]
 
*[[Blocks]]
  
[[Category:Commands]]
+
[[Category:Engine]]

Latest revision as of 18:25, 9 August 2023

Languages Language: English • Deutsch • français • italiano • Bahasa Melayu

Itemstrings are the internal names for items, blocks, nodes (everything which can be stored in an inventory).

Syntax

An usual itemstring consists of a the name of the mod where the item originates from followed by a “:” followed by an item name. All itemstrings are case sensitive.

<mod_name>:<item_name>

Examples:

  • default:torch — a torch (from mod “default”)
  • default:dirtdirt (from mod “default”)
  • farming:breadbread (from mod “farming”)
  • wool:orange — orange wool (from mod “wool”)
  • screwdriver:screwdriverscrewdriver (from mod “screwdriver”)

There are itemstrings which don’t follow the syntax rules, see #Special itemstrings.

Usages

Itemstrings can be used as arguments used for the /give and /giveme commands.

Example: /giveme default:torch—give yourself a torch

Special itemstrings

There are itemstrings which do not follow the usual syntax rules. These itemstrings are always available, regardless of the activated mods:

See also