Fixed bard music bug where music would keep playing, unattached to a particular NPC.

This commit is contained in:
Luis C.M. committed 2024-05-16 02:01:04 -05:00
1 parent 03c45c70c5
commit a88f814c7a
7 files changed
+92 -16

No files matched your search

@@ -8,6 +8,8 @@ import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import kamkeel.addon.DBCAddon;
import kamkeel.addon.client.DBCClient;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.SoundHandler;
import net.minecraft.client.audio.SoundManager;
import net.minecraft.entity.Entity;
import net.minecraft.inventory.ContainerPlayer;
import net.minecraft.world.World;
@@ -57,7 +59,7 @@ public class ClientTickHandler{
RenderNPCInterface.LastTextureTick++;
if(prevWorld != mc.theWorld){
prevWorld = mc.theWorld;
MusicController.Instance.stopMusic();
MusicController.Instance.stopAllSounds();
} else if (MusicController.Instance.isPlaying() && MusicController.Instance.getEntity() != null) {
Entity entity = MusicController.Instance.getEntity();
if (MusicController.Instance.getOffRange() > 0 &&