//Items
概要
TransferやCrafter、SwitcherやDetectorといったサインは、引数としてさまざまなアイテムを設定することができます。その際には、アイテムに関していろいろと表記するため、特定の同じ記法が使われます。複数のアイテムを並べて表記するときには、セミコロン(;)で区切ります。
最初に数字を書いて、その後スペース記号、x、アスタリスク(*)のいずれかが続く場合、それはこのあとに続くアイテムの個数を示します。名前やアイテムのインデックスに使うことができます。また、最後にアイテムのサブインデックスもしくは特徴を表す特定のワードを指定することで、厳密なアイテム指定を行えます。たとえば羊毛(wool)のうち赤色を指定したい場合には、:redと表記できます。サブインデックスを直接指定することも可能です。
メタデータ
アイテムについてさらに細かいフィルターを掛けたいとき、いくつかのメタデータをドルマーク($)に続いて書き込むことで指定することもできます。メタデータ名をただ指定した場合はそのメタデータを持っているかどうかの確認だけ行いますが、> < >= <= == !=の演算子を用いることで比較も可能です。
例
| 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