Package net.minecraft.component.type
Record Class WeaponComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.WeaponComponent
- Record Components:
itemDamagePerAttack
-disableBlockingForSeconds
-
public record WeaponComponent(int itemDamagePerAttack, float disableBlockingForSeconds)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/WeaponComponent
intermediary net/minecraft/class_10590
official dds
named itemDamagePerAttack
intermediary comp_3481
official d
named disableBlockingForSeconds
intermediary comp_3602
official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
static final com.mojang.serialization.Codec
<WeaponComponent> private final float
The field for thedisableBlockingForSeconds
record component.private final int
The field for theitemDamagePerAttack
record component.static final PacketCodec
<RegistryByteBuf, WeaponComponent> -
Constructor Summary
ConstructorsConstructorDescriptionWeaponComponent
(int itemDamagePerAttack) WeaponComponent
(int int2, float float2) -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of thedisableBlockingForSeconds
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.int
Returns the value of theitemDamagePerAttack
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
itemDamagePerAttack
private final int itemDamagePerAttackThe field for theitemDamagePerAttack
record component. -
disableBlockingForSeconds
private final float disableBlockingForSecondsThe field for thedisableBlockingForSeconds
record component. -
AXE_DISABLE_BLOCKING_FOR_SECONDS
public static final float AXE_DISABLE_BLOCKING_FOR_SECONDS- See Also:
- Mappings:
Namespace Name Mixin selector named AXE_DISABLE_BLOCKING_FOR_SECONDS
Lnet/minecraft/component/type/WeaponComponent;AXE_DISABLE_BLOCKING_FOR_SECONDS:F
intermediary field_56320
Lnet/minecraft/class_10590;field_56320:F
official a
Ldds;a:F
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/component/type/WeaponComponent;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_55712
Lnet/minecraft/class_10590;field_55712:Lcom/mojang/serialization/Codec;
official b
Ldds;b:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/component/type/WeaponComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_55713
Lnet/minecraft/class_10590;field_55713:Lnet/minecraft/class_9139;
official c
Ldds;c:Lze;
-
-
Constructor Details
-
WeaponComponent
public WeaponComponent(int itemDamagePerAttack) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/component/type/WeaponComponent;<init>(I)V
intermediary <init>
Lnet/minecraft/class_10590;<init>(I)V
official <init>
Ldds;<init>(I)V
-
WeaponComponent
public WeaponComponent(int int2, float float2)
-
-
Method Details
-
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. All components in this record class are compared with '=='. -
itemDamagePerAttack
public int itemDamagePerAttack()Returns the value of theitemDamagePerAttack
record component.- Returns:
- the value of the
itemDamagePerAttack
record component
-
disableBlockingForSeconds
public float disableBlockingForSeconds()Returns the value of thedisableBlockingForSeconds
record component.- Returns:
- the value of the
disableBlockingForSeconds
record component
-