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 aekintermediary net/minecraft/class_1054named net/minecraft/item/ToolItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.ToolMaterialType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatprotected floatprotected Item.ToolMaterialTypeprotected floatFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, ATTACK_SPEED_MODIFIER, damageable, handheld, maxCount, RANDOM, REGISTRY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedToolItem(float float2, float float3, Item.ToolMaterialType toolMaterialType, Set<Block> set) protectedToolItem(Item.ToolMaterialType toolMaterialType, Set<Block> set) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the item can be repaired via an anvil or crafting table.floatgetBlockBreakingSpeed(ItemStack stack, BlockState state) intReturns the enchantability of an Item.booleanReturns whether the item is supposed to look as handheld.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, appendTooltip, byRawId, fromBlock, getDefaultStack, 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_13648, method_13649, method_3346, method_3353, method_3359, method_3367, onCraft, onHit, postProcessNbt, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncNbtToClient, use
-
Field Details
-
effectiveBlocks
- Mappings:
Namespace Name Mixin selector official eLaek;e: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 aLaek;a:Fintermediary field_4191Lnet/minecraft/class_1054;field_4191:Fnamed miningSpeedLnet/minecraft/item/ToolItem;miningSpeed:F
-
attackDamage
protected float attackDamage- Mappings:
Namespace Name Mixin selector official bLaek;b:Fintermediary field_6940Lnet/minecraft/class_1054;field_6940:Fnamed attackDamageLnet/minecraft/item/ToolItem;attackDamage:F
-
field_12294
protected float field_12294- Mappings:
Namespace Name Mixin selector official cLaek;c:Fintermediary field_12294Lnet/minecraft/class_1054;field_12294:Fnamed field_12294Lnet/minecraft/item/ToolItem;field_12294:F
-
material
- Mappings:
Namespace Name Mixin selector official dLaek;d:Lafh$a;intermediary field_4192Lnet/minecraft/class_1054;field_4192:Lnet/minecraft/class_1069$class_1070;named materialLnet/minecraft/item/ToolItem;material:Lnet/minecraft/item/Item$ToolMaterialType;
-
-
Constructor Details
-
ToolItem
protected ToolItem(float float2, float float3, Item.ToolMaterialType toolMaterialType, Set<Block> set) -
ToolItem
-
-
Method Details
-
getBlockBreakingSpeed
- Overrides:
getBlockBreakingSpeedin classItem- Mappings:
Namespace Name Mixin selector official aLafh;a(Lafj;Latl;)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 aLafh;a(Lafj;Lsw;Lsw;)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 aLafh;a(Lafj;Lajs;Latl;Lco;Lsw;)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 C_Lafh;C_()Zintermediary method_3372Lnet/minecraft/class_1069;method_3372()Znamed isHandheldLnet/minecraft/item/Item;isHandheld()Z
-
getMaterial
- Mappings:
Namespace Name Mixin selector official gLaek;g()Lafh$a;intermediary method_6345Lnet/minecraft/class_1054;method_6345()Lnet/minecraft/class_1069$class_1070;named getMaterialLnet/minecraft/item/ToolItem;getMaterial()Lnet/minecraft/item/Item$ToolMaterialType;
-
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 cLafh;c()Iintermediary method_3362Lnet/minecraft/class_1069;method_3362()Inamed getEnchantabilityLnet/minecraft/item/Item;getEnchantability()I
-
getMaterialAsString
- Mappings:
Namespace Name Mixin selector official hLaek;h()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 aLafh;a(Lafj;Lafj;)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 aLafh;a(Lss;)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;
-