Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added other Item Property Methods #505

Open
wants to merge 3 commits into
base: 1.20.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/items/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ Basic items that need no special functionality (think sticks or sugar) do not ne
| Method | Description |
|:------------------:|:----------------------------------------------|
| `requiredFeatures` | Sets the required `FeatureFlag`s needed to see this item in the `CreativeModeTab` it is added to. |
| `food` | Makes the item eatable and is used to store information about the Hunger and Effects. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence could probably be reworded to explain the concept better. Probably something that mentions FoodData iirc the class correctly.

| `durability` | Sets the maximum damage value for this item. If it is over `0`, two item properties "damaged" and "damage" are added. |
| `defaultDurability` | Sets the Item Durability for if it has a Maximum Damage of 0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `defaultDurability` | Sets the Item Durability for if it has a Maximum Damage of 0.
| `defaultDurability` | Sets the durability of an item, assuming the item isn't stackable.

| `stacksTo` | Sets the maximum stack size. You cannot have an item that is both damageable and stackable. |
| `setNoRepair` | Makes this item impossible to repair, even if it is damageable. |
| `craftRemainder` | Sets this item's container item, the way that lava buckets give you back an empty bucket when they are used. |
| `rarity` | Sets the Item Name Color in the ToolTip based on Rarity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `rarity` | Sets the Item Name Color in the ToolTip based on Rarity.
| `rarity` | Sets the rarity of an item. This currently only changes the color of the item name in the tooltip.

| `fireResistant` | Makes it so the item is resistant to fire.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this include lava or just fire blocks?

| `setNoRepair` | Makes the item impossible to Repair.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `setNoRepair` | Makes the item impossible to Repair.
| `setNoRepair` | Makes the item impossible to repair, assuming it has durability.


The above methods are chainable, meaning they `return this` to facilitate calling them in series.

Expand Down