-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't assume server TPS is 20 #7
Comments
So is there a method to get server current TPS? |
@awnc There must be, but I can't find one. I'd appreciate any help though! |
There doesn't seem to be a way to do this with Fabric API, which is a shame. Every mod I've looked at so far (Carpet, TabTPS, etc) use their own method of tracking TPS/MSPT. Quite a bit of work to implement this for a small gain, if anyone is reading this and wants this implemented, let me know. |
If implementing IRL seconds-until-wake is too much work, why not change it to Minecraft time-until-wake? for example, if the sun rises at 6 am, tell the player what time it is currently, in the game. that way the player can still have a form of progress visualization, and it would be much easier to do. Otherwise, yes, the incorrect seconds are annoying and misleading and should be fixed somehow. |
The seconds are currently not incorrect, unless the tickrate drops below 20. I'll think about what to do with it. Need to continue the math for the exponential curve system at some point as well (see #9). Since this is quite an edge case that should barely yield any issues and can be compensated for using the config, I've decided not to work on this issue for now. |
Not sure if this is still relevant but you could take a look at how the mod "SleepWarp" does it, because in my experience the countdown in that mod is always accurate, even if the tickrate is wrong (I think) -- I find that ticking things quickly like this mod and SleepWarp does tends to lower the server tickrate yet the timer is still accurate. |
SleepWarp also seems to hardcode the tps var remainingSeconds = Math.round(((double) remainingTicks / warpTickCount) / 20); |
https://github.com/Steveplays28/realisticsleep/blob/d02b78c1a226223c6e2cc458311b3fb7654c9620/src/main/java/com/github/steveplays28/realisticsleep/mixin/ServerWorldMixin.java#L91-L92
The text was updated successfully, but these errors were encountered: