Class SwordItem

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

public class SwordItem extends Item
Mappings:
Namespace Name
official ajy
intermediary net/minecraft/class_1101
named net/minecraft/item/SwordItem
  • Field Details

    • attackMultiplier

      private final float attackMultiplier
      Mappings:
      Namespace Name Mixin selector
      official a Lajy;a:F
      intermediary field_6950 Lnet/minecraft/class_1101;field_6950:F
      named attackMultiplier Lnet/minecraft/item/SwordItem;attackMultiplier:F
    • material

      private final Item.ToolMaterialType material
      Mappings:
      Namespace Name Mixin selector
      official b Lajy;b:Lain$a;
      intermediary field_4411 Lnet/minecraft/class_1101;field_4411:Lnet/minecraft/class_1069$class_1070;
      named material Lnet/minecraft/item/SwordItem;material:Lnet/minecraft/item/Item$ToolMaterialType;
  • Constructor Details

    • SwordItem

      public SwordItem(Item.ToolMaterialType material)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lajy;<init>(Lain$a;)V
      intermediary <init> Lnet/minecraft/class_1101;<init>(Lnet/minecraft/class_1069$class_1070;)V
      named <init> Lnet/minecraft/item/SwordItem;<init>(Lnet/minecraft/item/Item$ToolMaterialType;)V
  • Method Details

    • getAttackDamage

      public float getAttackDamage()
      Mappings:
      Namespace Name Mixin selector
      official g Lajy;g()F
      intermediary method_4632 Lnet/minecraft/class_1101;method_4632()F
      named getAttackDamage Lnet/minecraft/item/SwordItem;getAttackDamage()F
    • getBlockBreakingSpeed

      public float getBlockBreakingSpeed(ItemStack stack, BlockState state)
      Overrides:
      getBlockBreakingSpeed in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a(Laip;Lawt;)F
      intermediary method_3351 Lnet/minecraft/class_1069;method_3351(Lnet/minecraft/class_1071;Lnet/minecraft/class_2232;)F
      named getBlockBreakingSpeed Lnet/minecraft/item/Item;getBlockBreakingSpeed(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;)F
    • onEntityHit

      public boolean onEntityHit(ItemStack stack, LivingEntity entity1, LivingEntity entity2)
      Overrides:
      onEntityHit in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a(Laip;Lvp;Lvp;)Z
      intermediary method_3354 Lnet/minecraft/class_1069;method_3354(Lnet/minecraft/class_1071;Lnet/minecraft/class_1699;Lnet/minecraft/class_1699;)Z
      named onEntityHit Lnet/minecraft/item/Item;onEntityHit(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Z
    • method_3356

      public boolean method_3356(ItemStack itemStack, World world, BlockState blockState, BlockPos blockPos, LivingEntity livingEntity)
      Overrides:
      method_3356 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a(Laip;Lamu;Lawt;Let;Lvp;)Z
      intermediary method_3356 Lnet/minecraft/class_1069;method_3356(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_2232;Lnet/minecraft/class_2552;Lnet/minecraft/class_1699;)Z
      named method_3356 Lnet/minecraft/item/Item;method_3356(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/LivingEntity;)Z
    • isHandheld

      @Environment(CLIENT) public boolean isHandheld()
      Returns whether the item is supposed to look as handheld.
      Overrides:
      isHandheld in class Item
      Mappings:
      Namespace Name Mixin selector
      official D_ Lain;D_()Z
      intermediary method_3372 Lnet/minecraft/class_1069;method_3372()Z
      named isHandheld Lnet/minecraft/item/Item;isHandheld()Z
    • method_3346

      public boolean method_3346(BlockState blockState)
      Overrides:
      method_3346 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a(Lawt;)Z
      intermediary method_3346 Lnet/minecraft/class_1069;method_3346(Lnet/minecraft/class_2232;)Z
      named method_3346 Lnet/minecraft/item/Item;method_3346(Lnet/minecraft/block/BlockState;)Z
    • 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 c Lain;c()I
      intermediary method_3362 Lnet/minecraft/class_1069;method_3362()I
      named getEnchantability Lnet/minecraft/item/Item;getEnchantability()I
    • getToolMaterial

      public String getToolMaterial()
      Mappings:
      Namespace Name Mixin selector
      official h Lajy;h()Ljava/lang/String;
      intermediary method_3465 Lnet/minecraft/class_1101;method_3465()Ljava/lang/String;
      named getToolMaterial Lnet/minecraft/item/SwordItem;getToolMaterial()Ljava/lang/String;
    • 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 Lain;a(Laip;Laip;)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
    • method_6326

      public Multimap<String,AttributeModifier> method_6326(EquipmentSlot equipmentSlot)
      Overrides:
      method_6326 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a(Lvl;)Lcom/google/common/collect/Multimap;
      intermediary method_6326 Lnet/minecraft/class_1069;method_6326(Lnet/minecraft/class_2968;)Lcom/google/common/collect/Multimap;
      named method_6326 Lnet/minecraft/item/Item;method_6326(Lnet/minecraft/entity/EquipmentSlot;)Lcom/google/common/collect/Multimap;