Package com.hbm_m.sound
Class ClientSoundBootstrap
java.lang.Object
com.hbm_m.sound.ClientSoundBootstrap
Вызовы
ClientSoundManager через reflection, чтобы common-классы (BlockEntity и т.д.)
не имели в constant pool ссылок на клиентские типы — иначе dedicated server падает при загрузке класса.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidplayOneShotSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.sounds.SoundEvent sound, float volume) static voidstopSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) static voidstopSpecificSound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, String soundType) static voidupdateDoorSoundRaw(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, String soundType, boolean isMoving, Supplier<?> loopSoundSupplier) static voidupdateSound(net.minecraft.world.level.block.entity.BlockEntity be, boolean shouldBePlaying, Supplier<?> soundSupplier)
-
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
-
updateSound
public static void updateSound(net.minecraft.world.level.block.entity.BlockEntity be, boolean shouldBePlaying, Supplier<?> soundSupplier)
-