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
tutorial:items_docs [2020/11/02 04:43] – Update & fabricitemsettings leocth2tutorial:items_docs [2023/06/12 16:25] (current) mineblock11
Line 1: Line 1:
 +:!: //This page is archived.//
 +
 ====== Items ====== ====== Items ======
-Items are the pieces of content that appear in your inventory. They can perform actions when you click, act as food, or spawn entities. The following documentation will give you a rundown of the entire ''Item'' class and everything related to it. For a tutorial you can follow along, visit [[tutorial:items|Practical Example: Adding an Item]].+ 
 +Items are the pieces of content that appear in your inventory. They can perform actions when you click, act as food, or spawn entities. The following documentation will give you a rundown of the entire ''Item'' class and everything related to it.
  
 ===== Item Settings ===== ===== Item Settings =====
Line 12: Line 15:
 | 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. | 
 | 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. | | fireproof | None | Marks the item as being fireproof. Prevents the item from being destroyed by lava and fire. |
Line 30: Line 32:
 public Item.Settings food(FoodComponent foodComponent) public Item.Settings food(FoodComponent foodComponent)
 </code> </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.+''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.
  
 ---- ----
Line 67: Line 69:
  
 When a recipe remainder is set on an Item, any recipe using that Item will return the remainder on craft. This is used for buckets (Water, Lava, Milk) and bottles (Dragon Breath, Honey) returning their respective empty items when used in recipes. When a recipe remainder is set on an Item, any recipe using that Item will return the remainder on craft. This is used for buckets (Water, Lava, Milk) and bottles (Dragon Breath, Honey) returning their respective empty items when used in recipes.
- 
----- 
- 
-==== Group ==== 
-<code java> 
-public Item.Settings group(ItemGroup group) 
-</code> 
-''group'' - ItemGroup to add Item in. 
- 
-Each ItemGroup appears as a tab in the creative inventory. Adding an Item to this group will add it to the tab. The order of the group is based on registry order. For more information on creating a group, see the [[tutorial:itemgroup|ItemGroups page]]. 
  
 ---- ----
Line 101: Line 93:
  
 Marks the item as being fireproof, and protects the item entity that contains the item from fire and lava. Marks the item as being fireproof, and protects the item entity that contains the item from fire and lava.
- 
----- 
- 
-==== Rarity ==== 
-<code java> 
-public Item.Settings rarity(Rarity rarity) 
-</code> 
-''rarity'' - Rarity of the given Item. 
- 
-If Rarity is set, the given Item will have a custom name color. An Item's Rarity defaults to common. 
-^ Rarity ^ Color ^ 
-| Common | White | 
-| Uncommon | Yellow | 
-| Rare | Aqua | 
-| Epic | Light Purple | 
- 
tutorial/items_docs.1604292182.txt.gz · Last modified: 2020/11/02 04:43 by leocth2