User Tools

Site Tools


tutorial:items_docs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:items_docs [2020/03/30 02:50] – created draylartutorial:items_docs [2020/04/01 19:23] – clarify max count limits draylar
Line 14: Line 14:
 | group | ItemGroup | Sets the ItemGroup of the Item, which is used for creative tabs. | | group | ItemGroup | Sets the ItemGroup of the Item, which is used for creative tabs. |
 | rarity | Rarity | Sets the rarity of the Item, which changes its name color. | | rarity | Rarity | Sets the rarity of the Item, which changes its name color. |
 +
 +----
 +
 +==== Food ====
 +<code java>
 +public Item.Settings food(FoodComponent foodComponent)
 +</code>
 +''foodComponent'' - instance of ''FoodComponent''. When set, the Item will be edible based on the settings provided by the ''FoodComponent'' builder. For an in-depth explanation of the available options, view the FoodComponent Overview page.
 +
 +----
 +
 +==== Max Stack Count ====
 +<code java>
 +public Item.Settings maxCount(int maxCount)
 +</code>
 +''maxCount'' - the maximum count of an ''ItemStack'' for the given ''Item''. If ''maxDamage'' has already been called, a ''RuntimeException'' is thrown, as an Item cannot have both damage and count. Keeping the max count at or below 64 is recommended, as any value above that can lead to various issues.
  
  
  
tutorial/items_docs.txt · Last modified: 2023/06/12 16:25 by mineblock11