Package net.minecraft.sound
Class BiomeMoodSound
java.lang.Object
net.minecraft.sound.BiomeMoodSound
public class BiomeMoodSound extends Object
-
Field Summary
Fields Modifier and Type Field Description static BiomeMoodSoundCAVEstatic com.mojang.serialization.Codec<BiomeMoodSound>CODECprivate intcultivationTicksprivate doubleextraDistanceprivate SoundEventsoundprivate intspawnRange -
Constructor Summary
Constructors Constructor Description BiomeMoodSound(SoundEvent sound, int cultivationTicks, int spawnRange, double extraDistance) -
Method Summary
Modifier and Type Method Description intgetCultivationTicks()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.doublegetExtraDistance()Returns the extra distance of the sound from the player when the sound plays from the mood position.SoundEventgetSound()intgetSpawnRange()Returns the chebyshev distance from which the mood sound can play to the player.
-
Field Details
-
CODEC
-
CAVE
-
sound
-
cultivationTicks
private final int cultivationTicks -
spawnRange
private final int spawnRange -
extraDistance
private final double extraDistance
-
-
Constructor Details
-
BiomeMoodSound
public BiomeMoodSound(SoundEvent sound, int cultivationTicks, int spawnRange, double extraDistance)
-
-
Method Details
-
getSound
-
getCultivationTicks
@Environment(CLIENT) public int getCultivationTicks()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. -
getSpawnRange
@Environment(CLIENT) public int getSpawnRange()Returns the chebyshev distance from which the mood sound can play to the player. -
getExtraDistance
@Environment(CLIENT) public double getExtraDistance()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.
-