Package net.minecraft.item
Class ToolItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.ToolItem
- Direct Known Subclasses:
AxeItem,PickaxeItem,ShovelItem
- Mappings:
Namespace Name official aarintermediary net/minecraft/class_1054named net/minecraft/item/ToolItem
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate Setprotected ToolMaterialprotected floatFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, damageable, field_6201, field_6941, handheld, maxCount, RANDOM, REGISTRY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedToolItem(float float2, ToolMaterial toolMaterial, Set set) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the item can be repaired via an anvil or crafting table.Returns a map containing entity attributes that are modified by the itemintReturns the enchantability of an Item.floatgetMiningSpeedMultiplier(ItemStack stack, Block block) booleanReturns whether the item is supposed to look as handheld.booleanmethod_3356(ItemStack itemStack, World world, Block block, int int2, int int3, int int4, LivingEntity livingEntity) booleanonEntityHit(ItemStack stack, LivingEntity entity1, LivingEntity entity2) Methods inherited from class net.minecraft.item.Item
appendItemStacks, appendTooltip, byRawId, canUseOnEntity, fromBlock, getDisplayColor, getDisplayName, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMaxUseTime, getMeta, getRarity, getRawId, getRecipeRemainder, getStatusEffectString, getTranslationKey, getTranslationKey, getUseAction, hasEnchantmentGlint, hasStatusEffectString, hasSubTypes, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFood, isNetworkSynced, isUnbreakable, method_3343, method_3355, method_3369, method_3378, method_3380, method_3397, method_5462, method_5463, method_6324, onCraft, onFinishUse, onHit, onStartUse, onUseStopped, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setStatusEffectString, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncNbtToClient
-
Field Details
-
effectiveBlocks
- Mappings:
Namespace Name Mixin selector official cLaar;c:Ljava/util/Set;intermediary field_6956Lnet/minecraft/class_1054;field_6956:Ljava/util/Set;named effectiveBlocksLnet/minecraft/item/ToolItem;effectiveBlocks:Ljava/util/Set;
-
miningSpeed
protected float miningSpeed- Mappings:
Namespace Name Mixin selector official aLaar;a:Fintermediary field_4191Lnet/minecraft/class_1054;field_4191:Fnamed miningSpeedLnet/minecraft/item/ToolItem;miningSpeed:F
-
attackDamage
private float attackDamage- Mappings:
Namespace Name Mixin selector official dLaar;d:Fintermediary field_6940Lnet/minecraft/class_1054;field_6940:Fnamed attackDamageLnet/minecraft/item/ToolItem;attackDamage:F
-
field_4192
- Mappings:
Namespace Name Mixin selector official bLaar;b:Labn;intermediary field_4192Lnet/minecraft/class_1054;field_4192:Lnet/minecraft/class_1070;named field_4192Lnet/minecraft/item/ToolItem;field_4192:Lnet/minecraft/item/ToolMaterial;
-
-
Constructor Details
-
ToolItem
-
-
Method Details
-
getMiningSpeedMultiplier
- Overrides:
getMiningSpeedMultiplierin classItem- Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Laht;)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 aLabm;a(Labo;Lrg;Lrg;)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, Block block, int int2, int int3, int int4, LivingEntity livingEntity) - Overrides:
method_3356in classItem- Mappings:
Namespace Name Mixin selector official aLabm;a(Labo;Lafm;Laht;IIILrg;)Zintermediary method_3356Lnet/minecraft/class_1069;method_3356(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_197;IIILnet/minecraft/class_1699;)Znamed method_3356Lnet/minecraft/item/Item;method_3356(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/block/Block;IIILnet/minecraft/entity/LivingEntity;)Z
-
isHandheld
Returns whether the item is supposed to look as handheld.- Overrides:
isHandheldin classItem- Mappings:
Namespace Name Mixin selector official fLabm;f()Zintermediary method_3372Lnet/minecraft/class_1069;method_3372()Znamed isHandheldLnet/minecraft/item/Item;isHandheld()Z
-
method_6345
- Mappings:
Namespace Name Mixin selector official iLaar;i()Labn;intermediary method_6345Lnet/minecraft/class_1054;method_6345()Lnet/minecraft/class_1070;named method_6345Lnet/minecraft/item/ToolItem;method_6345()Lnet/minecraft/item/ToolMaterial;
-
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 cLabm;c()Iintermediary method_3362Lnet/minecraft/class_1069;method_3362()Inamed getEnchantabilityLnet/minecraft/item/Item;getEnchantability()I
-
getMaterialAsString
- Mappings:
Namespace Name Mixin selector official jLaar;j()Ljava/lang/String;intermediary method_3329Lnet/minecraft/class_1054;method_3329()Ljava/lang/String;named getMaterialAsStringLnet/minecraft/item/ToolItem;getMaterialAsString()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 aLabm;a(Labo;Labo;)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 kLabm;k()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;
-