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_2012
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_8534 Lnet/minecraft/class_2012;field_8534:[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_8530 Lnet/minecraft/class_2012;field_8530:[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_8535 Lnet/minecraft/class_2012;field_8535:Lnet/minecraft/class_1387;
      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_8531 Lnet/minecraft/class_2012;field_8531: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_8532 Lnet/minecraft/class_2012;field_8532: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_8533 Lnet/minecraft/class_2012;field_8533: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_8536 Lnet/minecraft/class_2012;field_8536:Lnet/minecraft/class_2012$class_2013;
      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_2012;<init>(Lnet/minecraft/class_2012$class_2013;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_8257 Lnet/minecraft/class_2054;method_8257(Lnet/minecraft/class_2056;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:
      ToolItem, ArmorItem
      Mappings:
      Namespace Name Mixin selector
      official b Lzw;b()I
      intermediary method_8269 Lnet/minecraft/class_2054;method_8269()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_8174 Lnet/minecraft/class_2012;method_8174()Lnet/minecraft/class_2012$class_2013;
      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_8173 Lnet/minecraft/class_2012;method_8173(Lnet/minecraft/class_2056;)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_8169 Lnet/minecraft/class_2012;method_8169(Lnet/minecraft/class_2056;)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_8171 Lnet/minecraft/class_2012;method_8171(Lnet/minecraft/class_2056;)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_8170 Lnet/minecraft/class_2012;method_8170(Lnet/minecraft/class_2056;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_8267 Lnet/minecraft/class_2054;method_8267(Lnet/minecraft/class_2056;Lnet/minecraft/class_2056;)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_8260 Lnet/minecraft/class_2054;method_8260(Lnet/minecraft/class_2056;Lnet/minecraft/class_99;Lnet/minecraft/class_1963;)Lnet/minecraft/class_2056;
      named onStartUse Lnet/minecraft/item/Item;onStartUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;