Difference between revisions of "TrainCarts/Signs/Items"
m (1 revision imported) |
Bergerkiller (talk | contribs) (Marked this version for translation) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | <languages/> | |
− | + | <translate> | |
− | |||
+ | == Introduction == <!--T:1--> | ||
+ | |||
+ | <!--T:2--> | ||
You can define items on multiple signs, including transfer, crafter, switcher and detector signs. All of them use the same syntax to ''parse'' items. Items are delimited by ''';'''-signs and can be defined using multiple syntax rules. | You can define items on multiple signs, including transfer, crafter, switcher and detector signs. All of them use the same syntax to ''parse'' items. Items are delimited by ''';'''-signs and can be defined using multiple syntax rules. | ||
+ | <!--T:3--> | ||
The first number, if followed up by a '''space, x, or *''', defines the amount of that item. Then the name, or type, of the item is defined. This can be done using the actual name or the item index value. Finally the sub-index is defined. You can use a characteristic word for the item type. For example, when you need a certain type of wool, you can use :red. You can also define the sub-index directly. | The first number, if followed up by a '''space, x, or *''', defines the amount of that item. Then the name, or type, of the item is defined. This can be done using the actual name or the item index value. Finally the sub-index is defined. You can use a characteristic word for the item type. For example, when you need a certain type of wool, you can use :red. You can also define the sub-index directly. | ||
− | == Item Shortcuts == | + | == Metadata == <!--T:4--> |
+ | |||
+ | <!--T:5--> | ||
+ | Some metadata rules can be specified after $ to filter specific items. Metadata names if specified on their own checks for existence, but can be followed up by an operator <code>> < >= <= == !=</code> to do comparisons. | ||
+ | |||
+ | === Examples === <!--T:6--> | ||
+ | |||
+ | <!--T:7--> | ||
+ | {| class="wikitable" style="margin:left" | ||
+ | ! Text !! Explanation | ||
+ | |- | ||
+ | | DIAMOND_SWORD$damage==0 || An undamaged diamond sword (full durability) | ||
+ | |-bgcolor="#dddddd" | ||
+ | | FILLED_MAP$map>0 || Map items with a map id greater than 0 | ||
+ | |- | ||
+ | | STICK$name || Stick items that have a custom name set | ||
+ | |-bgcolor="#dddddd" | ||
+ | | STICK$name==Sticky || Stick items with name 'Sticky' | ||
+ | |} | ||
+ | |||
+ | === Available Rules === <!--T:8--> | ||
+ | |||
+ | <!--T:9--> | ||
+ | {| cellspacing="1" cellpadding="1" border="1" style="height: 182px;" | ||
+ | |- | ||
+ | ! scope="col" | Metadata<br> | ||
+ | ! scope="col" | Explanation<br> | ||
+ | |- | ||
+ | | bgcolor="#cccccc" | damage<br> | ||
+ | | bgcolor="#cccccc" | Damage value (swords, tools). 0 is undamaged. | ||
+ | |- | ||
+ | | name<br> | ||
+ | | Custom item name, if set | ||
+ | |- | ||
+ | | bgcolor="#cccccc" | custom_model_data<br> | ||
+ | | bgcolor="#cccccc" | Custom model data value | ||
+ | |- | ||
+ | | map<br> | ||
+ | | Map ID | ||
+ | |- | ||
+ | | bgcolor="#cccccc" | -anything-<br> | ||
+ | | bgcolor="#cccccc" | Any other names are compared with the custom NBT data of the item | ||
+ | |} | ||
+ | |||
+ | == Item Shortcuts == <!--T:10--> | ||
+ | |||
+ | <!--T:11--> | ||
In case you need to specify a lot of items at once (but the sign lacks space for it), you can define Item Shortcuts in the ''config.yml''. By default, shortcuts for armor, weaponry, fuel, heatable and some others are defined there. | In case you need to specify a lot of items at once (but the sign lacks space for it), you can define Item Shortcuts in the ''config.yml''. By default, shortcuts for armor, weaponry, fuel, heatable and some others are defined there. | ||
− | == Examples == | + | == Examples == <!--T:12--> |
+ | <!--T:13--> | ||
{| cellspacing="1" cellpadding="1" border="1" style="width: 300px; height: 182px;" | {| cellspacing="1" cellpadding="1" border="1" style="width: 300px; height: 182px;" | ||
|- | |- | ||
Line 51: | Line 101: | ||
|} | |} | ||
− | For a list of item integers, see [ | + | <!--T:14--> |
− | + | For a list of item integers, see [https://minecraft.wiki/w/Java_Edition_data_values/Pre-flattening Data values] | |
− | + | </translate> | |
− |
Latest revision as of 12:19, 12 September 2024
Introduction
You can define items on multiple signs, including transfer, crafter, switcher and detector signs. All of them use the same syntax to parse items. Items are delimited by ;-signs and can be defined using multiple syntax rules.
The first number, if followed up by a space, x, or *, defines the amount of that item. Then the name, or type, of the item is defined. This can be done using the actual name or the item index value. Finally the sub-index is defined. You can use a characteristic word for the item type. For example, when you need a certain type of wool, you can use :red. You can also define the sub-index directly.
Metadata
Some metadata rules can be specified after $ to filter specific items. Metadata names if specified on their own checks for existence, but can be followed up by an operator > < >= <= == !=
to do comparisons.
Examples
Text | Explanation |
---|---|
DIAMOND_SWORD$damage==0 | An undamaged diamond sword (full durability) |
FILLED_MAP$map>0 | Map items with a map id greater than 0 |
STICK$name | Stick items that have a custom name set |
STICK$name==Sticky | Stick items with name 'Sticky' |
Available Rules
Metadata |
Explanation |
---|---|
damage |
Damage value (swords, tools). 0 is undamaged. |
name |
Custom item name, if set |
custom_model_data |
Custom model data value |
map |
Map ID |
-anything- |
Any other names are compared with the custom NBT data of the item |
Item Shortcuts
In case you need to specify a lot of items at once (but the sign lacks space for it), you can define Item Shortcuts in the config.yml. By default, shortcuts for armor, weaponry, fuel, heatable and some others are defined there.
Examples
Text |
Result |
---|---|
wood |
All wood |
slab:1 | Sandstone slab |
5 stone |
5 stone |
5xstone | |
5Xstone | |
5*stone | |
6x5 |
6 of type 5 (wood) |
wool:red |
All red wool |
6xstairs:stone |
6 stone stairs |
5*35:4 |
5 yellow wool |
5 wool |
5 wool of any color |
fuel |
an item shortcut set in the configuration |
For a list of item integers, see Data values