Difference between revisions of "Itemstrings"

From Minetest Wiki
Jump to navigation Jump to search
m (Replaced the last two occurences of “item codes” with “itemstrings”)
(→‎Special itemstrings: There's no used for. There's only is.)
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{Languages|nocat=1}}
 +
 
'''Itemstrings''' are the internal names for items, blocks, nodes (everything which can be stored in an [[inventory]]).
 
'''Itemstrings''' are the internal names for items, blocks, nodes (everything which can be stored in an [[inventory]]).
 
  
 
== Syntax ==
 
== Syntax ==
Line 6: Line 7:
 
  <mod_name>:<item_name>
 
  <mod_name>:<item_name>
 
Examples:
 
Examples:
*<code>default:torch</code> — a [[torch]]
+
*<code>default:torch</code> — a [[torch]] (from mod “default”)
*<code>default:dirt</code> — [[dirt]]
+
*<code>default:dirt</code> — [[dirt]] (from mod “default”)
*<code>farming:bread</code> — [[bread]]
+
*<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”)
  
 
There are itemstrings which don’t follow the syntax rules, see [[#Special itemstrings]].
 
There are itemstrings which don’t follow the syntax rules, see [[#Special itemstrings]].
  
 
== Usages ==
 
== Usages ==
Itemstrins can be used as arguments used for the <code>/give</code> and <code>/giveme</code> [[Server commands|commands]].
+
Itemstrings can be used as arguments used for the <code>/give</code> and <code>/giveme</code> [[Server commands|commands]].
 
 
Example: <code>/give Alberto default:torch 1</code> — gives Alberto one torch
 
 
 
== Lists of itemstrings ==
 
=== Default (included in minetest_game) ===
 
 
 
See [[Itemstrings/default|this page]] for the itemstrings of the “default” mod.
 
 
 
=== Bucket (included in minetest_game) ===
 
''Mod name: “bucket”''
 
==== Items ====
 
* [[Bucket|bucket]]
 
* [[Bucket|bucket_water]]
 
* [[Bucket|bucket_lava]]
 
 
 
=== Wool (included in minetest_game) ===
 
See [[Itemstrings/Wool|this page]] for itemstrings of the official version of the “wool” mod.
 
 
 
=== Mesecons ===
 
See [[Itemstrings/mesecons|this page]] for itemstrings of the “mesecons” mod.
 
 
 
=== More Blocks ===
 
See [[Itemstrings/moreblocks|this page]] for itemstrings of the “moreblocks” mod.
 
  
=== More Ores ===
+
Example: <code>/giveme default:torch</code>—give yourself a [[torch]]
See [[Itemstrings/moreores|this page]] for itemstrings of the “moreores” mod.
 
  
=== Special itemstrings ===
+
== Special itemstrings ==
There are itemstrings which don’t follow the usual syntax rules. These itemstrings are always available, regardless of the activated [[mods]]:
+
There are itemstrings which do not follow the usual syntax rules. These itemstrings are always available, regardless of the activated [[mods]]:
* <code>air</code> — used for [[Air]]
+
* [[Air|<code>air</code>]]
* <code>ignore</code> — used to represent nodes in unloaded areas
+
* [[Ignore|<code>ignore</code>]]
  
 
== See also ==
 
== See also ==
Line 50: 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