Record Class BlockRegistry.SoundType
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.registry.BlockRegistry.SoundType
- Enclosing class:
BlockRegistry
public static record BlockRegistry.SoundType(float volume, float pitch, net.minecraft.sounds.SoundEvent breakSound, net.minecraft.sounds.SoundEvent stepSound, net.minecraft.sounds.SoundEvent placeSound, net.minecraft.sounds.SoundEvent hitSound, net.minecraft.sounds.SoundEvent fallSound)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BlockRegistry.SoundType> -
Constructor Summary
ConstructorsConstructorDescriptionSoundType(float volume, float pitch, net.minecraft.sounds.SoundEvent breakSound, net.minecraft.sounds.SoundEvent stepSound, net.minecraft.sounds.SoundEvent placeSound, net.minecraft.sounds.SoundEvent hitSound, net.minecraft.sounds.SoundEvent fallSound) Creates an instance of aSoundTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.sounds.SoundEventReturns the value of thebreakSoundrecord component.net.minecraft.world.level.block.SoundTypeconvert()static BlockRegistry.SoundTypecreate(net.minecraft.world.level.block.SoundType soundType) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.sounds.SoundEventReturns the value of thefallSoundrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.sounds.SoundEventhitSound()Returns the value of thehitSoundrecord component.floatpitch()Returns the value of thepitchrecord component.net.minecraft.sounds.SoundEventReturns the value of theplaceSoundrecord component.net.minecraft.sounds.SoundEventReturns the value of thestepSoundrecord component.final StringtoString()Returns a string representation of this record class.floatvolume()Returns the value of thevolumerecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
SoundType
public SoundType(float volume, float pitch, net.minecraft.sounds.SoundEvent breakSound, net.minecraft.sounds.SoundEvent stepSound, net.minecraft.sounds.SoundEvent placeSound, net.minecraft.sounds.SoundEvent hitSound, net.minecraft.sounds.SoundEvent fallSound) Creates an instance of aSoundTyperecord class.- Parameters:
volume- the value for thevolumerecord componentpitch- the value for thepitchrecord componentbreakSound- the value for thebreakSoundrecord componentstepSound- the value for thestepSoundrecord componentplaceSound- the value for theplaceSoundrecord componenthitSound- the value for thehitSoundrecord componentfallSound- the value for thefallSoundrecord component
-
-
Method Details
-
convert
public net.minecraft.world.level.block.SoundType convert() -
create
-
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. -
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
public net.minecraft.sounds.SoundEvent breakSound()Returns the value of thebreakSoundrecord component.- Returns:
- the value of the
breakSoundrecord component
-
stepSound
public net.minecraft.sounds.SoundEvent stepSound()Returns the value of thestepSoundrecord component.- Returns:
- the value of the
stepSoundrecord component
-
placeSound
public net.minecraft.sounds.SoundEvent placeSound()Returns the value of theplaceSoundrecord component.- Returns:
- the value of the
placeSoundrecord component
-
hitSound
public net.minecraft.sounds.SoundEvent hitSound()Returns the value of thehitSoundrecord component.- Returns:
- the value of the
hitSoundrecord component
-
fallSound
public net.minecraft.sounds.SoundEvent fallSound()Returns the value of thefallSoundrecord component.- Returns:
- the value of the
fallSoundrecord component
-