/*
 * Aeronica's mxTune MOD
 * Copyright 2019, Paul Boese a.k.a. Aeronica
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */
package net.aeronica.mods.mxtune.sound;

import net.aeronica.mods.mxtune.config.ModConfig;
import net.aeronica.mods.mxtune.managers.PlayIdSupplier;

/**
 * Using MovingSound just to make this ITickableSound based. This keeps the sound from timing out after 20 ticks.
 *
 * @author Paul Boese a.k.a. Aeronica
 */
public class MusicClient extends MxSound
{
    public MusicClient(Integer playID)
    {
        super(playID);
        super.attenuationType = AttenuationType.NONE;
        this.playType = PlayIdSupplier.getTypeForPlayId(playID);
    }

    @Override
    public float getModVolume()
    {
        switch (playType)
        {
            case PERSONAL:
                return ModConfig.getVolumes().myMusic;
            case BACKGROUND:
                return ModConfig.getVolumes().backgroundMusic;
            default:
                return ModConfig.getVolumes().backgroundMusic;
        }
    }
}

@@ -806,118 +806,26 @@
 %0A * 
-Using MovingSound just to make this ITickableSound based. This keeps the sound from timing out after 20 ticks.
+MusicClient ISound
 %0A *%0A
@@ -1218,16 +1218,203 @@
 RSONAL:%0A
+                // Volume for the personal player and when testing music in the library%0A            case PLAYERS:%0A                // Volume when I play my own mxTune instruments in game.%0A
         
@@ -1489,16 +1489,52 @@
 GROUND:%0A
+                // Background music%0A
         

Fix background music volumes for when the player plays instruments in game.