From 349b232e806527b26d5f1674b534b4b6f231640c Mon Sep 17 00:00:00 2001 From: fayer3 Date: Sun, 14 Jul 2024 20:44:48 +0200 Subject: [PATCH] fix fire and totem of undying animation --- .../client_vr/render/helpers/VREffectsHelper.java | 1 - .../mixin/client_vr/renderer/GameRendererVRMixin.java | 9 ++++----- gradle.properties | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/org/vivecraft/client_vr/render/helpers/VREffectsHelper.java b/common/src/main/java/org/vivecraft/client_vr/render/helpers/VREffectsHelper.java index a18d05f83..1385cc16f 100644 --- a/common/src/main/java/org/vivecraft/client_vr/render/helpers/VREffectsHelper.java +++ b/common/src/main/java/org/vivecraft/client_vr/render/helpers/VREffectsHelper.java @@ -652,7 +652,6 @@ private static void renderVRSelfEffects(float par1) { public static void renderFireInFirstPerson() { PoseStack posestack = new PoseStack(); - RenderHelper.applyVRModelView(dataHolder.currentPass, posestack); RenderHelper.applyStereo(dataHolder.currentPass, posestack); BufferBuilder bufferbuilder = Tesselator.getInstance().getBuilder(); RenderSystem.depthFunc(GL11C.GL_ALWAYS); diff --git a/common/src/main/java/org/vivecraft/mixin/client_vr/renderer/GameRendererVRMixin.java b/common/src/main/java/org/vivecraft/mixin/client_vr/renderer/GameRendererVRMixin.java index 101464c5b..3fe92a258 100644 --- a/common/src/main/java/org/vivecraft/mixin/client_vr/renderer/GameRendererVRMixin.java +++ b/common/src/main/java/org/vivecraft/mixin/client_vr/renderer/GameRendererVRMixin.java @@ -466,15 +466,14 @@ public abstract class GameRendererVRMixin float m = 10.25f * l * h - 24.95f * h * h + 25.5f * l - 13.8f * h + 4.0f * g; float n = m * (float) Math.PI; float sinN = Mth.sin(n) * 0.5F; - poseStack.translate(0, 0, sinN - 1.0); + RenderHelper.applyStereo(ClientDataHolderVR.getInstance().currentPass, poseStack); + poseStack.mulPose(Axis.YP.rotationDegrees(-ClientDataHolderVR.getInstance().vrPlayer.getVRDataWorld().getEye(ClientDataHolderVR.getInstance().currentPass).getYaw())); + poseStack.mulPose(Axis.XP.rotationDegrees(-ClientDataHolderVR.getInstance().vrPlayer.getVRDataWorld().getEye(ClientDataHolderVR.getInstance().currentPass).getPitch())); + poseStack.translate(0, 0, sinN + 1.0); if (ClientDataHolderVR.getInstance().currentPass == RenderPass.THIRD) { sinN *= (float) (ClientDataHolderVR.getInstance().vrSettings.mixedRealityFov / 70.0); } - RenderHelper.applyVRModelView(ClientDataHolderVR.getInstance().currentPass, poseStack); - RenderHelper.applyStereo(ClientDataHolderVR.getInstance().currentPass, poseStack); poseStack.scale(sinN, sinN, sinN); - poseStack.mulPose(Axis.YP.rotationDegrees(-ClientDataHolderVR.getInstance().vrPlayer.getVRDataWorld().getEye(ClientDataHolderVR.getInstance().currentPass).getYaw())); - poseStack.mulPose(Axis.XP.rotationDegrees(-ClientDataHolderVR.getInstance().vrPlayer.getVRDataWorld().getEye(ClientDataHolderVR.getInstance().currentPass).getPitch())); } } diff --git a/gradle.properties b/gradle.properties index d4ddbcadc..869df1778 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ minecraft_version=1.20.6 enabled_platforms=fabric,forge,neoforge archives_base_name=vivecraft -mod_version=1.1.11-b1 +mod_version=1.1.11-b2 maven_group=org.vivecraft architectury_version=12.0.26