JavaDocs for Item and Item.Settings (#1792)

* item mappings

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: Gegy <gegy1000@gmail.com>

* Grammar fix from Items's to Item's

Co-authored-by: Gegy <gegy1000@gmail.com>

* fix Item capitalization

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/item/Item.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Fix style issues. Use inline return

* Fix javadoc format error

* Remove periods at the end of inline returns

* Update Item.mapping

Co-authored-by: Gegy <gegy1000@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: ByMartrixx <bymartrixx@gmail.com>
This commit is contained in:
Draylar 2021-06-08 18:14:38 -05:00 committed by GitHub
parent 3320a21d3c
commit d49bf4a58f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 60 additions and 0 deletions

View File

@ -18,11 +18,14 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
METHOD method_19263 isFood ()Z
COMMENT Checks if this item is food and therefore is edible.
METHOD method_19264 getFoodComponent ()Lnet/minecraft/class_4174;
COMMENT {@return this item's {@link #foodComponent FoodComponent}, or {@code null} if none was set}
METHOD method_21830 getEatSound ()Lnet/minecraft/class_3414;
METHOD method_21831 getDrinkSound ()Lnet/minecraft/class_3414;
METHOD method_24357 damage (Lnet/minecraft/class_1282;)Z
COMMENT {@return whether this item can be damaged by the given {@link DamageSource source}}
ARG 1 source
METHOD method_24358 isFireproof ()Z
COMMENT {@return whether this item is immune to fire and lava damage}
METHOD method_31565 onStackClicked (Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;Lnet/minecraft/class_5536;Lnet/minecraft/class_1657;)Z
ARG 1 stack
ARG 2 slot
@ -77,6 +80,7 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
ARG 3 user
ARG 4 remainingUseTicks
METHOD method_7841 getMaxDamage ()I
COMMENT {@return the maximum durability of this item} Can be configured through {@link Item.Settings#maxDamage(int) settings.maxDamage()}.
METHOD method_7843 onCraft (Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;)V
COMMENT Called when a player acquires the item by crafting, smelting, smithing, etc.
ARG 1 stack
@ -85,6 +89,7 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
METHOD method_7844 getAttributeModifiers (Lnet/minecraft/class_1304;)Lcom/google/common/collect/Multimap;
ARG 1 slot
METHOD method_7846 isDamageable ()Z
COMMENT {@return whether this item can lose durability}
METHOD method_7847 useOnEntity (Lnet/minecraft/class_1799;Lnet/minecraft/class_1657;Lnet/minecraft/class_1309;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
ARG 1 stack
ARG 2 user
@ -128,6 +133,13 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
ARG 2 world
ARG 3 user
METHOD method_7862 getRarity (Lnet/minecraft/class_1799;)Lnet/minecraft/class_1814;
COMMENT {@return this item's rarity, which changes the color of its name}
COMMENT
COMMENT <p>By default, if an item has an enchantment, its rarity is modified:
COMMENT <ul>
COMMENT \t<li>Common and Uncommon -> Rare
COMMENT \t<li>Rare -> Epic
COMMENT </ul>
ARG 1 stack
METHOD method_7864 getName (Lnet/minecraft/class_1799;)Lnet/minecraft/class_2561;
ARG 1 stack
@ -142,6 +154,9 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
ARG 0 block
METHOD method_7869 getOrCreateTranslationKey ()Ljava/lang/String;
METHOD method_7870 isEnchantable (Lnet/minecraft/class_1799;)Z
COMMENT {@return whether the given {@link ItemStack} is enchantable}
COMMENT
COMMENT <p>By default, ItemStacks are enchantable if their max stack count is 1 and they can be damaged.
ARG 1 stack
METHOD method_7872 raycast (Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_3959$class_242;)Lnet/minecraft/class_3965;
ARG 0 world
@ -172,8 +187,11 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
METHOD method_7880 getRawId (Lnet/minecraft/class_1792;)I
ARG 0 item
METHOD method_7881 getMaxUseTime (Lnet/minecraft/class_1799;)I
COMMENT {@return the maximum use (right-click) time of this item, in ticks}
COMMENT Once a player has used an item for said number of ticks, they stop using it, and {@link Item#finishUsing} is called.
ARG 1 stack
METHOD method_7882 getMaxCount ()I
COMMENT {@return the maximum stack count of any ItemStack with this item} Can be configured through {@link Item.Settings#maxCount(int) settings.maxCount()}.
METHOD method_7884 useOnBlock (Lnet/minecraft/class_1838;)Lnet/minecraft/class_1269;
COMMENT Called when an item is used on a block.
COMMENT
@ -213,17 +231,59 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
FIELD field_8019 maxDamage I
FIELD field_8020 maxCount I
METHOD method_19265 food (Lnet/minecraft/class_4174;)Lnet/minecraft/class_1792$class_1793;
COMMENT When set, any item configured with this Settings instance will be edible based on the provided {@link FoodComponent}.
COMMENT
COMMENT @return this instance
ARG 1 foodComponent
COMMENT configured food properties for any item using this Settings instance
METHOD method_24359 fireproof ()Lnet/minecraft/class_1792$class_1793;
COMMENT If called, any item with this Settings instance is immune to fire and lava damage.
COMMENT
COMMENT @return this instance
METHOD method_7889 maxCount (I)Lnet/minecraft/class_1792$class_1793;
COMMENT Sets the maximum stack count of any ItemStack with an Item using this Settings instance.
COMMENT
COMMENT <p>Note that a count over 64 leads to unreliable behavior in GUIs.
COMMENT Damageable items can not have a maximum stack count (they default to 1).
COMMENT An Item.Settings' max count defaults to 64.
COMMENT
COMMENT @throws RuntimeException if this Settings instance also has a max damage value set
COMMENT @return this instance
ARG 1 maxCount
COMMENT maximum stack count of any ItemStack with an item using this Settings instance
METHOD method_7892 group (Lnet/minecraft/class_1761;)Lnet/minecraft/class_1792$class_1793;
COMMENT Sets the ItemGroup of any item using this Settings instance. ItemGroups represent tabs in the creative inventory.
COMMENT
COMMENT @return this instance
ARG 1 group
COMMENT {@link ItemGroup itemGroup} to use
METHOD method_7894 rarity (Lnet/minecraft/class_1814;)Lnet/minecraft/class_1792$class_1793;
COMMENT Sets the {@link Rarity} of any item configured with this Settings instance, which changes the color of its name.
COMMENT
COMMENT <p>An item's rarity defaults to {@link Rarity.COMMON}.
COMMENT
COMMENT @return this instance
ARG 1 rarity
COMMENT rarity to apply to items using this Settings instance
METHOD method_7895 maxDamage (I)Lnet/minecraft/class_1792$class_1793;
COMMENT Sets the maximum durability of any item configured with this Settings instance.
COMMENT
COMMENT <p>Note that max stack count is set to 1 when this method is called.
COMMENT
COMMENT @return this instance
ARG 1 maxDamage
COMMENT maximum durability of an ItemStack using an item with this Item.Settings instance
METHOD method_7896 recipeRemainder (Lnet/minecraft/class_1792;)Lnet/minecraft/class_1792$class_1793;
COMMENT Sets the recipe remainder for any item configured with this Settings instance.
COMMENT When an item with a recipe remainder is used in a crafting recipe, the remainder is left in the table or returned to the player.
COMMENT
COMMENT @return this instance
ARG 1 recipeRemainder
METHOD method_7898 maxDamageIfAbsent (I)Lnet/minecraft/class_1792$class_1793;
COMMENT Calls {@link Item.Settings#maxDamage} If this Settings instance has not already set max damage (or if max damage is the default value, 0).
COMMENT
COMMENT <p>Note that max stack count is set to 1 when maxDamage is called.
COMMENT
COMMENT @return this instance
ARG 1 maxDamage
COMMENT maximum durability of an ItemStack using an item with this Item.Settings instance