Package net.minecraft.item
Record Class ToolMaterial
java.lang.Object
java.lang.Record
net.minecraft.item.ToolMaterial
- Record Components:
- incorrectBlocksForDrops-
- durability-
- speed-
- attackDamageBonus-
- enchantmentValue-
- repairItems-
public record ToolMaterial(TagKey<Block> incorrectBlocksForDrops, int durability, float speed, float attackDamageBonus, int enchantmentValue, TagKey<Item> repairItems)
extends Record
- Mappings:
- Namespace - Name - named - net/minecraft/item/ToolMaterial- intermediary - net/minecraft/class_9886- official - cyh- named - incorrectBlocksForDrops- intermediary - comp_2930- official - g- named - durability- intermediary - comp_2931- official - h- named - speed- intermediary - comp_2932- official - i- named - attackDamageBonus- intermediary - comp_2933- official - j- named - enchantmentValue- intermediary - comp_2934- official - k- named - repairItems- intermediary - comp_2935- official - l
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final floatThe field for theattackDamageBonusrecord component.static final ToolMaterialprivate final intThe field for thedurabilityrecord component.private final intThe field for theenchantmentValuerecord component.static final ToolMaterialThe field for theincorrectBlocksForDropsrecord component.static final ToolMaterialstatic final ToolMaterialThe field for therepairItemsrecord component.private final floatThe field for thespeedrecord component.static final ToolMaterialstatic final ToolMaterial
- 
Constructor SummaryConstructorsConstructorDescriptionToolMaterial(TagKey<Block> tagKey, int int2, float float2, float float3, int int3, TagKey<Item> tagKey2) 
- 
Method SummaryModifier and TypeMethodDescriptionprivate Item.SettingsapplyBaseSettings(Item.Settings settings) applySwordSettings(Item.Settings settings, float attackDamage, float attackSpeed) applyToolSettings(Item.Settings settings, TagKey<Block> effectiveBlocks, float attackDamage, float attackSpeed) floatReturns the value of theattackDamageBonusrecord component.private AttributeModifiersComponentcreateSwordAttributeModifiers(float attackDamage, float attackSpeed) private AttributeModifiersComponentcreateToolAttributeModifiers(float attackDamage, float attackSpeed) intReturns the value of thedurabilityrecord component.intReturns the value of theenchantmentValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theincorrectBlocksForDropsrecord component.Returns the value of therepairItemsrecord component.floatspeed()Returns the value of thespeedrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
incorrectBlocksForDropsThe field for theincorrectBlocksForDropsrecord component.
- 
durabilityprivate final int durabilityThe field for thedurabilityrecord component.
- 
speedprivate final float speedThe field for thespeedrecord component.
- 
attackDamageBonusprivate final float attackDamageBonusThe field for theattackDamageBonusrecord component.
- 
enchantmentValueprivate final int enchantmentValueThe field for theenchantmentValuerecord component.
- 
repairItemsThe field for therepairItemsrecord component.
- 
WOOD- Mappings:
- Namespace - Name - Mixin selector - named - WOOD- Lnet/minecraft/item/ToolMaterial;WOOD:Lnet/minecraft/item/ToolMaterial;- intermediary - field_52585- Lnet/minecraft/class_9886;field_52585:Lnet/minecraft/class_9886;- official - a- Lcyh;a:Lcyh;
 
- 
STONE- Mappings:
- Namespace - Name - Mixin selector - named - STONE- Lnet/minecraft/item/ToolMaterial;STONE:Lnet/minecraft/item/ToolMaterial;- intermediary - field_52586- Lnet/minecraft/class_9886;field_52586:Lnet/minecraft/class_9886;- official - b- Lcyh;b:Lcyh;
 
- 
IRON- Mappings:
- Namespace - Name - Mixin selector - named - IRON- Lnet/minecraft/item/ToolMaterial;IRON:Lnet/minecraft/item/ToolMaterial;- intermediary - field_52587- Lnet/minecraft/class_9886;field_52587:Lnet/minecraft/class_9886;- official - c- Lcyh;c:Lcyh;
 
- 
DIAMOND- Mappings:
- Namespace - Name - Mixin selector - named - DIAMOND- Lnet/minecraft/item/ToolMaterial;DIAMOND:Lnet/minecraft/item/ToolMaterial;- intermediary - field_52588- Lnet/minecraft/class_9886;field_52588:Lnet/minecraft/class_9886;- official - d- Lcyh;d:Lcyh;
 
- 
GOLD- Mappings:
- Namespace - Name - Mixin selector - named - GOLD- Lnet/minecraft/item/ToolMaterial;GOLD:Lnet/minecraft/item/ToolMaterial;- intermediary - field_52589- Lnet/minecraft/class_9886;field_52589:Lnet/minecraft/class_9886;- official - e- Lcyh;e:Lcyh;
 
