Skip to content

Commit

Permalink
ItemStack related mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Zhang committed Sep 8, 2024
1 parent 574467a commit 97310cc
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mappings/net/minecraft/item/Item.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
FIELD field_8015 propertyGetters Ljava/util/Map;
METHOD <init> (Lnet/minecraft/class_1792$class_1793;)V
ARG 1 settings
METHOD method_0_8266 getTranslationKey (Lnet/minecraft/class_1799;)Ljava/lang/String;
ARG 1 stack
METHOD method_16698 isNetworkSynced ()Z
COMMENT {@return whether the item needs to sync additional data to clients}
COMMENT
Expand Down Expand Up @@ -201,6 +203,7 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
ARG 1 stack
ARG 2 world
ARG 3 player
METHOD method_7844 getAttributeModifiers ()Lcom/google/common/collect/Multimap;
METHOD method_7844 getAttributeModifiers (Lnet/minecraft/class_1304;)Lcom/google/common/collect/Multimap;
COMMENT {@return the attribute modifiers the item provides}
COMMENT
Expand Down Expand Up @@ -322,6 +325,8 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
METHOD method_7863 addPropertyGetter (Lnet/minecraft/class_2960;Lnet/minecraft/class_1800;)V
ARG 1 id
ARG 2 property
METHOD method_7864 getName (Lnet/minecraft/class_1799;)Ljava/lang/String;
ARG 1 stack
METHOD method_7864 getName (Lnet/minecraft/class_1799;)Lnet/minecraft/class_2561;
ARG 1 stack
METHOD method_7865 getMiningSpeedMultiplier (Lnet/minecraft/class_1799;Lnet/minecraft/class_2680;)F
Expand All @@ -335,7 +340,7 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
COMMENT @see MiningToolItem
ARG 1 stack
ARG 2 state
METHOD method_7866 getTranslationKey (Lnet/minecraft/class_1799;)Ljava/lang/String;
METHOD method_7866 getOrCreateTranslationKey (Lnet/minecraft/class_1799;)Ljava/lang/String;
COMMENT Gets the translation key of this item using the provided item stack for context.
ARG 1 stack
METHOD method_7867 fromBlock (Lnet/minecraft/class_2248;)Lnet/minecraft/class_1792;
Expand Down
40 changes: 40 additions & 0 deletions mappings/net/minecraft/item/ItemStack.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT </tr>
COMMENT </table>
COMMENT </div>
FIELD field_0_8640 damage I
FIELD field_24092 LORE_STYLE Lnet/minecraft/class_2583;
FIELD field_24093 holder Lnet/minecraft/class_1297;
FIELD field_24671 CODEC Lcom/mojang/serialization/Codec;
Expand Down Expand Up @@ -131,6 +132,9 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT
COMMENT @see <a href="nbt-operations">Item Stack NBT Operations</a>
FIELD field_8041 frame Lnet/minecraft/class_1533;
METHOD <init> (Lnet/minecraft/class_1792;II)V
ARG 1 item
ARG 2 count
METHOD <init> (Lnet/minecraft/class_1935;)V
ARG 1 item
METHOD <init> (Lnet/minecraft/class_1935;I)V
Expand All @@ -147,6 +151,16 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
METHOD <init> (Lnet/minecraft/class_6880;I)V
ARG 1 itemEntry
ARG 2 count
METHOD method_0_8322 fromNbt (Lnet/minecraft/class_2487;)Lnet/minecraft/class_1799;
ARG 0 nbt
METHOD method_0_8329 getTooltip (Lnet/minecraft/class_1657;Z)Ljava/util/List;
ARG 1 player
METHOD method_0_8333 getItem ()Lnet/minecraft/class_1792;
METHOD method_0_8334 setDamage (I)V
ARG 1 damage
METHOD method_0_8344 readNbt (Lnet/minecraft/class_2487;)V
ARG 1 nbt
METHOD method_0_8355 getDamage ()I
METHOD method_17869 (Ljava/util/List;Lnet/minecraft/class_2487;Lnet/minecraft/class_1887;)V
ARG 2 e
METHOD method_17870 appendEnchantments (Ljava/util/List;Lnet/minecraft/class_2499;)V
Expand Down Expand Up @@ -263,6 +277,16 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT
COMMENT @see <a href="#nbt-operations">Item Stack NBT Operations</a>
ARG 1 key
METHOD method_7911 getOrCreateSubNbt (Ljava/lang/String;Z)Lnet/minecraft/class_2487;
COMMENT {@return the compound NBT at the specified key in this item stack's NBT, or a
COMMENT new compound added to the stack if absent}
COMMENT
COMMENT <p>This should not be used when reading the NBT, as this can modify the item stack.
COMMENT Use {@link #getSubNbt} with a check for {@code null} instead.
COMMENT
COMMENT @see <a href="#nbt-operations">Item Stack NBT Operations</a>
ARG 1 key
ARG 2 createSubNbt
METHOD method_7912 setBobbingAnimationTime (I)V
ARG 1 bobbingAnimationTime
METHOD method_7913 use (Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1271;
Expand Down Expand Up @@ -335,6 +359,15 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT
COMMENT @see #setCustomName
COMMENT @see #hasCustomName
METHOD method_7926 getAttributeModifiers ()Lcom/google/common/collect/Multimap;
COMMENT {@return a multimap of attribute modifiers for {@code slot}}
COMMENT
COMMENT <p>If a custom attribute modifier exists under the {@code AttributeModifiers} key,
COMMENT this returns those modifiers only; otherwise, this returns the item's default
COMMENT attribute modifier.
COMMENT
COMMENT @see Item#getAttributeModifiers
COMMENT @see #addAttributeModifier
METHOD method_7926 getAttributeModifiers (Lnet/minecraft/class_1304;)Lcom/google/common/collect/Multimap;
COMMENT {@return a multimap of attribute modifiers for {@code slot}}
COMMENT
Expand Down Expand Up @@ -384,6 +417,8 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT Sets the count of items in this item stack.
ARG 1 count
COMMENT the count of items
METHOD method_7940 canDestroy (Lnet/minecraft/class_2248;)Z
ARG 1 block
METHOD method_7940 canDestroy (Lnet/minecraft/class_2378;Lnet/minecraft/class_2694;)Z
ARG 1 blockRegistry
ARG 2 pos
Expand All @@ -407,6 +442,8 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT @see #getEnchantments
METHOD method_7943 setFrame (Lnet/minecraft/class_1533;)V
ARG 1 frame
METHOD method_7944 canPlaceOn (Lnet/minecraft/class_2248;)Z
ARG 1 block
METHOD method_7944 canPlaceOn (Lnet/minecraft/class_2378;Lnet/minecraft/class_2694;)Z
ARG 1 blockRegistry
ARG 2 pos
Expand Down Expand Up @@ -524,6 +561,7 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT @see Item#getMaxDamage
COMMENT @see #isDamaged
COMMENT @see #getDamage
METHOD method_7964 getName ()Ljava/lang/String;
METHOD method_7964 getName ()Lnet/minecraft/class_2561;
COMMENT {@return the custom name of the stack if it exists, or the item's name}
METHOD method_7965 getBobbingAnimationTime ()I
Expand Down Expand Up @@ -605,6 +643,8 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
ARG 0 left
ARG 1 right
METHOD method_7976 getUseAction ()Lnet/minecraft/class_1839;
METHOD method_7977 setCustomName (Ljava/lang/String;)Lnet/minecraft/class_1799;
ARG 1 name
METHOD method_7977 setCustomName (Lnet/minecraft/class_2561;)Lnet/minecraft/class_1799;
COMMENT Sets the custom name of this item stack to {@code name}. If {@code null} is
COMMENT passed, this will remove the custom name (but does not remove other NBT compounds
Expand Down
3 changes: 3 additions & 0 deletions mappings/net/minecraft/item/Items.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ CLASS net/minecraft/class_1802 net/minecraft/item/Items
FIELD field_8200 RED_SAND Lnet/minecraft/class_1792;
FIELD field_8201 BIRCH_WOOD Lnet/minecraft/class_1792;
FIELD field_8202 PURPUR_SLAB Lnet/minecraft/class_1792;
FIELD field_8204 FILLED_MAP Lnet/minecraft/class_1806;
FIELD field_8205 YELLOW_CONCRETE_POWDER Lnet/minecraft/class_1792;
FIELD field_8206 ANDESITE_WALL Lnet/minecraft/class_1792;
FIELD field_8210 SPRUCE_WOOD Lnet/minecraft/class_1792;
Expand Down Expand Up @@ -540,6 +541,7 @@ CLASS net/minecraft/class_1802 net/minecraft/item/Items
FIELD field_8368 GREEN_BED Lnet/minecraft/class_1792;
FIELD field_8369 MOSSY_COBBLESTONE_SLAB Lnet/minecraft/class_1792;
FIELD field_8376 OAK_TRAPDOOR Lnet/minecraft/class_1792;
FIELD field_8378 FISHING_ROD Lnet/minecraft/class_1787;
FIELD field_8380 ORANGE_SHULKER_BOX Lnet/minecraft/class_1792;
FIELD field_8381 DEAD_BRAIN_CORAL Lnet/minecraft/class_1792;
FIELD field_8382 PODZOL Lnet/minecraft/class_1792;
Expand Down Expand Up @@ -823,6 +825,7 @@ CLASS net/minecraft/class_1802 net/minecraft/item/Items
FIELD field_8863 YELLOW_BED Lnet/minecraft/class_1792;
FIELD field_8865 LEVER Lnet/minecraft/class_1792;
FIELD field_8866 COMMAND_BLOCK Lnet/minecraft/class_1792;
FIELD field_8868 SHEARS Lnet/minecraft/class_1820;
FIELD field_8869 LIGHT_BLUE_STAINED_GLASS Lnet/minecraft/class_1792;
FIELD field_8870 RED_GLAZED_TERRACOTTA Lnet/minecraft/class_1792;
FIELD field_8871 GRAY_STAINED_GLASS_PANE Lnet/minecraft/class_1792;
Expand Down
1 change: 1 addition & 0 deletions mappings/net/minecraft/nbt/NbtCompound.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ CLASS net/minecraft/class_2487 net/minecraft/nbt/NbtCompound
COMMENT @see #get(String)
ARG 1 key
ARG 2 element
METHOD method_10566 put (Ljava/lang/String;Lnet/minecraft/class_2520;)V
METHOD method_10567 putByte (Ljava/lang/String;B)V
COMMENT Puts a {@code byte} to this compound.
COMMENT
Expand Down
1 change: 1 addition & 0 deletions mappings/net/minecraft/nbt/NbtElement.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ CLASS net/minecraft/class_2520 net/minecraft/nbt/NbtElement
COMMENT @see NbtCompound#getType(String)
COMMENT @see NbtCompound#contains(String, int)
FIELD field_33264 MAX_DEPTH I
METHOD method_0_5049 isEmpty ()Z
METHOD method_10707 copy ()Lnet/minecraft/class_2520;
COMMENT {@return an NBT element of equal value that won't change with this element}
METHOD method_10708 createTag (B)Lnet/minecraft/class_2520;
Expand Down
1 change: 1 addition & 0 deletions mappings/net/minecraft/nbt/NbtList.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ CLASS net/minecraft/class_2499 net/minecraft/nbt/NbtList
ARG 1 o
METHOD get (I)Ljava/lang/Object;
ARG 1 index
METHOD method_0_5022 size ()I
METHOD method_10600 getInt (I)I
COMMENT {@return the integer at {@code index}, or {@code 0} if the index is out of bounds
COMMENT or if this is not a list of integers}
Expand Down

0 comments on commit 97310cc

Please sign in to comment.