Class BiomeMoodSound

java.lang.Object
net.minecraft.sound.BiomeMoodSound

public class BiomeMoodSound
extends Object
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<BiomeMoodSound> CODEC
    • CAVE

      public static final BiomeMoodSound CAVE
    • sound

      private final SoundEvent 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

      @Environment(CLIENT) public SoundEvent 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.