aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/RenderManagerHook.java
blob: 2f55de19a140571c3b8a2c687fdf6f64d8737539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package me.djtheredstoner.perspectivemod.asm.hooks;

import me.djtheredstoner.perspectivemod.PerspectiveMod;
import net.minecraft.client.renderer.entity.RenderManager;

public class RenderManagerHook {

    public static void playerViewXHook(RenderManager renderManager, float value) {
        renderManager.playerViewX = PerspectiveMod.instance.perspectiveToggled ? PerspectiveMod.instance.cameraPitch : value;
    }

    public static void playerViewYHook(RenderManager renderManager, float value) {
        renderManager.playerViewY = PerspectiveMod.instance.perspectiveToggled ? PerspectiveMod.instance.cameraYaw : value;
    }
}