Public Access
1 parent
08caa98c0b
commit
a48c0e8691
3 files changed
+11
-3
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user