Package net.minecraft.item
Class SwordItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.SwordItem
- Mappings:
Namespace Name official aexintermediary net/minecraft/class_1101named net/minecraft/item/SwordItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.ToolMaterialType -
Field Summary
FieldsFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, ATTACK_SPEED_MODIFIER, damageable, handheld, maxCount, RANDOM, REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the item can be repaired via an anvil or crafting table.floatfloatgetBlockBreakingSpeed(ItemStack stack, BlockState state) intReturns the enchantability of an Item.booleanReturns whether the item is supposed to look as handheld.booleanmethod_3346(BlockState blockState) booleanmethod_3356(ItemStack itemStack, World world, BlockState blockState, BlockPos blockPos, LivingEntity livingEntity) method_6326(EquipmentSlot equipmentSlot) booleanonEntityHit(ItemStack stack, LivingEntity entity1, LivingEntity entity2) Methods inherited from class net.minecraft.item.Item
addProperty, appendItemStacks, appendTooltip, byRawId, fromBlock, getDisplayName, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMaxUseTime, getMeta, getProperty, getRarity, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, getUseAction, hasEnchantmentGlint, hasProperties, hasSubTypes, inventoryTick, isDamageable, isEnchantable, isFood, isNetworkSynced, isUnbreakable, method_11373, method_3353, method_3355, method_3359, method_3367, onCraft, onHit, postProcessNbt, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncNbtToClient
-
Field Details
-
attackMultiplier
private final float attackMultiplier- Mappings:
Namespace Name Mixin selector official aLaex;a:Fintermediary field_6950Lnet/minecraft/class_1101;field_6950:Fnamed attackMultiplierLnet/minecraft/item/SwordItem;attackMultiplier:F
-
material
- Mappings:
Namespace Name Mixin selector official bLaex;b:Lado$a;intermediary field_4411Lnet/minecraft/class_1101;field_4411:Lnet/minecraft/class_1069$class_1070;named materialLnet/minecraft/item/SwordItem;material:Lnet/minecraft/item/Item$ToolMaterialType;
-
-
Constructor Details
-
SwordItem
- Mappings:
Namespace Name Mixin selector official <init>Laex;<init>(Lado$a;)Vintermediary <init>Lnet/minecraft/class_1101;<init>(Lnet/minecraft/class_1069$class_1070;)Vnamed <init>Lnet/minecraft/item/SwordItem;<init>(Lnet/minecraft/item/Item$ToolMaterialType;)V
-
-
Method Details
-
getAttackDamage
public float getAttackDamage()- Mappings:
Namespace Name Mixin selector official gLaex;g()Fintermediary method_4632Lnet/minecraft/class_1101;method_4632()Fnamed getAttackDamageLnet/minecraft/item/SwordItem;getAttackDamage()F
-
getBlockBreakingSpeed
- Overrides:
getBlockBreakingSpeedin classItem- Mappings:
Namespace Name Mixin selector official aLado;a(Ladq;Lard;)Fintermediary method_3351Lnet/minecraft/class_1069;method_3351(Lnet/minecraft/class_1071;Lnet/minecraft/class_2232;)Fnamed getBlockBreakingSpeedLnet/minecraft/item/Item;getBlockBreakingSpeed(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;)F
-
onEntityHit
- Overrides:
onEntityHitin classItem- Mappings:
Namespace Name Mixin selector official aLado;a(Ladq;Lsa;Lsa;)Zintermediary method_3354Lnet/minecraft/class_1069;method_3354(Lnet/minecraft/class_1071;Lnet/minecraft/class_1699;Lnet/minecraft/class_1699;)Znamed onEntityHitLnet/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_3356in classItem- Mappings:
Namespace Name Mixin selector official aLado;a(Ladq;Laht;Lard;Lcl;Lsa;)Zintermediary method_3356Lnet/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;)Znamed method_3356Lnet/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
Returns whether the item is supposed to look as handheld.- Overrides:
isHandheldin classItem- Mappings:
Namespace Name Mixin selector official A_Lado;A_()Zintermediary method_3372Lnet/minecraft/class_1069;method_3372()Znamed isHandheldLnet/minecraft/item/Item;isHandheld()Z
-
method_3346
- Overrides:
method_3346in classItem- Mappings:
Namespace Name Mixin selector official aLado;a(Lard;)Zintermediary method_3346Lnet/minecraft/class_1069;method_3346(Lnet/minecraft/class_2232;)Znamed method_3346Lnet/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:
getEnchantabilityin classItem- Returns:
- Enchantability
- See Also:
- Mappings:
Namespace Name Mixin selector official cLado;c()Iintermediary method_3362Lnet/minecraft/class_1069;method_3362()Inamed getEnchantabilityLnet/minecraft/item/Item;getEnchantability()I
-
getToolMaterial
- Mappings:
Namespace Name Mixin selector official hLaex;h()Ljava/lang/String;intermediary method_3465Lnet/minecraft/class_1101;method_3465()Ljava/lang/String;named getToolMaterialLnet/minecraft/item/SwordItem;getToolMaterial()Ljava/lang/String;
-
canRepair
Returns whether the item can be repaired via an anvil or crafting table.- Overrides:
canRepairin classItem- Mappings:
Namespace Name Mixin selector official aLado;a(Ladq;Ladq;)Zintermediary method_4615Lnet/minecraft/class_1069;method_4615(Lnet/minecraft/class_1071;Lnet/minecraft/class_1071;)Znamed canRepairLnet/minecraft/item/Item;canRepair(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
-
method_6326
- Overrides:
method_6326in classItem- Mappings:
Namespace Name Mixin selector official aLado;a(Lrw;)Lcom/google/common/collect/Multimap;intermediary method_6326Lnet/minecraft/class_1069;method_6326(Lnet/minecraft/class_2968;)Lcom/google/common/collect/Multimap;named method_6326Lnet/minecraft/item/Item;method_6326(Lnet/minecraft/entity/EquipmentSlot;)Lcom/google/common/collect/Multimap;
-