Record Class BlocksAttacks

java.lang.Object
java.lang.Record
net.minestom.server.item.component.BlocksAttacks

public record BlocksAttacks(float blockDelaySeconds, float disableCooldownScale, @NotNull List<BlocksAttacks.DamageReduction> damageReductions, @NotNull BlocksAttacks.ItemDamageFunction itemDamage, @Nullable TagKey<DamageType> bypassedBy, @Nullable SoundEvent blockSound, @Nullable SoundEvent disableSound) extends Record
  • Field Details

  • Constructor Details

    • BlocksAttacks

      public BlocksAttacks(float blockDelaySeconds, float disableCooldownScale, @NotNull @NotNull List<BlocksAttacks.DamageReduction> damageReductions, @NotNull @NotNull BlocksAttacks.ItemDamageFunction itemDamage, @Nullable @Nullable TagKey<DamageType> bypassedBy, @Nullable @Nullable SoundEvent blockSound, @Nullable @Nullable SoundEvent disableSound)
      Creates an instance of a BlocksAttacks record class.
      Parameters:
      blockDelaySeconds - the value for the blockDelaySeconds record component
      disableCooldownScale - the value for the disableCooldownScale record component
      damageReductions - the value for the damageReductions record component
      itemDamage - the value for the itemDamage record component
      bypassedBy - the value for the bypassedBy record component
      blockSound - the value for the blockSound record component
      disableSound - the value for the disableSound record component
  • Method Details

    • toString

      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

      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

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • blockDelaySeconds

      public float blockDelaySeconds()
      Returns the value of the blockDelaySeconds record component.
      Returns:
      the value of the blockDelaySeconds record component
    • disableCooldownScale

      public float disableCooldownScale()
      Returns the value of the disableCooldownScale record component.
      Returns:
      the value of the disableCooldownScale record component
    • damageReductions

      @NotNull public @NotNull List<BlocksAttacks.DamageReduction> damageReductions()
      Returns the value of the damageReductions record component.
      Returns:
      the value of the damageReductions record component
    • itemDamage

      @NotNull public @NotNull BlocksAttacks.ItemDamageFunction itemDamage()
      Returns the value of the itemDamage record component.
      Returns:
      the value of the itemDamage record component
    • bypassedBy

      @Nullable public @Nullable TagKey<DamageType> bypassedBy()
      Returns the value of the bypassedBy record component.
      Returns:
      the value of the bypassedBy record component
    • blockSound

      @Nullable public @Nullable SoundEvent blockSound()
      Returns the value of the blockSound record component.
      Returns:
      the value of the blockSound record component
    • disableSound

      @Nullable public @Nullable SoundEvent disableSound()
      Returns the value of the disableSound record component.
      Returns:
      the value of the disableSound record component