nonamecrackers2 / mob-battle-music

A Forge mod that adds three new music tracks that play as you sneak about mobs, fight them, and battle players. Client side only.
https://www.curseforge.com/minecraft/mc-mods/mob-battle-music
Apache License 2.0
2 stars 0 forks source link

Issue with trying to add multiple tracks/JSON Issue? #12

Open DalekPierce opened 6 months ago

DalekPierce commented 6 months ago

Mod Version

1.20.1-1.1.1.2

Mod Loader

Forge

Mod Loader Version

47.2.20

Describe the bug

I've been attempting to include new soundtracks to play randomly for the aggressive mobs, but it does not appear to be working. Currently it is only playing aggro_track2, and won't include aggro_track in the loop. I'll include my current .json file below. I'm attempting to add around 3 aggressive tracks, but I'm testing it by adding an extra one at the moment. My hope is to try and have the aggressive tracks play randomly, but as mentioned, it is not working and only playing the second one.

Steps to Reproduce

Sounds.json file:

{ "non_aggro_track": { "category": "records", "sounds": [ { "name": "mobbattlemusic:non_aggro_track", "stream": true, "volume": 0.6 }, { "name": "mobbattlemusic:non_aggro_track2", "stream": true, "volume": 0.6 } ] }, "aggro_track": { "category": "records", "sounds": [ { "name": "mobbattlemusic:aggro_track", "stream": true, "volume": 0.6 }, { "name": "mobbattlemusic:aggro_track2", "stream": true, "volume": 0.6 } ] }, "player_track": { "category": "records", "sounds": [ { "name": "mobbattlemusic:player_track", "stream": true, "volume": 0.6 } ] } }

Crash Reports/Logs

No response

Is OptiFine installed?

Screenhots

No response

Mod List

N/A

WitherBean commented 6 months ago

Name this post something besides Bug:

Flaming-skeleton-guitar commented 6 months ago

Name this post something besides Bug:

Bug:

DalekPierce commented 6 months ago

Name this post something besides Bug:

My bad, first time poster on Github.

nonamecrackers2 commented 5 months ago

That's alright. Do you have a log file you could share?

DalekPierce commented 5 months ago

That's alright. Do you have a log file you could share?

Unfortunately, no, just the JSON file that I was working with, since there isn't any crashes. I'll include the actual file I was working on, from my resourcepack. And while I'm not totally sure, I think there may be an issue with playing custom Minecraft music with mobbattlemusic. When the aggressive combat track appeared while I was fighting mobs, the other music I've added as part of a normal music resourcepack disappeared and didn't seem to return. This could just be a fluke/just me though.

mobbattlemusic.zip

nonamecrackers2 commented 5 months ago

I’ll take a look at that pack. Also, background music can take a while to come back on. I’ll have to test it to make sure it does though, so thanks for bringing it to my attention.

DalekPierce commented 5 months ago

I’ll take a look at that pack. Also, background music can take a while to come back on. I’ll have to test it to make sure it does though, so thanks for bringing it to my attention.

I've been able to fix the problem with the background music by using a mod called Constant Music. It helps to load back normal music after the mobbattlemusic ends; highly recommend it.

nonamecrackers2 commented 5 months ago

The reason why your pack is not working is because you don't have a pack.mcmeta file, and the folders aren't properly organized. The folder mobbattlemusic needs to be in another folder called assets, so something like assets/mobbattlemusic

For the pack.mcmeta, create a new file outside the assets folder and include something like this inside of it:

{
  "pack": {
    "pack_format": 26,
    "description": "Example description"
  }
}

Let me know if this works or not