ja:tutorial:items_docs
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | ja:tutorial:items_docs [2022/08/13 14:44] (current) – created skytomo | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== アイテム ====== | ||
+ | アイテムは、インベントリに表示されるコンテンツの一部です。クリックしたときにアクションを実行したり、食べたり、エンティティをスポーンしたりできます。次のドキュメントでは、 '' | ||
+ | |||
+ | ===== アイテム設定 ===== | ||
+ | |||
+ | '' | ||
+ | |||
+ | ^ メソッド | ||
+ | | food | '' | ||
+ | | maxCount | ||
+ | | maxDamageIfAbsent | '' | ||
+ | | maxDamage | '' | ||
+ | | recipeRemainder | '' | ||
+ | | group | '' | ||
+ | | rarity | '' | ||
+ | | fireproof | None | アイテムが耐火性であることを示します。アイテムが溶岩や火によって破壊されるのを防ぎます。 | | ||
+ | |||
+ | ===== Fabric のアイテム設定 ===== | ||
+ | Fabric Item API は、さらに多くの属性を設定する追加のメソッドを提供します。 | ||
+ | これを使用するには、 '' | ||
+ | |||
+ | ^ メソッド | ||
+ | | equipmentSlot | '' | ||
+ | | customDamage | '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== 食料 ==== | ||
+ | <code java> | ||
+ | public Item.Settings food(FoodComponent foodComponent) | ||
+ | </ | ||
+ | '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== 最大スタック数 ==== | ||
+ | <code java> | ||
+ | public Item.Settings maxCount(int maxCount) | ||
+ | </ | ||
+ | '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== 未設定の最大耐久度 ==== | ||
+ | <code java> | ||
+ | public Item.Settings maxDamageIfAbsent(int maxDamage) | ||
+ | </ | ||
+ | '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== 最大耐久度 ==== | ||
+ | <code java> | ||
+ | public Item.Settings maxDamage(int maxDamage) | ||
+ | </ | ||
+ | '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== レシピの残り ==== | ||
+ | <code java> | ||
+ | public Item.Settings recipeRemainder(Item recipeRemainder) | ||
+ | </ | ||
+ | '' | ||
+ | |||
+ | アイテムにレシピの残りが設定されている場合、そのアイテムを使用するすべてのレシピはクラフトの残りを返します。これは、バケツ(水、溶岩、ミルク)とボトル(ドラゴンブレス、ハニー)がレシピで使用されたときにそれぞれの空のアイテムを返すために使用されます。 | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== グループ ==== | ||
+ | <code java> | ||
+ | public Item.Settings group(ItemGroup group) | ||
+ | </ | ||
+ | '' | ||
+ | |||
+ | 各 ItemGroup は、クリエイティブインベントリのタブとして表示されます。このグループにアイテムを追加すると、タブに追加されます。グループの順序は、レジストリの順序に基づいています。グループの作成の詳細については、 [[tutorial: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== 希少度 ==== | ||
+ | <code java> | ||
+ | public Item.Settings rarity(Rarity rarity) | ||
+ | </ | ||
+ | '' | ||
+ | |||
+ | 希少度が設定されている場合、指定されたアイテムにはカスタムの名前の色が付けられます。アイテムの希少度はデフォルトで Common に設定されています。 | ||
+ | ^ 希少度 ^ 色 ^ | ||
+ | | Common | 白色 | | ||
+ | | Uncommon | 黄色 | | ||
+ | | Rare | 青緑色 | | ||
+ | | Epic | 赤紫色 | | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Fireproof ==== | ||
+ | <code java> | ||
+ | public Item.Settings fireproof() | ||
+ | </ | ||
+ | |||
+ | アイテムを耐火性としてマークし、アイテムを含むアイテムエンティティを火と溶岩から保護します。 | ||
ja/tutorial/items_docs.txt · Last modified: 2022/08/13 14:44 by skytomo