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 czf
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 Summary
Modifier and TypeFieldDescriptionprivate final float
The field for theattackDamageBonus
record component.static final ToolMaterial
private final int
The field for thedurability
record component.private final int
The field for theenchantmentValue
record component.static final ToolMaterial
The field for theincorrectBlocksForDrops
record component.static final ToolMaterial
static final ToolMaterial
The field for therepairItems
record component.private final float
The field for thespeed
record component.static final ToolMaterial
static final ToolMaterial
-
Constructor Summary
ConstructorDescriptionToolMaterial
(TagKey<Block> tagKey, int int2, float float2, float float3, int int3, TagKey<Item> tagKey2) -
Method Summary
Modifier and TypeMethodDescriptionprivate Item.Settings
applyBaseSettings
(Item.Settings settings) applySwordSettings
(Item.Settings settings, float attackDamage, float attackSpeed) applyToolSettings
(Item.Settings settings, TagKey<Block> effectiveBlocks, float attackDamage, float attackSpeed) float
Returns the value of theattackDamageBonus
record component.private AttributeModifiersComponent
createSwordAttributeModifiers
(float attackDamage, float attackSpeed) private AttributeModifiersComponent
createToolAttributeModifiers
(float attackDamage, float attackSpeed) int
Returns the value of thedurability
record component.int
Returns the value of theenchantmentValue
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theincorrectBlocksForDrops
record component.Returns the value of therepairItems
record component.float
speed()
Returns the value of thespeed
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
incorrectBlocksForDrops
The field for theincorrectBlocksForDrops
record component. -
durability
private final int durabilityThe field for thedurability
record component. -
speed
private final float speedThe field for thespeed
record component. -
attackDamageBonus
private final float attackDamageBonusThe field for theattackDamageBonus
record component. -
enchantmentValue
private final int enchantmentValueThe field for theenchantmentValue
record component. -
repairItems
The field for therepairItems
record 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
Lczf;a:Lczf;
-
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
Lczf;b:Lczf;
-
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
Lczf;c:Lczf;
-
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
Lczf;d:Lczf;
-
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
Lczf;e:Lczf;
-
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
Lczf;f:Lczf;
-
-
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
Lczf;a(Lcxk$a;)Lcxk$a;
-
applyToolSettings
public 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
Lczf;a(Lcxk$a;Layk;FF)Lcxk$a;
-
createToolAttributeModifiers
private 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
Lczf;a(FF)Ldaf;
-
applySwordSettings
public 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
Lczf;a(Lcxk$a;FF)Lcxk$a;
-
createSwordAttributeModifiers
private 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
Lczf;b(FF)Ldaf;
-
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 theincorrectBlocksForDrops
record component.- Returns:
- the value of the
incorrectBlocksForDrops
record component
-
durability
public int durability()Returns the value of thedurability
record component.- Returns:
- the value of the
durability
record component
-
speed
public float speed()Returns the value of thespeed
record component.- Returns:
- the value of the
speed
record component
-
attackDamageBonus
public float attackDamageBonus()Returns the value of theattackDamageBonus
record component.- Returns:
- the value of the
attackDamageBonus
record component
-
enchantmentValue
public int enchantmentValue()Returns the value of theenchantmentValue
record component.- Returns:
- the value of the
enchantmentValue
record component
-
repairItems
Returns the value of therepairItems
record component.- Returns:
- the value of the
repairItems
record component
-