TrainCarts/控制牌/物品

From BergerHealer Wiki
Revision as of 13:00, 12 September 2024 by Halogly (talk | contribs) (Created page with "如果第一个数值后面跟着'''空格、x 或 *''',则表示该物品的数量。接着是定义名称或类型。可以使用物品原名称或物品的索引值来定...")
Jump to navigation Jump to search
Other languages:
English • ‎中文(中国大陆)‎

介绍

你可以在多个控制牌上定义物品,控制牌可以是转移器、制作器、转辙器和检测器。它们都使用相同的语法来解析物品。多个物品用 ; 隔开,可以使用多个语法进行定义。

如果第一个数值后面跟着空格、x 或 *,则表示该物品的数量。接着是定义名称或类型。可以使用物品原名称或物品的索引值来定义。最后定义子索引。你可以使用物品类型的关键字。例如,当你需要某种类型的羊毛时,可以使用 :red。你也可以直接定义子索引。

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