I came up with a simple idea to handle crops in dormant chunks without relying on resource consuming server ticks. the idea revolves around saving date and time stamps with the chunk data when a chunk goes offline. i dont really know java that well so i am basically writing this in shorthand english with a c like syntax but it should be enough to get the idea.
IF (chunk goes dormant)
{get current date and time and save it as Timestamp in chunk data
Else Process ticks normally
}
IF (Chunk Loads)
{
systemtime = Current system date and time
Get Timestamp
//X is the ammount of time to wait on a dormant chunk before growing plants.
if systemtime >= (Timestamp+X)
{
Replace blockid of all plants with Mature Blockid.
}
else Process ticks normally
}
basically on a chunk load the Timestamp will be compared with the current system time. and if a set ammount of time has passed since the chunk goes dormant the server will assume that the plants have all grown and will replace the blockid of all plants with their mature counterpart. this allows the plants to grow offline with only a slight use of resources on chunk load.
Latest News Article
Minecraft Monday Show - Let's Play Killers & Great Downloads!
This week, BebopVox covers the recent drama with "Let's Play" videos (including Mojang's stance on the matter), and much more!...
Minecraft Video Trailer: "Relapse"
Looking for a sci-fi adventure set inside Minecraft? fngnation is, and can't wait to release this awesome space-opera thriller, called "Relapse"! While this is just a trailer of the upcoming movie, it's definitely worth a watch, so ...
Minecraft Parody: "Grieferman"
Most of you have seen Psy's recent new song, "Gentleman". It's not too often that I run across a parody that's better than the original, but StageFiveTV's parody, "Grieferman", definitely nailed it! Clever lyrics, ...
Idea to Process Plant Growth in Dormant Chunks with Minimal Resource Usage
Started by
corinanth
, Nov 13 2012 03:03 AM
9 replies to this topic
#2
Posted 13 November 2012 - 03:06 AM
I think this has been suggested before, but that was a very long time ago and I couldn't find it. So I'll re add my support to this thread.
My last signature got me in trouble. Here is a picture of a cat:
#3
Posted 13 November 2012 - 03:41 AM
I like this idea, although it would be better to simulate the natural random growth speed. Every 82 seconds, the wheat should have a 30% chance to grow under ideal conditions.
At 20 minutes, that would mean a 25% chance of it being fully grown. At 80 minutes, that would mean that it is fully grown.
At 20 minutes, that would mean a 25% chance of it being fully grown. At 80 minutes, that would mean that it is fully grown.
Spoiler:
Spoiler:
#4
Posted 13 November 2012 - 03:59 AM
Support. I found a good place to put my farm but it's too far away from my base for it to be practical.
My guide to leveling up
Deal with it, and shut up and stop complaining. There's really nothing else to say, and posts like these question the reason as to why I'm here. - ImTarisac
Deal with it, and shut up and stop complaining. There's really nothing else to say, and posts like these question the reason as to why I'm here. - ImTarisac
#6
Posted 13 November 2012 - 05:10 AM
This has my support but I do have a question; for multi-stage plants like wheat and netherwart, would it check the time passed to see if they should move up stage, or just time to full maturity?
#7
Posted 13 November 2012 - 05:15 AM
Mulan15262, on 13 November 2012 - 03:41 AM, said:
I like this idea, although it would be better to simulate the natural random growth speed. Every 82 seconds, the wheat should have a 30% chance to grow under ideal conditions.
At 20 minutes, that would mean a 25% chance of it being fully grown. At 80 minutes, that would mean that it is fully grown.
At 20 minutes, that would mean a 25% chance of it being fully grown. At 80 minutes, that would mean that it is fully grown.
also the more complicated you make this the more server time it takes on chunk load so the simple comparison timer is the best way to go because it requires less tests see the quote below it is easier to just take the longest or average time for wheat to grow and use that as the trigger.
SgtRalph, on 13 November 2012 - 05:10 AM, said:
This has my support but I do have a question; for multi-stage plants like wheat and netherwart, would it check the time passed to see if they should move up stage, or just time to full maturity?
#8
Posted 13 November 2012 - 07:50 AM
Okay, I think I get it, but for maximum clarity can you run through a quick example?
Lets say wheat at any stage takes at maximum 5 minutes to progress to the next stage. On our wheat farm we have wheat plants in stages 1 through 3, (stage 4 being fully grown). We leave our farm to go about our other business and the chunk is now unloaded. 6 minutes pass until our return. Does this scenario play out as:
A. All wheat moves up a stage, stage 1 wheat is now stage 2, stage 2 to stage 3, and stage 3 wheat plants are now fully grown or...
B. Only stage 3 wheat grows, and is now fully grown, but all the stage 1 and stage 2 wheat remain in the same stage or...
C. None of the wheat is grown because the timer needs to reach 15 minutes, the time to go from stage 1 wheat to full maturity
Lets say wheat at any stage takes at maximum 5 minutes to progress to the next stage. On our wheat farm we have wheat plants in stages 1 through 3, (stage 4 being fully grown). We leave our farm to go about our other business and the chunk is now unloaded. 6 minutes pass until our return. Does this scenario play out as:
A. All wheat moves up a stage, stage 1 wheat is now stage 2, stage 2 to stage 3, and stage 3 wheat plants are now fully grown or...
B. Only stage 3 wheat grows, and is now fully grown, but all the stage 1 and stage 2 wheat remain in the same stage or...
C. None of the wheat is grown because the timer needs to reach 15 minutes, the time to go from stage 1 wheat to full maturity
#9
Posted 13 November 2012 - 09:35 AM
SgtRalph, on 13 November 2012 - 07:50 AM, said:
Okay, I think I get it, but for maximum clarity can you run through a quick example?
Lets say wheat at any stage takes at maximum 5 minutes to progress to the next stage. On our wheat farm we have wheat plants in stages 1 through 3, (stage 4 being fully grown). We leave our farm to go about our other business and the chunk is now unloaded. 6 minutes pass until our return. Does this scenario play out as:
A. All wheat moves up a stage, stage 1 wheat is now stage 2, stage 2 to stage 3, and stage 3 wheat plants are now fully grown or...
B. Only stage 3 wheat grows, and is now fully grown, but all the stage 1 and stage 2 wheat remain in the same stage or...
C. None of the wheat is grown because the timer needs to reach 15 minutes, the time to go from stage 1 wheat to full maturity
Lets say wheat at any stage takes at maximum 5 minutes to progress to the next stage. On our wheat farm we have wheat plants in stages 1 through 3, (stage 4 being fully grown). We leave our farm to go about our other business and the chunk is now unloaded. 6 minutes pass until our return. Does this scenario play out as:
A. All wheat moves up a stage, stage 1 wheat is now stage 2, stage 2 to stage 3, and stage 3 wheat plants are now fully grown or...
B. Only stage 3 wheat grows, and is now fully grown, but all the stage 1 and stage 2 wheat remain in the same stage or...
C. None of the wheat is grown because the timer needs to reach 15 minutes, the time to go from stage 1 wheat to full maturity
Lightning flashes bright, then fades away. It never heals, only destroys.












