Skip to content

Change tick rate to float#8

Open
Lambholl wants to merge 3 commits intoDennisOchulor:1.21.1from
Lambholl:patch-1
Open

Change tick rate to float#8
Lambholl wants to merge 3 commits intoDennisOchulor:1.21.1from
Lambholl:patch-1

Conversation

@Lambholl
Copy link
Copy Markdown

@Lambholl Lambholl commented Apr 1, 2025

I have built the mod and tried to change rate to 20.99. The time of redstone repeaters ran showed it worked.
This is a 10s-timer:
BB7E617DFA51EDD79AC40E4FEB174057

@DennisOchulor
Copy link
Copy Markdown
Owner

Hey, to clarify, the actual logic of the mod is based on this:

  • The mainloop of the server always matches the TPS of the fastest loaded ticking entity/chunk
  • Entities/chunks that need to tick slower than the mainloop simply skip a certain number of mainloop ticks to reach their desired TPS

Because of this, it's not really possible to support actual float values. For example, if the mainloop is ticking at 100 TPS, and some entity wants to tick at 20.5 TPS. Realistically, that entity has to do 20 or 21 instead. So when you enter a float value for the TPS, the mod just rounds it to the nearest integer.

Admittedly this is a design flaw I noticed a bit too late into initial development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants