Package net.minecraft.item
Class SwordItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.SwordItem
- Mappings:
Namespace Name official anmintermediary net/minecraft/class_1101named net/minecraft/item/SwordItem
-
Field Summary
FieldsFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, 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.floatReturns a map containing entity attributes that are modified by the itemintReturns the enchantability of an Item.intgetMaxUseTime(ItemStack stack) floatgetMiningSpeedMultiplier(ItemStack stack, Block block) getUseAction(ItemStack stack) Returns the UseAction for an item when the item is used.booleanisEffectiveOn(Block block) booleanReturns whether the item is supposed to look as handheld.booleanonBlockBroken(ItemStack stack, World world, Block block, BlockPos pos, LivingEntity entity) booleanonEntityHit(ItemStack stack, LivingEntity entity1, LivingEntity entity2) onStartUse(ItemStack stack, World world, PlayerEntity player) Methods inherited from class net.minecraft.item.Item
appendItemStacks, appendTooltip, byRawId, canUseOnEntity, fromBlock, getDisplayColor, getDisplayName, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMeta, getRarity, getRawId, getRecipeRemainder, getStatusEffectString, getTranslationKey, getTranslationKey, hasEnchantmentGlint, hasStatusEffectString, hasSubTypes, inventoryTick, isDamageable, isEnchantable, isFood, isNetworkSynced, isUnbreakable, onCraft, onFinishUse, onHit, onUseStopped, postProcessNbt, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setStatusEffectString, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncNbtToClient, use
-
Field Details
-
attackMultiplier
private float attackMultiplier- Mappings:
Namespace Name Mixin selector official aLanm;a:Fintermediary field_6950Lnet/minecraft/class_1101;field_6950:Fnamed attackMultiplierLnet/minecraft/item/SwordItem;attackMultiplier:F
-
field_4411
- Mappings:
Namespace Name Mixin selector official bLanm;b:Lami;intermediary field_4411Lnet/minecraft/class_1101;field_4411:Lnet/minecraft/class_1070;named field_4411Lnet/minecraft/item/SwordItem;field_4411:Lnet/minecraft/item/ToolMaterial;
-
-
Constructor Details
-
SwordItem
-
-
Method Details
-
getAttackDamage
public float getAttackDamage()- Mappings:
Namespace Name Mixin selector official gLanm;g()Fintermediary method_4632Lnet/minecraft/class_1101;method_4632()Fnamed getAttackDamageLnet/minecraft/item/SwordItem;getAttackDamage()F
-
getMiningSpeedMultiplier
- Overrides:
getMiningSpeedMultiplierin classItem- Mappings:
Namespace Name Mixin selector official aLalq;a(Lamj;Latr;)Fintermediary method_3351Lnet/minecraft/class_1069;method_3351(Lnet/minecraft/class_1071;Lnet/minecraft/class_197;)Fnamed getMiningSpeedMultiplierLnet/minecraft/item/Item;getMiningSpeedMultiplier(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/Block;)F
-
onEntityHit
- Overrides:
onEntityHitin classItem- Mappings:
Namespace Name Mixin selector official aLalq;a(Lamj;Lxm;Lxm;)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
-
onBlockBroken
public boolean onBlockBroken(ItemStack stack, World world, Block block, BlockPos pos, LivingEntity entity) - Overrides:
onBlockBrokenin classItem- Mappings:
Namespace Name Mixin selector official aLalq;a(Lamj;Laqu;Latr;Ldt;Lxm;)Zintermediary method_3356Lnet/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;)Znamed onBlockBrokenLnet/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
Returns whether the item is supposed to look as handheld.- Overrides:
isHandheldin classItem- Mappings:
Namespace Name Mixin selector official v_Lalq;v_()Zintermediary method_3372Lnet/minecraft/class_1069;method_3372()Znamed isHandheldLnet/minecraft/item/Item;isHandheld()Z
-
getUseAction
Returns the UseAction for an item when the item is used. Used by food, potions, bows, etc.- Overrides:
getUseActionin classItem- Parameters:
stack- The ItemStack that was used- See Also:
- Mappings:
Namespace Name Mixin selector official eLalq;e(Lamj;)Lano;intermediary method_3366Lnet/minecraft/class_1069;method_3366(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1099;named getUseActionLnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
-
getMaxUseTime
- Overrides:
getMaxUseTimein classItem- Mappings:
Namespace Name Mixin selector official dLalq;d(Lamj;)Iintermediary method_3350Lnet/minecraft/class_1069;method_3350(Lnet/minecraft/class_1071;)Inamed getMaxUseTimeLnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
-
onStartUse
- Overrides:
onStartUsein classItem- Mappings:
Namespace Name Mixin selector official aLalq;a(Lamj;Laqu;Lahd;)Lamj;intermediary method_3358Lnet/minecraft/class_1069;method_3358(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)Lnet/minecraft/class_1071;named onStartUseLnet/minecraft/item/Item;onStartUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;
-
isEffectiveOn
- Overrides:
isEffectiveOnin classItem- Mappings:
Namespace Name Mixin selector official bLalq;b(Latr;)Zintermediary method_3346Lnet/minecraft/class_1069;method_3346(Lnet/minecraft/class_197;)Znamed isEffectiveOnLnet/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:
getEnchantabilityin classItem- Returns:
- Enchantability
- See Also:
- Mappings:
Namespace Name Mixin selector official bLalq;b()Iintermediary method_3362Lnet/minecraft/class_1069;method_3362()Inamed getEnchantabilityLnet/minecraft/item/Item;getEnchantability()I
-
getToolMaterial
- Mappings:
Namespace Name Mixin selector official hLanm;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 aLalq;a(Lamj;Lamj;)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
-
getAttributeModifierMap
Returns a map containing entity attributes that are modified by the item- Overrides:
getAttributeModifierMapin classItem- Mappings:
Namespace Name Mixin selector official iLalq;i()Lcom/google/common/collect/Multimap;intermediary method_6326Lnet/minecraft/class_1069;method_6326()Lcom/google/common/collect/Multimap;named getAttributeModifierMapLnet/minecraft/item/Item;getAttributeModifierMap()Lcom/google/common/collect/Multimap;
-