Class SoundEngine


  • public class SoundEngine
    extends java.lang.Object
    • Field Detail

      • MARKER

        private static final org.apache.logging.log4j.Marker MARKER
      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • ONLY_WARN_ONCE

        private static final java.util.Set<ResourceLocation> ONLY_WARN_ONCE
      • loaded

        private boolean loaded
      • listener

        private final Listener listener
      • tickCount

        private int tickCount
      • instanceBySource

        private final com.google.common.collect.Multimap<SoundCategory,​ISound> instanceBySource
      • tickingSounds

        private final java.util.List<ITickableSound> tickingSounds
      • queuedSounds

        private final java.util.Map<ISound,​java.lang.Integer> queuedSounds
      • soundDeleteTime

        private final java.util.Map<ISound,​java.lang.Integer> soundDeleteTime
      • queuedTickableSounds

        private final java.util.List<ITickableSound> queuedTickableSounds
      • preloadQueue

        private final java.util.List<Sound> preloadQueue
    • Method Detail

      • reload

        public void reload()
      • loadLibrary

        private void loadLibrary()
      • getVolume

        private float getVolume​(@Nullable
                                SoundCategory p_188769_1_)
      • updateCategoryVolume

        public void updateCategoryVolume​(SoundCategory p_188771_1_,
                                         float p_188771_2_)
      • destroy

        public void destroy()
      • stop

        public void stop​(ISound p_148602_1_)
      • stopAll

        public void stopAll()
      • tick

        public void tick​(boolean p_217921_1_)
      • tickNonPaused

        private void tickNonPaused()
      • requiresManualLooping

        private static boolean requiresManualLooping​(ISound p_239544_0_)
      • shouldLoopManually

        private static boolean shouldLoopManually​(ISound p_239545_0_)
      • shouldLoopAutomatically

        private static boolean shouldLoopAutomatically​(ISound p_239546_0_)
      • isActive

        public boolean isActive​(ISound p_217933_1_)
      • play

        public void play​(ISound p_148611_1_)
      • queueTickingSound

        public void queueTickingSound​(ITickableSound p_229363_1_)
      • requestPreload

        public void requestPreload​(Sound p_204259_1_)
      • calculatePitch

        private float calculatePitch​(ISound p_188772_1_)
      • calculateVolume

        private float calculateVolume​(ISound p_188770_1_)
      • pause

        public void pause()
      • resume

        public void resume()
      • playDelayed

        public void playDelayed​(ISound p_148599_1_,
                                int p_148599_2_)
      • getDebugString

        public java.lang.String getDebugString()