Fix Age celestial path rotation
Build / build (push) Canceled after 0s

This commit is contained in:
dnorberg committed 2026-09-22 22:40:57 -04:00
1 parent 08caa98c0b
commit a48c0e8691
3 files changed
+11 -3

No files matched your search

+4
View File
@@ -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
+1 -1
View File
@@ -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.
@@ -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);
}
}