Fix #85; make sound so that it keeps running at least 10 ticks after machine stops to better deal with per-tick flipflops. Also revert ccd7ed0; UX got too weird.

This commit is contained in:
Dave Smith committed 2019-03-21 11:51:36 -06:00
1 parent ad6007a45b
commit 66d218a59f
2 files changed
+10 -9

No files matched your search

@@ -80,12 +80,6 @@ public class SoundHandler {
}
public static ISound startTileSound(ResourceLocation soundLoc, float volume, BlockPos pos) {
// Check to see if the game has focus; in SP mode sounds aren't paused until AFTER the game menu is displayed,
// which means that a sound can slip into queue after user has already paused the game.
if (!Minecraft.getMinecraft().inGameHasFocus) {
return null;
}
// First, check to see if there's already a sound playing at the desired location
ISound s = soundMap.get(pos.toLong());
if (s == null || !Minecraft.getMinecraft().getSoundHandler().isSoundPlaying(s)) {