Package net.minecraft.item
Class ArmorItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.ArmorItem
public class ArmorItem extends Item
- Mappings:
Namespace Name official yjintermediary net/minecraft/class_2012named net/minecraft/item/ArmorItem
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArmorItem.MaterialNested classes/interfaces inherited from class net.minecraft.item.Item
Item.ToolMaterialType -
Field Summary
Fields Modifier and Type Field Description private static DispenserBehaviorARMOR_DISPENSER_BEHAVIORprivate static int[]BASE_DURABILITYstatic String[]EMPTYprivate ArmorItem.MaterialmaterialintmaterialIdintprotectionintslotFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, damageable, handheld, maxCount, RANDOM, REGISTRY -
Constructor Summary
Constructors Constructor Description ArmorItem(ArmorItem.Material material, int materialId, int slot) -
Method Summary
Modifier and Type Method Description booleancanRepair(ItemStack stack, ItemStack ingredient)Returns whether the item can be repaired via an anvil or crafting table.intgetColor(ItemStack stack)intgetDisplayColor(ItemStack stack, int color)intgetEnchantability()Returns the enchantability of an Item.ArmorItem.MaterialgetMaterial()booleanhasColor(ItemStack stack)ItemStackonStartUse(ItemStack stack, World world, PlayerEntity player)voidremoveColor(ItemStack stack)voidsetColor(ItemStack stack, int color)Methods inherited from class net.minecraft.item.Item
appendItemStacks, appendTooltip, byRawId, canUseOnEntity, fromBlock, getAttributeModifierMap, getDisplayName, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMaxUseTime, getMeta, getMiningSpeedMultiplier, getRarity, getRawId, getRecipeRemainder, getStatusEffectString, getTranslationKey, getTranslationKey, getUseAction, hasEnchantmentGlint, hasStatusEffectString, hasSubTypes, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFood, isHandheld, isNetworkSynced, isUnbreakable, onBlockBroken, onCraft, onEntityHit, onFinishUse, onHit, onUseStopped, postProcessTag, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setStatusEffectString, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncTagToClient, use
-
Field Details
-
BASE_DURABILITY
private static final int[] BASE_DURABILITY- Mappings:
Namespace Name Mixin selector official kLyj;k:[Iintermediary field_8534Lnet/minecraft/class_2012;field_8534:[Inamed BASE_DURABILITYLnet/minecraft/item/ArmorItem;BASE_DURABILITY:[I
-
EMPTY
- Mappings:
Namespace Name Mixin selector official aLyj;a:[Ljava/lang/String;intermediary field_8530Lnet/minecraft/class_2012;field_8530:[Ljava/lang/String;named EMPTYLnet/minecraft/item/ArmorItem;EMPTY:[Ljava/lang/String;
-
ARMOR_DISPENSER_BEHAVIOR
- Mappings:
Namespace Name Mixin selector official lLyj;l:Lcr;intermediary field_8535Lnet/minecraft/class_2012;field_8535:Lnet/minecraft/class_1387;named ARMOR_DISPENSER_BEHAVIORLnet/minecraft/item/ArmorItem;ARMOR_DISPENSER_BEHAVIOR:Lnet/minecraft/block/dispenser/DispenserBehavior;
-
slot
public final int slot- Mappings:
Namespace Name Mixin selector official bLyj;b:Iintermediary field_8531Lnet/minecraft/class_2012;field_8531:Inamed slotLnet/minecraft/item/ArmorItem;slot:I
-
protection
public final int protection- Mappings:
Namespace Name Mixin selector official cLyj;c:Iintermediary field_8532Lnet/minecraft/class_2012;field_8532:Inamed protectionLnet/minecraft/item/ArmorItem;protection:I
-
materialId
public final int materialId- Mappings:
Namespace Name Mixin selector official dLyj;d:Iintermediary field_8533Lnet/minecraft/class_2012;field_8533:Inamed materialIdLnet/minecraft/item/ArmorItem;materialId:I
-
material
- Mappings:
Namespace Name Mixin selector official mLyj;m:Lyj$a;intermediary field_8536Lnet/minecraft/class_2012;field_8536:Lnet/minecraft/class_2012$class_2013;named materialLnet/minecraft/item/ArmorItem;material:Lnet/minecraft/item/ArmorItem$Material;
-
-
Constructor Details
-
ArmorItem
- Mappings:
Namespace Name Mixin selector official <init>Lyj;<init>(Lyj$a;II)Vintermediary <init>Lnet/minecraft/class_2012;<init>(Lnet/minecraft/class_2012$class_2013;II)Vnamed <init>Lnet/minecraft/item/ArmorItem;<init>(Lnet/minecraft/item/ArmorItem$Material;II)V
-
-
Method Details
-
getDisplayColor
- Overrides:
getDisplayColorin classItem- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzx;I)Iintermediary method_8257Lnet/minecraft/class_2054;method_8257(Lnet/minecraft/class_2056;I)Inamed getDisplayColorLnet/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:
getEnchantabilityin classItem- Returns:
- Enchantability
- See Also:
ToolItem,ArmorItem- Mappings:
Namespace Name Mixin selector official bLzw;b()Iintermediary method_8269Lnet/minecraft/class_2054;method_8269()Inamed getEnchantabilityLnet/minecraft/item/Item;getEnchantability()I
-
getMaterial
- Mappings:
Namespace Name Mixin selector official x_Lyj;x_()Lyj$a;intermediary method_8174Lnet/minecraft/class_2012;method_8174()Lnet/minecraft/class_2012$class_2013;named getMaterialLnet/minecraft/item/ArmorItem;getMaterial()Lnet/minecraft/item/ArmorItem$Material;
-
hasColor
- Mappings:
Namespace Name Mixin selector official d_Lyj;d_(Lzx;)Zintermediary method_8173Lnet/minecraft/class_2012;method_8173(Lnet/minecraft/class_2056;)Znamed hasColorLnet/minecraft/item/ArmorItem;hasColor(Lnet/minecraft/item/ItemStack;)Z
-
getColor
- Mappings:
Namespace Name Mixin selector official bLyj;b(Lzx;)Iintermediary method_8169Lnet/minecraft/class_2012;method_8169(Lnet/minecraft/class_2056;)Inamed getColorLnet/minecraft/item/ArmorItem;getColor(Lnet/minecraft/item/ItemStack;)I
-
removeColor
- Mappings:
Namespace Name Mixin selector official cLyj;c(Lzx;)Vintermediary method_8171Lnet/minecraft/class_2012;method_8171(Lnet/minecraft/class_2056;)Vnamed removeColorLnet/minecraft/item/ArmorItem;removeColor(Lnet/minecraft/item/ItemStack;)V
-
setColor
- Mappings:
Namespace Name Mixin selector official bLyj;b(Lzx;I)Vintermediary method_8170Lnet/minecraft/class_2012;method_8170(Lnet/minecraft/class_2056;I)Vnamed setColorLnet/minecraft/item/ArmorItem;setColor(Lnet/minecraft/item/ItemStack;I)V
-
canRepair
Returns whether the item can be repaired via an anvil or crafting table.- Overrides:
canRepairin classItem- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzx;Lzx;)Zintermediary method_8267Lnet/minecraft/class_2054;method_8267(Lnet/minecraft/class_2056;Lnet/minecraft/class_2056;)Znamed canRepairLnet/minecraft/item/Item;canRepair(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-
onStartUse
- Overrides:
onStartUsein classItem- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzx;Ladm;Lwn;)Lzx;intermediary method_8260Lnet/minecraft/class_2054;method_8260(Lnet/minecraft/class_2056;Lnet/minecraft/class_99;Lnet/minecraft/class_1963;)Lnet/minecraft/class_2056;named onStartUseLnet/minecraft/item/Item;onStartUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;
-