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/WeaponComponentintermediary net/minecraft/class_10590official ddsnamed itemDamagePerAttackintermediary comp_3481official dnamed disableBlockingForSecondsintermediary comp_3602official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final com.mojang.serialization.Codec<WeaponComponent> private final floatThe field for thedisableBlockingForSecondsrecord component.private final intThe field for theitemDamagePerAttackrecord component.static final PacketCodec<RegistryByteBuf, WeaponComponent> -
Constructor Summary
ConstructorsConstructorDescriptionWeaponComponent(int itemDamagePerAttack) WeaponComponent(int int2, float float2) -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thedisableBlockingForSecondsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theitemDamagePerAttackrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
itemDamagePerAttack
private final int itemDamagePerAttackThe field for theitemDamagePerAttackrecord component. -
disableBlockingForSeconds
private final float disableBlockingForSecondsThe field for thedisableBlockingForSecondsrecord 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_SECONDSLnet/minecraft/component/type/WeaponComponent;AXE_DISABLE_BLOCKING_FOR_SECONDS:Fintermediary field_56320Lnet/minecraft/class_10590;field_56320:Fofficial aLdds;a:F
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/WeaponComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_55712Lnet/minecraft/class_10590;field_55712:Lcom/mojang/serialization/Codec;official bLdds;b:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/WeaponComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_55713Lnet/minecraft/class_10590;field_55713:Lnet/minecraft/class_9139;official cLdds;c:Lze;
-
-
Constructor Details
-
WeaponComponent
public WeaponComponent(int itemDamagePerAttack) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/component/type/WeaponComponent;<init>(I)Vintermediary <init>Lnet/minecraft/class_10590;<init>(I)Vofficial <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 theitemDamagePerAttackrecord component.- Returns:
- the value of the
itemDamagePerAttackrecord component
-
disableBlockingForSeconds
public float disableBlockingForSeconds()Returns the value of thedisableBlockingForSecondsrecord component.- Returns:
- the value of the
disableBlockingForSecondsrecord component
-