Hbm's Nuclear Tech Mod

Hbm's Nuclear Tech Mod

1M Downloads

Sounds are broken

JosephFrankFir opened this issue ยท 11 comments

commented

Describe the bug

When too many machines work at the same time, the sounds break, making the game unplayable.

Attachment

2024-04-16.14-04-43.1.mp4

Version

HBM-NTM-.1.0.27_X4921

commented

it's working well so far and the code for it is

import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import paulscode.sound.SoundSystemConfig;

    @EventHandler
    public void preInit(FMLPreInitializationEvent event) {
        SoundSystemConfig.setNumberNormalChannels(1024);
        SoundSystemConfig.setNumberStreamingChannels(32);
    }
commented

Minecraft has a limit on how many sounds can play at once, after which it will simply forcefully stop older sounds. looped sounds will restart themselves if they are stopped, which is why they will then constantly start and stop due to hitting the limit. I don't think there's anything I can do about that, since I can't find where in the code that limit is imposed or how to avoid it.

commented

So it's hardcoded or what?

commented

I guess the only way is to hardcode OpenAL library and potentially Minecraft's internal architecture but it's complex i think

commented

i just now saw a mod that does this job ig

commented

what the hell, it's that easy?

commented

Yeah, just a simple research xd

commented

will there be an update

commented

At the latest on sunday, although with the current issues of the new power grid, probably sooner.

commented

Update is out, regular sounds are now capped at 1000 and streaming sounds at 50.