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 Details Link icon

    • itemDamagePerAttack Link icon

      private final int itemDamagePerAttack
      The field for the itemDamagePerAttack record component.
    • disableBlockingForSeconds Link icon

      private final float disableBlockingForSeconds
      The field for the disableBlockingForSeconds record component.
    • AXE_DISABLE_BLOCKING_FOR_SECONDS Link icon

      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 Link icon

      public static final com.mojang.serialization.Codec<WeaponComponent> 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 Link icon

      public static final PacketCodec<RegistryByteBuf,WeaponComponent> 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 Link icon

    • WeaponComponent Link icon

      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 Link icon

      public WeaponComponent(int int2, float float2)
  • Method Details Link icon

    • toString Link icon

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode Link icon

      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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals Link icon

      public final boolean equals(Object object)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • itemDamagePerAttack Link icon

      public int itemDamagePerAttack()
      Returns the value of the itemDamagePerAttack record component.
      Returns:
      the value of the itemDamagePerAttack record component
    • disableBlockingForSeconds Link icon

      public float disableBlockingForSeconds()
      Returns the value of the disableBlockingForSeconds record component.
      Returns:
      the value of the disableBlockingForSeconds record component