Record Class BlocksAttacks
java.lang.Object
java.lang.Record
net.minestom.server.item.component.BlocksAttacks
public record BlocksAttacks(float blockDelaySeconds, float disableCooldownScale, List<BlocksAttacks.DamageReduction> damageReductions, BlocksAttacks.ItemDamageFunction itemDamage, @Nullable TagKey<DamageType> bypassedBy, @Nullable SoundEvent blockSound, @Nullable SoundEvent disableSound)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BlocksAttacks> static final NetworkBuffer.Type<BlocksAttacks> -
Constructor Summary
ConstructorsConstructorDescriptionBlocksAttacks(float blockDelaySeconds, float disableCooldownScale, List<BlocksAttacks.DamageReduction> damageReductions, BlocksAttacks.ItemDamageFunction itemDamage, @Nullable TagKey<DamageType> bypassedBy, @Nullable SoundEvent blockSound, @Nullable SoundEvent disableSound) Creates an instance of aBlocksAttacksrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theblockDelaySecondsrecord component.Returns the value of theblockSoundrecord component.Returns the value of thebypassedByrecord component.Returns the value of thedamageReductionsrecord component.floatReturns the value of thedisableCooldownScalerecord component.Returns the value of thedisableSoundrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theitemDamagerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
NBT_TYPE
-
-
Constructor Details
-
BlocksAttacks
public BlocksAttacks(float blockDelaySeconds, float disableCooldownScale, List<BlocksAttacks.DamageReduction> damageReductions, BlocksAttacks.ItemDamageFunction itemDamage, @Nullable @Nullable TagKey<DamageType> bypassedBy, @Nullable @Nullable SoundEvent blockSound, @Nullable @Nullable SoundEvent disableSound) Creates an instance of aBlocksAttacksrecord class.- Parameters:
blockDelaySeconds- the value for theblockDelaySecondsrecord componentdisableCooldownScale- the value for thedisableCooldownScalerecord componentdamageReductions- the value for thedamageReductionsrecord componentitemDamage- the value for theitemDamagerecord componentbypassedBy- the value for thebypassedByrecord componentblockSound- the value for theblockSoundrecord componentdisableSound- the value for thedisableSoundrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
blockDelaySeconds
public float blockDelaySeconds()Returns the value of theblockDelaySecondsrecord component.- Returns:
- the value of the
blockDelaySecondsrecord component
-
disableCooldownScale
public float disableCooldownScale()Returns the value of thedisableCooldownScalerecord component.- Returns:
- the value of the
disableCooldownScalerecord component
-
damageReductions
Returns the value of thedamageReductionsrecord component.- Returns:
- the value of the
damageReductionsrecord component
-
itemDamage
Returns the value of theitemDamagerecord component.- Returns:
- the value of the
itemDamagerecord component
-
bypassedBy
Returns the value of thebypassedByrecord component.- Returns:
- the value of the
bypassedByrecord component
-
blockSound
Returns the value of theblockSoundrecord component.- Returns:
- the value of the
blockSoundrecord component
-
disableSound
Returns the value of thedisableSoundrecord component.- Returns:
- the value of the
disableSoundrecord component
-