- 
NETHERITE- Mappings:
- Namespace - Name - Mixin selector - named - NETHERITE- Lnet/minecraft/item/ToolMaterial;NETHERITE:Lnet/minecraft/item/ToolMaterial;- intermediary - field_52590- Lnet/minecraft/class_9886;field_52590:Lnet/minecraft/class_9886;- official - f- Lcyh;f:Lcyh;
 
 
- 
- 
Constructor Details- 
ToolMaterial
 
- 
- 
Method Details- 
applyBaseSettings- Mappings:
- Namespace - Name - Mixin selector - named - applyBaseSettings- Lnet/minecraft/item/ToolMaterial;applyBaseSettings(Lnet/minecraft/item/Item$Settings;)Lnet/minecraft/item/Item$Settings;- intermediary - method_61661- Lnet/minecraft/class_9886;method_61661(Lnet/minecraft/class_1792$class_1793;)Lnet/minecraft/class_1792$class_1793;- official - a- Lcyh;a(Lcwm$a;)Lcwm$a;
 
- 
applyToolSettingspublic Item.Settings applyToolSettings(Item.Settings settings, TagKey<Block> effectiveBlocks, float attackDamage, float attackSpeed) - Mappings:
- Namespace - Name - Mixin selector - named - applyToolSettings- Lnet/minecraft/item/ToolMaterial;applyToolSettings(Lnet/minecraft/item/Item$Settings;Lnet/minecraft/registry/tag/TagKey;FF)Lnet/minecraft/item/Item$Settings;- intermediary - method_61663- Lnet/minecraft/class_9886;method_61663(Lnet/minecraft/class_1792$class_1793;Lnet/minecraft/class_6862;FF)Lnet/minecraft/class_1792$class_1793;- official - a- Lcyh;a(Lcwm$a;Laxf;FF)Lcwm$a;
 
- 
createToolAttributeModifiersprivate AttributeModifiersComponent createToolAttributeModifiers(float attackDamage, float attackSpeed) - Mappings:
- Namespace - Name - Mixin selector - named - createToolAttributeModifiers- Lnet/minecraft/item/ToolMaterial;createToolAttributeModifiers(FF)Lnet/minecraft/component/type/AttributeModifiersComponent;- intermediary - method_61660- Lnet/minecraft/class_9886;method_61660(FF)Lnet/minecraft/class_9285;- official - a- Lcyh;a(FF)Lczh;
 
- 
applySwordSettingspublic Item.Settings applySwordSettings(Item.Settings settings, float attackDamage, float attackSpeed) - Mappings:
- Namespace - Name - Mixin selector - named - applySwordSettings- Lnet/minecraft/item/ToolMaterial;applySwordSettings(Lnet/minecraft/item/Item$Settings;FF)Lnet/minecraft/item/Item$Settings;- intermediary - method_61662- Lnet/minecraft/class_9886;method_61662(Lnet/minecraft/class_1792$class_1793;FF)Lnet/minecraft/class_1792$class_1793;- official - a- Lcyh;a(Lcwm$a;FF)Lcwm$a;
 
- 
createSwordAttributeModifiersprivate AttributeModifiersComponent createSwordAttributeModifiers(float attackDamage, float attackSpeed) - Mappings:
- Namespace - Name - Mixin selector - named - createSwordAttributeModifiers- Lnet/minecraft/item/ToolMaterial;createSwordAttributeModifiers(FF)Lnet/minecraft/component/type/AttributeModifiersComponent;- intermediary - method_61664- Lnet/minecraft/class_9886;method_61664(FF)Lnet/minecraft/class_9285;- official - b- Lcyh;b(FF)Lczh;
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
incorrectBlocksForDropsReturns the value of theincorrectBlocksForDropsrecord component.- Returns:
- the value of the incorrectBlocksForDropsrecord component
 
- 
durabilitypublic int durability()Returns the value of thedurabilityrecord component.- Returns:
- the value of the durabilityrecord component
 
- 
speedpublic float speed()Returns the value of thespeedrecord component.- Returns:
- the value of the speedrecord component
 
- 
attackDamageBonuspublic float attackDamageBonus()Returns the value of theattackDamageBonusrecord component.- Returns:
- the value of the attackDamageBonusrecord component
 
- 
enchantmentValuepublic int enchantmentValue()Returns the value of theenchantmentValuerecord component.- Returns:
- the value of the enchantmentValuerecord component
 
- 
repairItemsReturns the value of therepairItemsrecord component.- Returns:
- the value of the repairItemsrecord component
 
 
-