Class SwordItem

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

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

    • attackMultiplier

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

      private final ToolMaterial field_4411
      Mappings:
      Namespace Name Mixin selector
      official b Lanm;b:Lami;
      intermediary field_4411 Lnet/minecraft/class_1101;field_4411:Lnet/minecraft/class_1070;
      named field_4411 Lnet/minecraft/item/SwordItem;field_4411:Lnet/minecraft/item/ToolMaterial;
  • Constructor Details

  • Method Details

    • getAttackDamage

      public float getAttackDamage()
      Mappings:
      Namespace Name Mixin selector
      official g Lanm;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 Lalq;a(Lamj;Latr;)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 Lalq;a(Lamj;Lxm;Lxm;)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 Lalq;a(Lamj;Laqu;Latr;Ldt;Lxm;)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 v_ Lalq;v_()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 Lalq;e(Lamj;)Lano;
      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 Lalq;d(Lamj;)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 Lalq;a(Lamj;Laqu;Lahd;)Lamj;
      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 Lalq;b(Latr;)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 Lalq;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 Lanm;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 Lalq;a(Lamj;Lamj;)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 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 Lalq;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;