Fixed music continuing to play for server bards even after logging out

This commit is contained in:
Luis C.M. committed 2025-03-05 22:57:24 -06:00
1 parent 6e1b2f957f
commit b64481dec1
3 files changed
+8 -5

No files matched your search

@@ -68,10 +68,8 @@ public class ClientTickHandler{
otherContainer = true;
CustomNpcs.ticks++;
RenderNPCInterface.LastTextureTick++;
if(prevWorld != mc.theWorld){
prevWorld = mc.theWorld;
MusicController.Instance.stopAllSounds();
} else if (MusicController.Instance.isPlaying() && MusicController.Instance.getEntity() != null) {
if (MusicController.Instance.isPlaying() && MusicController.Instance.getEntity() != null) {
Entity entity = MusicController.Instance.getEntity();
if (MusicController.Instance.getOffRange() > 0 &&
(Minecraft.getMinecraft().thePlayer == null ||
@@ -80,6 +78,7 @@ public class ClientTickHandler{
MusicController.Instance.stopMusic();
}
}
MusicController.Instance.onUpdate();
ScriptSoundController.Instance.onUpdate();
if(Minecraft.getMinecraft().thePlayer!=null && (prevWidth!=mc.displayWidth || prevHeight!=mc.displayHeight)){