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/ToolMaterialintermediary net/minecraft/class_9886official dbynamed incorrectBlocksForDropsintermediary comp_2930official gnamed durabilityintermediary comp_2931official hnamed speedintermediary comp_2932official inamed attackDamageBonusintermediary comp_2933official jnamed enchantmentValueintermediary comp_2934official knamed repairItemsintermediary comp_2935official l
-
Field Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionToolMaterial(TagKey<Block> tagKey, int int2, float float2, float float3, int int3, TagKey<Item> tagKey2) -
Method Summary
Modifier 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, float disableBlockingForSeconds) 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
-
incorrectBlocksForDrops
The field for theincorrectBlocksForDropsrecord component. -
durability
private final int durabilityThe field for thedurabilityrecord component. -
speed
private final float speedThe field for thespeedrecord component. -
attackDamageBonus
private final float attackDamageBonusThe field for theattackDamageBonusrecord component. -
enchantmentValue
private final int enchantmentValueThe field for theenchantmentValuerecord component. -
repairItems
The field for therepairItemsrecord component. -
WOOD
- Mappings:
Namespace Name Mixin selector named WOODLnet/minecraft/item/ToolMaterial;WOOD:Lnet/minecraft/item/ToolMaterial;intermediary field_52585Lnet/minecraft/class_9886;field_52585:Lnet/minecraft/class_9886;official aLdby;a:Ldby;
-
STONE
- Mappings:
Namespace Name Mixin selector named STONELnet/minecraft/item/ToolMaterial;STONE:Lnet/minecraft/item/ToolMaterial;intermediary field_52586Lnet/minecraft/class_9886;field_52586:Lnet/minecraft/class_9886;official bLdby;b:Ldby;
-
IRON
- Mappings:
Namespace Name Mixin selector named IRONLnet/minecraft/item/ToolMaterial;IRON:Lnet/minecraft/item/ToolMaterial;intermediary field_52587Lnet/minecraft/class_9886;field_52587:Lnet/minecraft/class_9886;official cLdby;c:Ldby;
-
DIAMOND
- Mappings:
Namespace Name Mixin selector named DIAMONDLnet/minecraft/item/ToolMaterial;DIAMOND:Lnet/minecraft/item/ToolMaterial;intermediary field_52588Lnet/minecraft/class_9886;field_52588:Lnet/minecraft/class_9886;official dLdby;d:Ldby;
-
GOLD
- Mappings:
Namespace Name Mixin selector named GOLDLnet/minecraft/item/ToolMaterial;GOLD:Lnet/minecraft/item/ToolMaterial;intermediary field_52589Lnet/minecraft/class_9886;field_52589:Lnet/minecraft/class_9886;official eLdby;e:Ldby;
-
NETHERITE
- Mappings:
Namespace Name Mixin selector named NETHERITELnet/minecraft/item/ToolMaterial;NETHERITE:Lnet/minecraft/item/ToolMaterial;intermediary field_52590Lnet/minecraft/class_9886;field_52590:Lnet/minecraft/class_9886;official fLdby;f:Ldby;
-
-
Constructor Details
-
ToolMaterial
-
-
Method Details
-
applyBaseSettings
- Mappings:
Namespace Name Mixin selector named applyBaseSettingsLnet/minecraft/item/ToolMaterial;applyBaseSettings(Lnet/minecraft/item/Item$Settings;)Lnet/minecraft/item/Item$Settings;intermediary method_61661Lnet/minecraft/class_9886;method_61661(Lnet/minecraft/class_1792$class_1793;)Lnet/minecraft/class_1792$class_1793;official aLdby;a(Ldag$a;)Ldag$a;
-
applyToolSettings
public Item.Settings applyToolSettings(Item.Settings settings, TagKey<Block> effectiveBlocks, float attackDamage, float attackSpeed, float disableBlockingForSeconds) - Mappings:
Namespace Name Mixin selector named applyToolSettingsLnet/minecraft/item/ToolMaterial;applyToolSettings(Lnet/minecraft/item/Item$Settings;Lnet/minecraft/registry/tag/TagKey;FFF)Lnet/minecraft/item/Item$Settings;intermediary method_61663Lnet/minecraft/class_9886;method_61663(Lnet/minecraft/class_1792$class_1793;Lnet/minecraft/class_6862;FFF)Lnet/minecraft/class_1792$class_1793;official aLdby;a(Ldag$a;Layc;FFF)Ldag$a;
-
createToolAttributeModifiers
private AttributeModifiersComponent createToolAttributeModifiers(float attackDamage, float attackSpeed) - Mappings:
Namespace Name Mixin selector named createToolAttributeModifiersLnet/minecraft/item/ToolMaterial;createToolAttributeModifiers(FF)Lnet/minecraft/component/type/AttributeModifiersComponent;intermediary method_61660Lnet/minecraft/class_9886;method_61660(FF)Lnet/minecraft/class_9285;official aLdby;a(FF)Lddb;
-
applySwordSettings
public Item.Settings applySwordSettings(Item.Settings settings, float attackDamage, float attackSpeed) - Mappings:
Namespace Name Mixin selector named applySwordSettingsLnet/minecraft/item/ToolMaterial;applySwordSettings(Lnet/minecraft/item/Item$Settings;FF)Lnet/minecraft/item/Item$Settings;intermediary method_61662Lnet/minecraft/class_9886;method_61662(Lnet/minecraft/class_1792$class_1793;FF)Lnet/minecraft/class_1792$class_1793;official aLdby;a(Ldag$a;FF)Ldag$a;
-
createSwordAttributeModifiers
private AttributeModifiersComponent createSwordAttributeModifiers(float attackDamage, float attackSpeed) - Mappings:
Namespace Name Mixin selector named createSwordAttributeModifiersLnet/minecraft/item/ToolMaterial;createSwordAttributeModifiers(FF)Lnet/minecraft/component/type/AttributeModifiersComponent;intermediary method_61664Lnet/minecraft/class_9886;method_61664(FF)Lnet/minecraft/class_9285;official bLdby;b(FF)Lddb;
-
toString
Returns 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. -
hashCode
public 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. -
equals
Indicates 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 '=='. -
incorrectBlocksForDrops
Returns the value of theincorrectBlocksForDropsrecord component.- Returns:
- the value of the
incorrectBlocksForDropsrecord component
-
durability
public int durability()Returns the value of thedurabilityrecord component.- Returns:
- the value of the
durabilityrecord component
-
speed
public float speed()Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
attackDamageBonus
public float attackDamageBonus()Returns the value of theattackDamageBonusrecord component.- Returns:
- the value of the
attackDamageBonusrecord component
-
enchantmentValue
public int enchantmentValue()Returns the value of theenchantmentValuerecord component.- Returns:
- the value of the
enchantmentValuerecord component
-
repairItems
Returns the value of therepairItemsrecord component.- Returns:
- the value of the
repairItemsrecord component
-