aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks
diff options
context:
space:
mode:
authorDJtheRedstoner <52044242+DJtheRedstoner@users.noreply.github.com>2021-08-20 17:17:16 -0400
committerDJtheRedstoner <52044242+DJtheRedstoner@users.noreply.github.com>2021-08-20 17:17:16 -0400
commit12888a9eb0469a5462e497a29eb4d3d15bb48f3c (patch)
tree0c0ab075cfefd3fca76e7d35704f7ba20ae961f9 /src/main/java/me/djtheredstoner/perspectivemod/asm/hooks
parent28fb656d8b285f3da2227dd859735392902a31ef (diff)
downloadPerspectiveModv4-12888a9eb0469a5462e497a29eb4d3d15bb48f3c.tar.gz
PerspectiveModv4-12888a9eb0469a5462e497a29eb4d3d15bb48f3c.tar.bz2
PerspectiveModv4-12888a9eb0469a5462e497a29eb4d3d15bb48f3c.zip
this is why we can't have nice things
Diffstat (limited to 'src/main/java/me/djtheredstoner/perspectivemod/asm/hooks')
-rw-r--r--src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/ActiveRenderInfoHook.java16
-rw-r--r--src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/EntityRendererHook.java32
-rw-r--r--src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/MinecraftHook.java16
-rw-r--r--src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/RenderManagerHook.java15
4 files changed, 0 insertions, 79 deletions
diff --git a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/ActiveRenderInfoHook.java b/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/ActiveRenderInfoHook.java
deleted file mode 100644
index 94296d1..0000000
--- a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/ActiveRenderInfoHook.java
+++ /dev/null
@@ -1,16 +0,0 @@
-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;
- }
-
-}
diff --git a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/EntityRendererHook.java b/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/EntityRendererHook.java
deleted file mode 100644
index a6ea788..0000000
--- a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/EntityRendererHook.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package me.djtheredstoner.perspectivemod.asm.hooks;
-
-import me.djtheredstoner.perspectivemod.PerspectiveMod;
-import net.minecraft.client.Minecraft;
-import net.minecraft.entity.Entity;
-
-public class EntityRendererHook {
-
- public static float rotationYawHook(Entity entity) {
- return PerspectiveMod.instance.perspectiveToggled ? PerspectiveMod.instance.cameraYaw : entity.rotationYaw;
- }
-
- public static float prevRotationYawHook(Entity entity) {
- return PerspectiveMod.instance.perspectiveToggled ? PerspectiveMod.instance.cameraYaw : entity.prevRotationYaw;
- }
-
- public static float rotationPitchHook(Entity entity) {
- return PerspectiveMod.instance.perspectiveToggled ? PerspectiveMod.instance.cameraPitch : entity.rotationPitch;
- }
-
- public static float prevRotationPitchHook(Entity entity) {
- return PerspectiveMod.instance.perspectiveToggled ? PerspectiveMod.instance.cameraPitch : entity.prevRotationPitch;
- }
-
- public static boolean mouseHook(Minecraft minecraft) {
- return PerspectiveMod.instance == null ? minecraft.inGameHasFocus : PerspectiveMod.instance.overrideMouse();
- }
-
- public static double distanceHook(double value) {
- return value;
- }
-}
diff --git a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/MinecraftHook.java b/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/MinecraftHook.java
deleted file mode 100644
index 31914f8..0000000
--- a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/MinecraftHook.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package me.djtheredstoner.perspectivemod.asm.hooks;
-
-import me.djtheredstoner.perspectivemod.PerspectiveMod;
-import net.minecraft.client.settings.GameSettings;
-
-public class MinecraftHook {
-
- public static void thirdPersonHook(GameSettings gameSettings, int value) {
- if(PerspectiveMod.instance.perspectiveToggled) {
- PerspectiveMod.instance.resetPerspective();
- } else {
- gameSettings.thirdPersonView = value;
- }
- }
-
-}
diff --git a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/RenderManagerHook.java b/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/RenderManagerHook.java
deleted file mode 100644
index 2f55de1..0000000
--- a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/RenderManagerHook.java
+++ /dev/null
@@ -1,15 +0,0 @@
-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;
- }
-}