Asahi

Quick rating

Community listing page, reviews here may not be monitored by the author.

Asahi

By hugeblankOwner

No reviews yet

Remove jittering of the moving sun caused by client desync!

No Theme
No Genre
QoL & Tweaks
Client Utility
Mod Loaders
Fabric
Minecraft

Community voices

Reviews

List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Show per page
10
25
50
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Client Only

Runs entirely on the client. Works on vanilla servers.

About

Project Details

Type
Mod
License
MIT License
Latest Version
1.4.0+26.1

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Client side Minecraft mod that removes daylight cycle rubber-banding caused by server lag!

If you ask for forge I'll steal your kneecaps

The problem

Every second (20 ticks,) the server sends a packet that syncs the world time between the client and the server. Since clients have no reference for the tick rate of the server, they assume that the server is running at the standard 20 ticks per second. As such, when the server is lagging, that 20 ticks takes longer to process, leading the client to display the sun ahead of where it is on the server. When that sync packet comes in the vanilla client snaps the sun to the server position, causing the issue that this mod fixes.

The solution

A rolling weighted average, and some interpolation! First, we take samples of the last 10 seconds of the amount of ticks that passed on the server per tick on the client. Then, since the sample from 10 seconds ago isn't as relevant as the sample in the last second, we weigh each of them exponentially less compared to the first. Taking the average of this weighted list, we can effectively predict the movement of the sun over the next second. The margin of error in the suns position caused by the prediction varies, but it is imperceptbile in comparison to the snap-back that happens with the vanilla logic.

Without Asahi:

Daylight cycle without Asahi

With Asahi:

Daylight cycle with Asahi

Please note that this gif is from an earlier version of the mod, the interpolation used has only gotten better since!

Circular Sun is part of a resource pack provided by vanillatweaks.net

Config

{
  // If the time received by the server is `skipDuration` or more seconds from the client time,
  // skip to the server's time, bypassing interpolation. 
  // Play around with this value if the daylight cycle is absurdly fast.
  "skipDuration": 60,
  // Amount of prior factors to use in the rolling average interpolation. 
  // Play around with this value if you notice the sun bouncing back and forth a lot without settling into position.
  "interpolateSamples": 10,
  // Initial daylight cycle tick per game tick. 
  // Increase/decrease this value if another mod is present that speeds up/slows down the daylight cycle  
  "initialFactor": 1.0,
  // The standard tick rate with relation to the resolution of the daylight cycle. 
  // Change if playing with mods that increase/decrease the standard tick rate OR the resolution of a daylight cycle (24000 ticks).
  // Note that to my knowledge there are no mods that do this.
  "standardTickRate": 20
}

Screenshots

Gallery

  • Without Asahi
    Without Asahi A slightly laggy world without the Asahi mod. Note the sun jumping back.
  • With Asahi
    With Asahi Asahi slows down the progression of the daylight cycle on the client until the server catches up. If the client is the one that's ahead the cycle will also speed up to get back in sync.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~22,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works