Package net.minestom.server.registry
Record Class Registry.BlockSoundTypeEntry
java.lang.Object
java.lang.Record
net.minestom.server.registry.Registry.BlockSoundTypeEntry
- Enclosing class:
Registry
public static record Registry.BlockSoundTypeEntry(@NotNull net.kyori.adventure.key.Key key, float volume, float pitch, SoundEvent breakSound, SoundEvent hitSound, SoundEvent fallSound, SoundEvent placeSound, SoundEvent stepSound)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBlockSoundTypeEntry(String namespace, Registry.Properties main) BlockSoundTypeEntry(@NotNull net.kyori.adventure.key.Key key, float volume, float pitch, SoundEvent breakSound, SoundEvent hitSound, SoundEvent fallSound, SoundEvent placeSound, SoundEvent stepSound) Creates an instance of aBlockSoundTypeEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebreakSoundrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefallSoundrecord component.final inthashCode()Returns a hash code value for this object.hitSound()Returns the value of thehitSoundrecord component.@NotNull net.kyori.adventure.key.Keykey()Returns the value of thekeyrecord component.floatpitch()Returns the value of thepitchrecord component.Returns the value of theplaceSoundrecord component.Returns the value of thestepSoundrecord component.final StringtoString()Returns a string representation of this record class.floatvolume()Returns the value of thevolumerecord component.
-
Constructor Details
-
BlockSoundTypeEntry
-
BlockSoundTypeEntry
public BlockSoundTypeEntry(@NotNull @NotNull net.kyori.adventure.key.Key key, float volume, float pitch, SoundEvent breakSound, SoundEvent hitSound, SoundEvent fallSound, SoundEvent placeSound, SoundEvent stepSound) Creates an instance of aBlockSoundTypeEntryrecord class.- Parameters:
key- the value for thekeyrecord componentvolume- the value for thevolumerecord componentpitch- the value for thepitchrecord componentbreakSound- the value for thebreakSoundrecord componenthitSound- the value for thehitSoundrecord componentfallSound- the value for thefallSoundrecord componentplaceSound- the value for theplaceSoundrecord componentstepSound- the value for thestepSoundrecord 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 '=='. -
key
@NotNull public @NotNull net.kyori.adventure.key.Key key()Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
volume
public float volume()Returns the value of thevolumerecord component.- Returns:
- the value of the
volumerecord component
-
pitch
public float pitch()Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-
breakSound
Returns the value of thebreakSoundrecord component.- Returns:
- the value of the
breakSoundrecord component
-
hitSound
Returns the value of thehitSoundrecord component.- Returns:
- the value of the
hitSoundrecord component
-
fallSound
Returns the value of thefallSoundrecord component.- Returns:
- the value of the
fallSoundrecord component
-
placeSound
Returns the value of theplaceSoundrecord component.- Returns:
- the value of the
placeSoundrecord component
-
stepSound
Returns the value of thestepSoundrecord component.- Returns:
- the value of the
stepSoundrecord component
-