Class CustomSoundInstance

java.lang.Object
net.minecraft.client.resources.sounds.AbstractSoundInstance
de.mrjulsen.dragnsounds.core.ext.CustomSoundInstance
All Implemented Interfaces:
net.minecraft.client.resources.sounds.SoundInstance

public class CustomSoundInstance extends net.minecraft.client.resources.sounds.AbstractSoundInstance
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.client.resources.sounds.SoundInstance

    net.minecraft.client.resources.sounds.SoundInstance.Attenuation
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final String
     
    static final float
     
    static final float
     
    static final float
     
    static final String
     
    static final float
     
    static final float
     
    static final float
     

    Fields inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance

    attenuation, delay, location, looping, pitch, relative, sound, source, volume, x, y, z
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomSoundInstance(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float volume, float pitch, boolean looping, int delay, net.minecraft.client.resources.sounds.SoundInstance.Attenuation attenuation, double x, double y, double z, boolean relative, int attenuationDistance)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    float
     
    float
     
    net.minecraft.client.sounds.WeighedSoundEvents
    resolve(net.minecraft.client.sounds.SoundManager manager)
     
    ui(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float pitch, float volume)
     
    world(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float pitch, float volume, net.minecraft.world.phys.Vec3 position, boolean relative, int attenuationDistance)
     

    Methods inherited from class net.minecraft.client.resources.sounds.AbstractSoundInstance

    getAttenuation, getDelay, getLocation, getSound, getSource, getX, getY, getZ, isLooping, isRelative, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.client.resources.sounds.SoundInstance

    canPlaySound, canStartSilent
  • Field Details

  • Constructor Details

    • CustomSoundInstance

      public CustomSoundInstance(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float volume, float pitch, boolean looping, int delay, net.minecraft.client.resources.sounds.SoundInstance.Attenuation attenuation, double x, double y, double z, boolean relative, int attenuationDistance)
  • Method Details

    • getAttenuationDistance

      public int getAttenuationDistance()
    • ui

      public static CustomSoundInstance ui(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float pitch, float volume)
    • world

      public static CustomSoundInstance world(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float pitch, float volume, net.minecraft.world.phys.Vec3 position, boolean relative, int attenuationDistance)
    • getVolume

      public float getVolume()
      Specified by:
      getVolume in interface net.minecraft.client.resources.sounds.SoundInstance
      Overrides:
      getVolume in class net.minecraft.client.resources.sounds.AbstractSoundInstance
    • getPitch

      public float getPitch()
      Specified by:
      getPitch in interface net.minecraft.client.resources.sounds.SoundInstance
      Overrides:
      getPitch in class net.minecraft.client.resources.sounds.AbstractSoundInstance
    • resolve

      public net.minecraft.client.sounds.WeighedSoundEvents resolve(net.minecraft.client.sounds.SoundManager manager)
      Specified by:
      resolve in interface net.minecraft.client.resources.sounds.SoundInstance
      Overrides:
      resolve in class net.minecraft.client.resources.sounds.AbstractSoundInstance