Class ArmorItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.ArmorItem

public class ArmorItem extends Item
Mappings:
Namespace Name
official yj
intermediary net/minecraft/class_1028
named net/minecraft/item/ArmorItem
  • Field Details

    • BASE_DURABILITY

      private static final int[] BASE_DURABILITY
      Mappings:
      Namespace Name Mixin selector
      official k Lyj;k:[I
      intermediary field_4158 Lnet/minecraft/class_1028;field_4158:[I
      named BASE_DURABILITY Lnet/minecraft/item/ArmorItem;BASE_DURABILITY:[I
    • EMPTY

      public static final String[] EMPTY
      Mappings:
      Namespace Name Mixin selector
      official a Lyj;a:[Ljava/lang/String;
      intermediary field_6163 Lnet/minecraft/class_1028;field_6163:[Ljava/lang/String;
      named EMPTY Lnet/minecraft/item/ArmorItem;EMPTY:[Ljava/lang/String;
    • ARMOR_DISPENSER_BEHAVIOR

      private static final DispenserBehavior ARMOR_DISPENSER_BEHAVIOR
      Mappings:
      Namespace Name Mixin selector
      official l Lyj;l:Lcr;
      intermediary field_6165 Lnet/minecraft/class_1028;field_6165:Lnet/minecraft/class_1348;
      named ARMOR_DISPENSER_BEHAVIOR Lnet/minecraft/item/ArmorItem;ARMOR_DISPENSER_BEHAVIOR:Lnet/minecraft/block/dispenser/DispenserBehavior;
    • slot

      public final int slot
      Mappings:
      Namespace Name Mixin selector
      official b Lyj;b:I
      intermediary field_4156 Lnet/minecraft/class_1028;field_4156:I
      named slot Lnet/minecraft/item/ArmorItem;slot:I
    • protection

      public final int protection
      Mappings:
      Namespace Name Mixin selector
      official c Lyj;c:I
      intermediary field_4157 Lnet/minecraft/class_1028;field_4157:I
      named protection Lnet/minecraft/item/ArmorItem;protection:I
    • materialId

      public final int materialId
      Mappings:
      Namespace Name Mixin selector
      official d Lyj;d:I
      intermediary field_4160 Lnet/minecraft/class_1028;field_4160:I
      named materialId Lnet/minecraft/item/ArmorItem;materialId:I
    • material

      private final ArmorItem.Material material
      Mappings:
      Namespace Name Mixin selector
      official m Lyj;m:Lyj$a;
      intermediary field_4159 Lnet/minecraft/class_1028;field_4159:Lnet/minecraft/class_1028$class_1029;
      named material Lnet/minecraft/item/ArmorItem;material:Lnet/minecraft/item/ArmorItem$Material;
  • Constructor Details

    • ArmorItem

      public ArmorItem(ArmorItem.Material material, int materialId, int slot)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lyj;<init>(Lyj$a;II)V
      intermediary <init> Lnet/minecraft/class_1028;<init>(Lnet/minecraft/class_1028$class_1029;II)V
      named <init> Lnet/minecraft/item/ArmorItem;<init>(Lnet/minecraft/item/ArmorItem$Material;II)V
  • Method Details

    • getDisplayColor

      @Environment(CLIENT) public int getDisplayColor(ItemStack stack, int color)
      Overrides:
      getDisplayColor in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;I)I
      intermediary method_3344 Lnet/minecraft/class_1069;method_3344(Lnet/minecraft/class_1071;I)I
      named getDisplayColor Lnet/minecraft/item/Item;getDisplayColor(Lnet/minecraft/item/ItemStack;I)I
    • getEnchantability

      public int getEnchantability()
      Returns the enchantability of an Item. Used by tools and armor
      Overrides:
      getEnchantability in class Item
      Returns:
      Enchantability
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lzw;b()I
      intermediary method_3362 Lnet/minecraft/class_1069;method_3362()I
      named getEnchantability Lnet/minecraft/item/Item;getEnchantability()I
    • getMaterial

      public ArmorItem.Material getMaterial()
      Mappings:
      Namespace Name Mixin selector
      official x_ Lyj;x_()Lyj$a;
      intermediary method_4602 Lnet/minecraft/class_1028;method_4602()Lnet/minecraft/class_1028$class_1029;
      named getMaterial Lnet/minecraft/item/ArmorItem;getMaterial()Lnet/minecraft/item/ArmorItem$Material;
    • hasColor

      public boolean hasColor(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official d_ Lyj;d_(Lzx;)Z
      intermediary method_4598 Lnet/minecraft/class_1028;method_4598(Lnet/minecraft/class_1071;)Z
      named hasColor Lnet/minecraft/item/ArmorItem;hasColor(Lnet/minecraft/item/ItemStack;)Z
    • getColor

      public int getColor(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official b Lyj;b(Lzx;)I
      intermediary method_4599 Lnet/minecraft/class_1028;method_4599(Lnet/minecraft/class_1071;)I
      named getColor Lnet/minecraft/item/ArmorItem;getColor(Lnet/minecraft/item/ItemStack;)I
    • removeColor

      public void removeColor(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official c Lyj;c(Lzx;)V
      intermediary method_4601 Lnet/minecraft/class_1028;method_4601(Lnet/minecraft/class_1071;)V
      named removeColor Lnet/minecraft/item/ArmorItem;removeColor(Lnet/minecraft/item/ItemStack;)V
    • setColor

      public void setColor(ItemStack stack, int color)
      Mappings:
      Namespace Name Mixin selector
      official b Lyj;b(Lzx;I)V
      intermediary method_4600 Lnet/minecraft/class_1028;method_4600(Lnet/minecraft/class_1071;I)V
      named setColor Lnet/minecraft/item/ArmorItem;setColor(Lnet/minecraft/item/ItemStack;I)V
    • canRepair

      public boolean canRepair(ItemStack stack, ItemStack ingredient)
      Returns whether the item can be repaired via an anvil or crafting table.
      Overrides:
      canRepair in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;Lzx;)Z
      intermediary method_4615 Lnet/minecraft/class_1069;method_4615(Lnet/minecraft/class_1071;Lnet/minecraft/class_1071;)Z
      named canRepair Lnet/minecraft/item/Item;canRepair(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
    • onStartUse

      public ItemStack onStartUse(ItemStack stack, World world, PlayerEntity player)
      Overrides:
      onStartUse in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;Ladm;Lwn;)Lzx;
      intermediary method_3358 Lnet/minecraft/class_1069;method_3358(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)Lnet/minecraft/class_1071;
      named onStartUse Lnet/minecraft/item/Item;onStartUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;