So, basically minecraft works in a way that the only things that happen are in 81 chunks from the player, and all the other chunks are statically saved in the computer until they get in the range of the player.
that was fine, in the past, but now that you can change you'r spawn point, you can go around to different areas for months and discover that the 64 iron blocks you putted for smelt are STILL not done...annoying...
I will now divide all progresses to 3 categories.
(a progress being every thing in minecraft that takes time to complete)
1.active - in the radius of the player
2.passive - not in the radius and are saved statically.
3.inactive - not happening.(a furnace with no fuel).
so I suggest adding an attribute to the chunk class that will keep the time that past since the last time the chunk it's in was active, and that in the minute the chuck is again active, the code calculates what should be the state of the progresses if that time had passed if the chunk was active.
Note that a similar method can be used to calculate progresses passage while sleeping in a bed.
that is the big picture. here are stuff better added as well:
* have a max value to the time that passed, a value that means that by that time all the progresses should already be done, and adding more is useless.
(with random progresses like tree growth i suggest using the worst case scenario)
*mob movment shouldn't be considered a progress.
*item disappearance is a problem, as it can cause some serious lag IMO, because it can be as high as 100s of progresses, but you know better than I what can cause lag.
Rollback Post to RevisionRollBack
Quote from Matraz »
That's not a circle... it's a triacontakaihexagon. (36 sided shape)
An excellent suggestion. This should have been part of minecraft all along, because it is easy to implement, and it should even reduce lag if done properly.
that was fine, in the past, but now that you can change you'r spawn point, you can go around to different areas for months and discover that the 64 iron blocks you putted for smelt are STILL not done...annoying...
I will now divide all progresses to 3 categories.
(a progress being every thing in minecraft that takes time to complete)
1.active - in the radius of the player
2.passive - not in the radius and are saved statically.
3.inactive - not happening.(a furnace with no fuel).
so I suggest adding an attribute to the chunk class that will keep the time that past since the last time the chunk it's in was active, and that in the minute the chuck is again active, the code calculates what should be the state of the progresses if that time had passed if the chunk was active.
Note that a similar method can be used to calculate progresses passage while sleeping in a bed.
that is the big picture. here are stuff better added as well:
* have a max value to the time that passed, a value that means that by that time all the progresses should already be done, and adding more is useless.
(with random progresses like tree growth i suggest using the worst case scenario)
*mob movment shouldn't be considered a progress.
*item disappearance is a problem, as it can cause some serious lag IMO, because it can be as high as 100s of progresses, but you know better than I what can cause lag.