Skip to content
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

Open
Steveplays28 opened this issue Oct 13, 2022 · 7 comments · May be fixed by #76
Open

Don't assume server TPS is 20 #7

Steveplays28 opened this issue Oct 13, 2022 · 7 comments · May be fixed by #76
Labels
enhancement New feature or request / improvement of existing feature help wanted Extra attention is needed

Comments

@Steveplays28 Steveplays28 added bug Something isn't working enhancement New feature or request / improvement of existing feature help wanted Extra attention is needed and removed bug Something isn't working labels Oct 13, 2022
@awnc
Copy link

awnc commented Jan 13, 2023

So is there a method to get server current TPS?

@Steveplays28
Copy link
Member Author

Steveplays28 commented Jan 13, 2023

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!
Still chipping away at the next update, will add 1.19.3 support (current version might work if you edit the fabric.mod.json file inside the jar though, not sure).

@Steveplays28
Copy link
Member Author

Steveplays28 commented Jan 15, 2023

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.

@Tazaur
Copy link

Tazaur commented Jan 16, 2023

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.

@Steveplays28
Copy link
Member Author

Steveplays28 commented Jan 16, 2023

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.
Though telling the player what in game time it is right now would be a good replacement!

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.
Any contributions are welcome though, feel free to make a PR to implement this!

@leftbones
Copy link

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.

@themg95
Copy link

themg95 commented Oct 8, 2024

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);

@themg95 themg95 linked a pull request Oct 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request / improvement of existing feature help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants