Package net.minecraft.sound
Record Class BiomeMoodSound
java.lang.Object
java.lang.Record
net.minecraft.sound.BiomeMoodSound
- Record Components:
sound-cultivationTicks-spawnRange-extraDistance-
public record BiomeMoodSound(RegistryEntry<SoundEvent> sound, int cultivationTicks, int spawnRange, double extraDistance)
extends Record
- Mappings:
Namespace Name named net/minecraft/sound/BiomeMoodSoundintermediary net/minecraft/class_4968official dusnamed soundintermediary comp_4989official cnamed cultivationTicksintermediary comp_4990official dnamed spawnRangeintermediary comp_4991official enamed extraDistanceintermediary comp_4992official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BiomeMoodSoundstatic final com.mojang.serialization.Codec<BiomeMoodSound> private final intThe field for thecultivationTicksrecord component.private final doubleThe field for theextraDistancerecord component.private final RegistryEntry<SoundEvent> The field for thesoundrecord component.private final intThe field for thespawnRangerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBiomeMoodSound(RegistryEntry<SoundEvent> sound, int cultivationTicks, int spawnRange, double extraDistance) Creates an instance of aBiomeMoodSoundrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the ticks it takes for entering the mood environment (a totally dark cave) to playing the mood sound, or the inverse of the per-tick.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the extra distance of the sound from the player when the sound plays from the mood position.final inthashCode()Returns a hash code value for this object.sound()Returns the value of thesoundrecord component.intReturns the chebyshev distance from which the mood sound can play to the player.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sound
The field for thesoundrecord component. -
cultivationTicks
private final int cultivationTicksThe field for thecultivationTicksrecord component. -
spawnRange
private final int spawnRangeThe field for thespawnRangerecord component. -
extraDistance
private final double extraDistanceThe field for theextraDistancerecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/sound/BiomeMoodSound;CODEC:Lcom/mojang/serialization/Codec;intermediary field_24674Lnet/minecraft/class_4968;field_24674:Lcom/mojang/serialization/Codec;official aLdus;a:Lcom/mojang/serialization/Codec;
-
CAVE
- Mappings:
Namespace Name Mixin selector named CAVELnet/minecraft/sound/BiomeMoodSound;CAVE:Lnet/minecraft/sound/BiomeMoodSound;intermediary field_23146Lnet/minecraft/class_4968;field_23146:Lnet/minecraft/class_4968;official bLdus;b:Ldus;
-
-
Constructor Details
-
BiomeMoodSound
public BiomeMoodSound(RegistryEntry<SoundEvent> sound, int cultivationTicks, int spawnRange, double extraDistance) Creates an instance of aBiomeMoodSoundrecord class.- Parameters:
sound- the value for thesoundrecord componentcultivationTicks- the value for thecultivationTicksrecord componentspawnRange- the value for thespawnRangerecord componentextraDistance- the value for theextraDistancerecord 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 '=='. -
sound
Returns the value of thesoundrecord component.- Returns:
- the value of the
soundrecord component
-
cultivationTicks
public int cultivationTicks()Returns the ticks it takes for entering the mood environment (a totally dark cave) to playing the mood sound, or the inverse of the per-tick.- Mappings:
Namespace Name Mixin selector named cultivationTicksLnet/minecraft/sound/BiomeMoodSound;cultivationTicks()Iintermediary comp_4990Lnet/minecraft/class_4968;comp_4990()Iofficial bLdus;b()I
-
spawnRange
public int spawnRange()Returns the chebyshev distance from which the mood sound can play to the player.- Mappings:
Namespace Name Mixin selector named spawnRangeLnet/minecraft/sound/BiomeMoodSound;spawnRange()Iintermediary comp_4991Lnet/minecraft/class_4968;comp_4991()Iofficial cLdus;c()I
-
extraDistance
public double extraDistance()Returns the extra distance of the sound from the player when the sound plays from the mood position.The sound is actually played at a position along the line on the three-dimensional vector from the player to the chosen mood position that is this distance to the mood position and this distance farther from the player.
- Mappings:
Namespace Name Mixin selector named extraDistanceLnet/minecraft/sound/BiomeMoodSound;extraDistance()Dintermediary comp_4992Lnet/minecraft/class_4968;comp_4992()Dofficial dLdus;d()D
-