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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec
<BlocksAttacks> static final NetworkBuffer.Type
<BlocksAttacks> -
Constructor Summary
ConstructorsConstructorDescriptionBlocksAttacks
(float blockDelaySeconds, float disableCooldownScale, @NotNull List<BlocksAttacks.DamageReduction> damageReductions, @NotNull BlocksAttacks.ItemDamageFunction itemDamage, @Nullable TagKey<DamageType> bypassedBy, @Nullable SoundEvent blockSound, @Nullable SoundEvent disableSound) Creates an instance of aBlocksAttacks
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of theblockDelaySeconds
record component.@Nullable SoundEvent
Returns the value of theblockSound
record component.@Nullable TagKey
<DamageType> Returns the value of thebypassedBy
record component.@NotNull List
<BlocksAttacks.DamageReduction> Returns the value of thedamageReductions
record component.float
Returns the value of thedisableCooldownScale
record component.@Nullable 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.@NotNull BlocksAttacks.ItemDamageFunction
Returns the value of theitemDamage
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
NBT_TYPE
-
-
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 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 componentbypassedBy
- the value for thebypassedBy
record componentblockSound
- the value for theblockSound
record componentdisableSound
- the value for thedisableSound
record 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 thecompare
method from their corresponding wrapper classes. -
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
-
bypassedBy
Returns the value of thebypassedBy
record component.- Returns:
- the value of the
bypassedBy
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
-