Record Class BlocksAttacks
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.BlocksAttacks
public record BlocksAttacks(float blockDelaySeconds, float disableCooldownScale, BlocksAttacks.DamageReduction[] damageReductions, BlocksAttacks.ItemDamageFunction itemDamage, @Nullable String bypassedByTag, @Nullable Holder<SoundEvent> blockSound, @Nullable Holder<SoundEvent> disableSound)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlocksAttacks
(float blockDelaySeconds, float disableCooldownScale, BlocksAttacks.DamageReduction[] damageReductions, BlocksAttacks.ItemDamageFunction itemDamage, @Nullable String bypassedByTag, @Nullable Holder<SoundEvent> blockSound, @Nullable Holder<SoundEvent> disableSound) Creates an instance of aBlocksAttacks
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of theblockDelaySeconds
record component.@Nullable Holder<SoundEvent>
Returns the value of theblockSound
record component.@Nullable String
Returns the value of thebypassedByTag
record component.Returns the value of thedamageReductions
record component.float
Returns the value of thedisableCooldownScale
record component.@Nullable Holder<SoundEvent>
Returns the value of thedisableSound
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 theitemDamage
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
TYPE
-
-
Constructor Details
-
BlocksAttacks
public BlocksAttacks(float blockDelaySeconds, float disableCooldownScale, BlocksAttacks.DamageReduction[] damageReductions, BlocksAttacks.ItemDamageFunction itemDamage, @Nullable String bypassedByTag, @Nullable Holder<SoundEvent> blockSound, @Nullable Holder<SoundEvent> disableSound) Creates an instance of aBlocksAttacks
record class.- Parameters:
blockDelaySeconds
- the value for theblockDelaySeconds
record componentdisableCooldownScale
- the value for thedisableCooldownScale
record componentdamageReductions
- the value for thedamageReductions
record componentitemDamage
- the value for theitemDamage
record componentbypassedByTag
- the value for thebypassedByTag
record componentblockSound
- the value for theblockSound
record componentdisableSound
- the value for thedisableSound
record component
-
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
blockDelaySeconds
public float blockDelaySeconds()Returns the value of theblockDelaySeconds
record component.- Returns:
- the value of the
blockDelaySeconds
record component
-
disableCooldownScale
public float disableCooldownScale()Returns the value of thedisableCooldownScale
record component.- Returns:
- the value of the
disableCooldownScale
record component
-
damageReductions
Returns the value of thedamageReductions
record component.- Returns:
- the value of the
damageReductions
record component
-
itemDamage
Returns the value of theitemDamage
record component.- Returns:
- the value of the
itemDamage
record component
-
bypassedByTag
Returns the value of thebypassedByTag
record component.- Returns:
- the value of the
bypassedByTag
record component
-
blockSound
Returns the value of theblockSound
record component.- Returns:
- the value of the
blockSound
record component
-
disableSound
Returns the value of thedisableSound
record component.- Returns:
- the value of the
disableSound
record component
-