Class ClientSoundBootstrap

java.lang.Object
com.hbm_m.sound.ClientSoundBootstrap

public final class ClientSoundBootstrap extends Object
Вызовы ClientSoundManager через reflection, чтобы common-классы (BlockEntity и т.д.) не имели в constant pool ссылок на клиентские типы — иначе dedicated server падает при загрузке класса.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    playOneShotSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.sounds.SoundEvent sound, float volume)
     
    static void
    stopSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
     
    static void
    stopSpecificSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, String soundType)
     
    static void
    updateDoorSoundRaw(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, String soundType, boolean isMoving, Supplier<?> loopSoundSupplier)
     
    static void
    updateSound(net.minecraft.world.level.block.entity.BlockEntity be, boolean shouldBePlaying, Supplier<?> soundSupplier)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • playOneShotSound

      public static void playOneShotSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.sounds.SoundEvent sound, float volume)
    • stopSound

      public static void stopSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    • stopSpecificSound

      public static void stopSpecificSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, String soundType)
    • updateDoorSoundRaw

      public static void updateDoorSoundRaw(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, String soundType, boolean isMoving, Supplier<?> loopSoundSupplier)
    • updateSound

      public static void updateSound(net.minecraft.world.level.block.entity.BlockEntity be, boolean shouldBePlaying, Supplier<?> soundSupplier)