Class SwordItem

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

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

    • attackMultiplier

      private float attackMultiplier
      Mappings:
      Namespace Name Mixin selector
      official a Laay;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 Laay;b:Lzw$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> Laay;<init>(Lzw$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 Laay;g()F
      intermediary method_4632 Lnet/minecraft/class_1101;method_4632()F
      named getAttackDamage Lnet/minecraft/item/SwordItem;getAttackDamage()F
    • getMiningSpeedMultiplier

      public float getMiningSpeedMultiplier(ItemStack stack, Block block)
      Overrides:
      getMiningSpeedMultiplier in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;Lafh;)F
      intermediary method_3351 Lnet/minecraft/class_1069;method_3351(Lnet/minecraft/class_1071;Lnet/minecraft/class_197;)F
      named getMiningSpeedMultiplier Lnet/minecraft/item/Item;getMiningSpeedMultiplier(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/Block;)F
    • onEntityHit

      public boolean onEntityHit(ItemStack stack, LivingEntity entity1, LivingEntity entity2)
      Overrides:
      onEntityHit in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;Lpr;Lpr;)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
    • onBlockBroken

      public boolean onBlockBroken(ItemStack stack, World world, Block block, BlockPos pos, LivingEntity entity)
      Overrides:
      onBlockBroken in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;Ladm;Lafh;Lcj;Lpr;)Z
      intermediary method_3356 Lnet/minecraft/class_1069;method_3356(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_197;Lnet/minecraft/class_2552;Lnet/minecraft/class_1699;)Z
      named onBlockBroken Lnet/minecraft/item/Item;onBlockBroken(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/block/Block;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 w_ Lzw;w_()Z
      intermediary method_3372 Lnet/minecraft/class_1069;method_3372()Z
      named isHandheld Lnet/minecraft/item/Item;isHandheld()Z
    • getUseAction

      public UseAction getUseAction(ItemStack stack)
      Returns the UseAction for an item when the item is used. Used by food, potions, bows, etc.
      Overrides:
      getUseAction in class Item
      Parameters:
      stack - The ItemStack that was used
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Lzw;e(Lzx;)Laba;
      intermediary method_3366 Lnet/minecraft/class_1069;method_3366(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1099;
      named getUseAction Lnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
    • getMaxUseTime

      public int getMaxUseTime(ItemStack stack)
      Overrides:
      getMaxUseTime in class Item
      Mappings:
      Namespace Name Mixin selector
      official d Lzw;d(Lzx;)I
      intermediary method_3350 Lnet/minecraft/class_1069;method_3350(Lnet/minecraft/class_1071;)I
      named getMaxUseTime Lnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
    • 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;
    • isEffectiveOn

      public boolean isEffectiveOn(Block block)
      Overrides:
      isEffectiveOn in class Item
      Mappings:
      Namespace Name Mixin selector
      official b Lzw;b(Lafh;)Z
      intermediary method_3346 Lnet/minecraft/class_1069;method_3346(Lnet/minecraft/class_197;)Z
      named isEffectiveOn Lnet/minecraft/item/Item;isEffectiveOn(Lnet/minecraft/block/Block;)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 b Lzw;b()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 Laay;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 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
    • getAttributeModifierMap

      public Multimap<String,AttributeModifier> getAttributeModifierMap()
      Returns a map containing entity attributes that are modified by the item
      Overrides:
      getAttributeModifierMap in class Item
      Mappings:
      Namespace Name Mixin selector
      official i Lzw;i()Lcom/google/common/collect/Multimap;
      intermediary method_6326 Lnet/minecraft/class_1069;method_6326()Lcom/google/common/collect/Multimap;
      named getAttributeModifierMap Lnet/minecraft/item/Item;getAttributeModifierMap()Lcom/google/common/collect/Multimap;