package land.chipmunk.chipmunkmod.mixin;

import net.minecraft.client.sound.SoundInstance;
import net.minecraft.client.sound.SoundSystem;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(SoundSystem.class)
public class SoundSystemMixin {
    @Inject(method = "getAdjustedPitch", at = @At("RETURN"), cancellable = true)
    private void getAdjustedPitch (final SoundInstance sound, final CallbackInfoReturnable<Float> cir) {
        cir.setReturnValue(sound.getPitch());
    }
}
