yarn/mappings/net/minecraft/entity/EquipmentSlot.mapping

69 lines
3.9 KiB
Plaintext

CLASS net/minecraft/class_1304 net/minecraft/entity/EquipmentSlot
COMMENT Provides enum types for several key slots found within an entity {@link net.minecraft.inventory.Inventory}.
COMMENT <p>
COMMENT Each equipment slot has a type, which represents what inventory category it is contained within.
COMMENT The {@code HAND} category covers the mainhand and offhand slots, while the {@code ARMOR} category covers the 4
COMMENT types of armor slots found in {@link net.minecraft.entity.LivingEntity}.
COMMENT <p>
COMMENT Each equipment slot contains information on where that slot should be located within a parent {@link net.minecraft.inventory.Inventory}.
COMMENT {@link #getEntitySlotId()} will provide the base slot index a slot should occupy (starting from {@code 0}),
COMMENT while {@link #getOffsetEntitySlotId(int)} will return the same value added to an offset index.
COMMENT <p>
COMMENT An equipment slot can be used to quickly access the item held by an inventory slot in a {@link LivingEntity} through
COMMENT methods such as {@link LivingEntity#getEquippedStack(EquipmentSlot)}, which will return the {@link net.minecraft.item.ItemStack}
COMMENT held in the entity's inventory slot pointed at by the target slot.
FIELD field_45739 CODEC Lnet/minecraft/class_3542$class_7292;
FIELD field_51935 NO_MAX_COUNT I
FIELD field_51936 maxCount I
FIELD field_6167 armorStandId I
FIELD field_6168 entityId I
FIELD field_6170 type Lnet/minecraft/class_1304$class_1305;
FIELD field_6175 name Ljava/lang/String;
METHOD <init> (Ljava/lang/String;ILnet/minecraft/class_1304$class_1305;IIILjava/lang/String;)V
ARG 3 type
ARG 4 entityId
ARG 5 maxCount
ARG 6 armorStandId
ARG 7 name
METHOD <init> (Ljava/lang/String;ILnet/minecraft/class_1304$class_1305;IILjava/lang/String;)V
ARG 3 type
ARG 4 entityId
ARG 5 armorStandId
ARG 6 name
METHOD method_32320 getOffsetEntitySlotId (I)I
COMMENT {@return the index of the inventory slot this slot should occupy, plus the passed in {@code offset} amount}
ARG 1 offset
METHOD method_46643 isArmorSlot ()Z
METHOD method_5923 getName ()Ljava/lang/String;
COMMENT {@return the unique name of this equipment slot}
COMMENT
COMMENT <p>The returned value will be a lower-case string (such as "chest" for {@link #CHEST}).
METHOD method_5924 byName (Ljava/lang/String;)Lnet/minecraft/class_1304;
COMMENT {@return the slot where {@linkplain #getName the name} is equal to {@code name}}
COMMENT If no slot matching the input name is found, this throws {@link IllegalArgumentException}.
COMMENT
COMMENT @throws IllegalArgumentException if no slot type could be found matching {@code name}
ARG 0 name
METHOD method_5925 getType ()Lnet/minecraft/class_1304$class_1305;
COMMENT {@return the target {@link EquipmentSlot.Type} that this slot targets}
COMMENT
COMMENT <p>
COMMENT An equipment slot either targets the hand or body type, which can be used to determine whether a request
COMMENT to manipulate slot data on an entity should be applied to an armor inventory or general item inventory.
METHOD method_5926 getArmorStandSlotId ()I
COMMENT {@return the index of the inventory slot this slot occupies in an {@link net.minecraft.entity.decoration.ArmorStandEntity}}
METHOD method_5927 getEntitySlotId ()I
COMMENT {@return the index of the inventory slot this slot should occupy}
COMMENT
COMMENT <p>
COMMENT In the case of {@link #MAINHAND} and {@link #OFFHAND}, this method will return 0 and 1, respectively.
COMMENT The remaining armor slots re-start at index 0 and end at index 3.
COMMENT
COMMENT <p>
COMMENT To calculate the target index of an inventory slot for a slot relative to the offset index of an entire
COMMENT inventory, visit {@link #getOffsetEntitySlotId(int)}.
METHOD method_60610 split (Lnet/minecraft/class_1799;)Lnet/minecraft/class_1799;
ARG 1 stack
CLASS class_1305 Type
COMMENT The type of body item slot an {@link EquipmentSlot} targets.