-
Notifications
You must be signed in to change notification settings - Fork 209
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
schedule bonus ticks #2253
base: mc1.18.x
Are you sure you want to change the base?
schedule bonus ticks #2253
Conversation
This definitely sounds like something that would be good as a config option at the least, will try and take a look at it whenever I next get around to working on ProjectE |
for (SpedUpItem item : queue) { | ||
|
||
// reasonable range so a single doesn't hog too much | ||
int ticks = Mth.clamp(item.getTicksLeft() / divisor, 1, Math.min(totalTicks, 1_000)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's probably a better function usable here,
the idea is to get a ratio so that things that have 100 bonus ticks don't get the same as things with only like 10. but we also don't want this while loop to take too long for a single iteration, since it only checks if it's out of time each loop
I am going to look into this in the next few days, though odds are I will more so pull it out of the PR/reimplement and copy bits as I am currently finishing up 1.19 before moving to 1.20 and this PR is targeted at 1.18 |
pupnewfster@a90c2ac was my experimentation with this and there are some things I am not quite sure about in regards to things like assuming all blocks have same number of ticks given to them then they do one at a time a single extra tick, but it means validation has to be done again as if one of the blocks that got accelerated was a miner or something then the other block may no longer exist. So for now I am shelving this until 1.20.3+ when mojang is adding a tick command to make testing this easier and potentially if we are lucky maybe is doing some cleanup of how things are ticked to allow batching them easier? (doubtful but we can hope) |
schedule at the end of the tick, drop if lagging too much
add config option for max tps drop TimeWatch can cause
is this a good idea?