diff --git a/docs/PORTING.md b/docs/PORTING.md index 0cf333a..3a4799a 100644 --- a/docs/PORTING.md +++ b/docs/PORTING.md @@ -360,6 +360,10 @@ sky. The sun, moon, and stars follow a plane rotated by the saved Legacy-style angle in normal gameplay and Immersive Portals previews, while vanilla dimensions retain their standard celestial path. +Version 0.2.26.1 rotates the celestial path around the world's vertical axis, +allowing the saved angle to change each Age's sunrise and sunset compass +direction instead of merely tilting the rendered path. + Version 0.2.14.0 restores the legacy Linking and Descriptive Book artwork for inventory items and gives each book its matching open-book texture when placed on a Book Stand. Return Linking Books created inside another Age also retain and diff --git a/gradle.properties b/gradle.properties index a70b491..6793bf6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -35,7 +35,7 @@ mod_name=Rivencraft # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=LGPL-3.0-or-later # The mod version. Rivencraft uses the x.y.z.b policy documented in README.md. -mod_version=0.2.26.0 +mod_version=0.2.26.1 immersive_portals_version=6.0.7 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. diff --git a/src/main/java/net/dnorberg/rivencraft/mixin/client/LevelRendererMixin.java b/src/main/java/net/dnorberg/rivencraft/mixin/client/LevelRendererMixin.java index 514220d..13ab2f6 100644 --- a/src/main/java/net/dnorberg/rivencraft/mixin/client/LevelRendererMixin.java +++ b/src/main/java/net/dnorberg/rivencraft/mixin/client/LevelRendererMixin.java @@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; -/** Tilts the vanilla sun, moon, and star plane by each Age's saved angle. */ +/** Rotates the vanilla sun, moon, and star path by each Age's saved angle. */ @Mixin(LevelRenderer.class) public abstract class LevelRendererMixin { @Shadow @@ -26,6 +26,10 @@ public abstract class LevelRendererMixin { ) private Quaternionf rivencraft$rotateCelestialPlane(Axis axis, float degrees) { float angle = ClientAgeCelestialAngles.get(level.dimension()); - return new Quaternionf(Axis.ZP.rotationDegrees(angle)).mul(axis.rotationDegrees(degrees)); + // Vanilla's -90 degree Y rotation fixes every sunrise to the same + // east/west line. Offset that rotation around the world's vertical + // axis so the saved Age angle changes the compass direction of the + // entire sun, moon, and star path. + return axis.rotationDegrees(degrees + angle); } }