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

import me.djtheredstoner.perspectivemod.PerspectiveMod;
import net.minecraft.entity.player.EntityPlayer;

public class ActiveRenderInfoHook {

    public static float rotationYawHook(EntityPlayer entity) {
        return PerspectiveMod.instance.perspectiveToggled ? PerspectiveMod.instance.cameraYaw : entity.rotationYaw;
    }

    public static float rotationPitchHook(EntityPlayer entity) {
        return PerspectiveMod.instance.perspectiveToggled ? PerspectiveMod.instance.cameraPitch : entity.rotationPitch;
    }

}