User Tools

Site Tools


tutorial:items_docs

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:items_docs [2020/04/01 19:45] – finish Item.Settings method docs draylartutorial:items_docs [2020/12/29 17:37] mysterious_dev
Line 7: Line 7:
  
 ^ Method      ^ Args       ^ Description          ^ ^ Method      ^ Args       ^ Description          ^
-| food    | FoodComponent | Changes the Item to be edible based on the given ''FoodComponent''. | +| food | ''FoodComponent'' | Changes the Item to be edible based on the given ''FoodComponent''. | 
-| maxCount    | int | Sets the Item's max stack count. Can't be used in combination with damage. | +| maxCount    | ''int'' | Sets the Item's max stack count. Can't be used in combination with damage. | 
-| maxDamageIfAbsent | int | Sets the Item's maximum damage count if it hasn't already been set. | +| maxDamageIfAbsent | ''int'' | Sets the Item's maximum damage count if it hasn't already been set. | 
-| maxDamage |int | Sets the Item's max stack durability. | +| maxDamage | ''int'' | Sets the Item's max stack durability. | 
-| recipeRemainder | Item | Sets the Item's recipe remainder, which is given back to the player after the Item is used in a recipe. | +| recipeRemainder | ''Item'' | Sets the Item's recipe remainder, which is given back to the player after the Item is used in a recipe. | 
-| 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. | 
 +| fireproof | None | Marks the item as being fireproof. Prevents the item from being destroyed by lava and fire. | 
 + 
 +===== Fabric Item Settings ===== 
 +The Fabric Item API provides extra methods to set even more attributes. To use it, just replace ''new Item.Settings()'' with ''new FabricItemSettings()''
 +Heres the list of additional functionalities ''FabricItemSettings'' provides: 
 + 
 +^ Method      ^ Args       ^ Description          ^ 
 +| equipmentSlot | ''EquipmentSlotProvider'' | Sets the equipment slot provider of the item. | 
 +| customDamage | ''CustomDamageHandler'' | Sets the custom damage handler of the item. |
  
 ---- ----
Line 83: Line 92:
 | Rare | Aqua | | Rare | Aqua |
 | Epic | Light Purple | | Epic | Light Purple |
 +
 +----
 +
 +==== Fireproof ====
 +<code java>
 +public Item.Settings fireproof()
 +</code>
 +
 +Marks the item as being fireproof, and protects the item entity that contains the item from fire and lava.
tutorial/items_docs.txt · Last modified: 2023/06/12 16:25 by mineblock11