Enum Class EquipmentSlot
- All Implemented Interfaces:
- Serializable,- Comparable<EquipmentSlot>,- Constable
Inventory.
 
 Each equipment slot has a type, which represents what inventory category it is contained within.
 The HAND category covers the mainhand and offhand slots, while the ARMOR category covers the 4
 types of armor slots found in LivingEntity.
 
 Each equipment slot contains information on where that slot should be located within a parent Inventory.
 getEntitySlotId() will provide the base slot index a slot should occupy (starting from 0),
 while getOffsetEntitySlotId(int) will return the same value added to an offset index.
 
 An equipment slot can be used to quickly access the item held by an inventory slot in a LivingEntity through
 methods such as LivingEntity.getEquippedStack(EquipmentSlot), which will return the ItemStack
 held in the entity's inventory slot pointed at by the target slot.
- Mappings:
- Namespace - Name - official - bfo- intermediary - net/minecraft/class_1304- named - net/minecraft/entity/EquipmentSlot
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumThe type of body item slot anEquipmentSlottargets.Nested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final Stringprivate final EquipmentSlot.Type
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateEquipmentSlot(EquipmentSlot.Type type, int entityId, int armorStandId, String name) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic EquipmentSlotReturns the slot where the name is equal toname.static EquipmentSlotfromTypeIndex(EquipmentSlot.Type type, int index) Returns the equipment slot where the slot ID is equal toindexand the type of the slot is equal totype.intReturns the index of the inventory slot this slot occupies in anArmorStandEntity.intReturns the index of the inventory slot this slot should occupy.getName()Returns the unique name of this equipment slot.intgetOffsetEntitySlotId(int offset) Returns the index of the inventory slot this slot should occupy, plus the passed inoffsetamount.getType()Returns the targetEquipmentSlot.Typethat this slot targets.booleanstatic EquipmentSlotReturns the enum constant of this class with the specified name.static EquipmentSlot[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
MAINHAND- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbfo;a:Lbfo;- intermediary - field_6173- Lnet/minecraft/class_1304;field_6173:Lnet/minecraft/class_1304;- named - MAINHAND- Lnet/minecraft/entity/EquipmentSlot;MAINHAND:Lnet/minecraft/entity/EquipmentSlot;
 
- 
OFFHAND- Mappings:
- Namespace - Name - Mixin selector - official - b- Lbfo;b:Lbfo;- intermediary - field_6171- Lnet/minecraft/class_1304;field_6171:Lnet/minecraft/class_1304;- named - OFFHAND- Lnet/minecraft/entity/EquipmentSlot;OFFHAND:Lnet/minecraft/entity/EquipmentSlot;
 
- 
FEET- Mappings:
- Namespace - Name - Mixin selector - official - c- Lbfo;c:Lbfo;- intermediary - field_6166- Lnet/minecraft/class_1304;field_6166:Lnet/minecraft/class_1304;- named - FEET- Lnet/minecraft/entity/EquipmentSlot;FEET:Lnet/minecraft/entity/EquipmentSlot;
 
- 
LEGS- Mappings:
- Namespace - Name - Mixin selector - official - d- Lbfo;d:Lbfo;- intermediary - field_6172- Lnet/minecraft/class_1304;field_6172:Lnet/minecraft/class_1304;- named - LEGS- Lnet/minecraft/entity/EquipmentSlot;LEGS:Lnet/minecraft/entity/EquipmentSlot;
 
- 
CHEST- Mappings:
- Namespace - Name - Mixin selector - official - e- Lbfo;e:Lbfo;- intermediary - field_6174- Lnet/minecraft/class_1304;field_6174:Lnet/minecraft/class_1304;- named - CHEST- Lnet/minecraft/entity/EquipmentSlot;CHEST:Lnet/minecraft/entity/EquipmentSlot;
 
- 
HEAD- Mappings:
- Namespace - Name - Mixin selector - official - f- Lbfo;f:Lbfo;- intermediary - field_6169- Lnet/minecraft/class_1304;field_6169:Lnet/minecraft/class_1304;- named - HEAD- Lnet/minecraft/entity/EquipmentSlot;HEAD:Lnet/minecraft/entity/EquipmentSlot;
 
 
- 
- 
Field Details- 
type- Mappings:
- Namespace - Name - Mixin selector - official - g- Lbfo;g:Lbfo$a;- intermediary - field_6170- Lnet/minecraft/class_1304;field_6170:Lnet/minecraft/class_1304$class_1305;- named - type- Lnet/minecraft/entity/EquipmentSlot;type:Lnet/minecraft/entity/EquipmentSlot$Type;
 
- 
entityIdprivate final int entityId- Mappings:
- Namespace - Name - Mixin selector - official - h- Lbfo;h:I- intermediary - field_6168- Lnet/minecraft/class_1304;field_6168:I- named - entityId- Lnet/minecraft/entity/EquipmentSlot;entityId:I
 
- 
armorStandIdprivate final int armorStandId- Mappings:
- Namespace - Name - Mixin selector - official - i- Lbfo;i:I- intermediary - field_6167- Lnet/minecraft/class_1304;field_6167:I- named - armorStandId- Lnet/minecraft/entity/EquipmentSlot;armorStandId:I
 
- 
name- Mappings:
- Namespace - Name - Mixin selector - official - j- Lbfo;j:Ljava/lang/String;- intermediary - field_6175- Lnet/minecraft/class_1304;field_6175:Ljava/lang/String;- named - name- Lnet/minecraft/entity/EquipmentSlot;name:Ljava/lang/String;
 
 
- 
- 
Constructor Details- 
EquipmentSlot- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lbfo;<init>(Ljava/lang/String;ILbfo$a;IILjava/lang/String;)V- intermediary - <init>- Lnet/minecraft/class_1304;<init>(Ljava/lang/String;ILnet/minecraft/class_1304$class_1305;IILjava/lang/String;)V- named - <init>- Lnet/minecraft/entity/EquipmentSlot;<init>(Ljava/lang/String;ILnet/minecraft/entity/EquipmentSlot$Type;IILjava/lang/String;)V
 
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
getTypeReturns the targetEquipmentSlot.Typethat this slot targets.An equipment slot either targets the hand or body type, which can be used to determine whether a request to manipulate slot data on an entity should be applied to an armor inventory or general item inventory. - Returns:
- the target EquipmentSlot.Typethat this slot targets
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbfo;a()Lbfo$a;- intermediary - method_5925- Lnet/minecraft/class_1304;method_5925()Lnet/minecraft/class_1304$class_1305;- named - getType- Lnet/minecraft/entity/EquipmentSlot;getType()Lnet/minecraft/entity/EquipmentSlot$Type;
 
- 
getEntitySlotIdpublic int getEntitySlotId()Returns the index of the inventory slot this slot should occupy.In the case of MAINHANDandOFFHAND, this method will return 0 and 1, respectively. The remaining armor slots re-start at index 0 and end at index 3.To calculate the target index of an inventory slot for a slot relative to the offset index of an entire inventory, visit getOffsetEntitySlotId(int).- Returns:
- the index of the inventory slot this slot should occupy
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lbfo;b()I- intermediary - method_5927- Lnet/minecraft/class_1304;method_5927()I- named - getEntitySlotId- Lnet/minecraft/entity/EquipmentSlot;getEntitySlotId()I
 
- 
getOffsetEntitySlotIdpublic int getOffsetEntitySlotId(int offset) Returns the index of the inventory slot this slot should occupy, plus the passed inoffsetamount.- Returns:
- the index of the inventory slot this slot  should occupy, plus the passed in offsetamount
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbfo;a(I)I- intermediary - method_32320- Lnet/minecraft/class_1304;method_32320(I)I- named - getOffsetEntitySlotId- Lnet/minecraft/entity/EquipmentSlot;getOffsetEntitySlotId(I)I
 
- 
getArmorStandSlotIdpublic int getArmorStandSlotId()Returns the index of the inventory slot this slot occupies in anArmorStandEntity.- Returns:
- the index of the inventory slot this slot occupies in an ArmorStandEntity
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lbfo;c()I- intermediary - method_5926- Lnet/minecraft/class_1304;method_5926()I- named - getArmorStandSlotId- Lnet/minecraft/entity/EquipmentSlot;getArmorStandSlotId()I
 
- 
getNameReturns the unique name of this equipment slot.The returned value will be a lower-case string (such as "chest" for CHEST).- Returns:
- the unique name of this equipment slot
- Mappings:
- Namespace - Name - Mixin selector - official - d- Lbfo;d()Ljava/lang/String;- intermediary - method_5923- Lnet/minecraft/class_1304;method_5923()Ljava/lang/String;- named - getName- Lnet/minecraft/entity/EquipmentSlot;getName()Ljava/lang/String;
 
- 
isArmorSlotpublic boolean isArmorSlot()- Mappings:
- Namespace - Name - Mixin selector - official - e- Lbfo;e()Z- intermediary - method_46643- Lnet/minecraft/class_1304;method_46643()Z- named - isArmorSlot- Lnet/minecraft/entity/EquipmentSlot;isArmorSlot()Z
 
- 
byNameReturns the slot where the name is equal toname. If no slot matching the input name is found, this throwsIllegalArgumentException.- Returns:
- the slot where the name is equal to name
- Throws:
- IllegalArgumentException- if no slot type could be found matching- name
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbfo;a(Ljava/lang/String;)Lbfo;- intermediary - method_5924- Lnet/minecraft/class_1304;method_5924(Ljava/lang/String;)Lnet/minecraft/class_1304;- named - byName- Lnet/minecraft/entity/EquipmentSlot;byName(Ljava/lang/String;)Lnet/minecraft/entity/EquipmentSlot;
 
- 
fromTypeIndexReturns the equipment slot where the slot ID is equal toindexand the type of the slot is equal totype. If no slot could be found matching the inputtypeandindex, throwsIllegalArgumentException.- Returns:
- the equipment slot where the slot ID is equal to indexand the type of the slot is equal totype
- Throws:
- IllegalArgumentException- if no slot type could be found matching- typeand- index
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbfo;a(Lbfo$a;I)Lbfo;- intermediary - method_20234- Lnet/minecraft/class_1304;method_20234(Lnet/minecraft/class_1304$class_1305;I)Lnet/minecraft/class_1304;- named - fromTypeIndex- Lnet/minecraft/entity/EquipmentSlot;fromTypeIndex(Lnet/minecraft/entity/EquipmentSlot$Type;I)Lnet/minecraft/entity/EquipmentSlot;
 
 
-