From 6f7b487648e7f51534cfaf71fdcb2fe77cbbb140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?der=5Ffr=C3=BChling?= Date: Thu, 8 Aug 2024 21:35:51 -0700 Subject: [PATCH 1/2] yeouch --- .../minecraft/create/trainperspective/Perspective.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/Perspective.java b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/Perspective.java index 516c454..8cd8255 100644 --- a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/Perspective.java +++ b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/Perspective.java @@ -87,6 +87,15 @@ default float getYaw(float f) { var ref = getReference(); if (ref == null) return 0.0f; if (f == 1.0f) return ref.yaw * getValueScale(); + + while (ref.yaw - ref.prevYaw < -180.0f) { + ref.prevYaw -= 360.0f; + } + + while (ref.yaw - ref.prevYaw >= 180.0f) { + ref.prevYaw += 360.0f; + } + return Mth.lerp(f, ref.prevYaw * getPrevValueScale(), ref.yaw * getValueScale()); } From 3b92f64dc48c6f0f75240e06b568a433807ff56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?der=5Ffr=C3=BChling?= Date: Sat, 10 Aug 2024 14:21:23 -0700 Subject: [PATCH 2/2] bump to v0.6.1 --- changelog.md | 10 ++-------- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/changelog.md b/changelog.md index 147a401..239e15a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,14 +1,8 @@ -Extra smoothness and extra compatibility change. - Changelog: -- **Fixed:** Delayed camera movement when train turns. -- **Added:** Debug option to display new value scales used to fix the aforementioned delayed camera movement. -- **Fixed:** Incompatibility with Figura combined with some mods. [#67](https://github.com/der-fruhling-entertainment/create-train-perspective/issues/67) - - (fixed via possibly temporary workaround. please report any other issues with this mod and mine! it likes to get breaky) -- **Technical:** Cleaned up the code a bit more. +- **Fixed:** Critical jittering bug introduced in v0.6.0 -[View full change log.](https://github.com/der-fruhling/create-train-perspective/compare/v0.5.0...v0.6.0) +[View full change log.](https://github.com/der-fruhling/create-train-perspective/compare/v0.6.0...v0.6.1) --- diff --git a/gradle.properties b/gradle.properties index 73b38e6..03b1237 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ quilt_loader_version=0.21.2-beta.2 quilt_fabric_api_version=7.4.0+0.90.0-1.20.1 # public info mod_id=create_train_perspective -mod_version=0.6.0 +mod_version=0.6.1 maven_group=net.derfruhling.minecraft archives_base_name=create-train-perspective # mod dependency versions