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.
Rollback Post to RevisionRollBack
Every time a mod author makes a new "TOOL" God Kills a Kitten. Think of the Kittens, ADD Omniwrench Support To Your Mods !!!
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.
Rollback Post to RevisionRollBack
Want some advice on how to thrive in the Suggestions section? Check this handy list of guidelines and tips for posting your ideas and responding to the ideas of others!
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.
Rollback Post to RevisionRollBack
Why does everyone think I don't have an avatar? Is there anyone who can see the one black pixel.
Please click the dragons, they need to grow. Also, my fully grown dragons can be found in my bio.
Support. I found a good place to put my farm but it's too far away from my base for it to be practical.
Rollback Post to RevisionRollBack
XP Guide Regardless of what change you do, no matter how small, someone will complain. - Jens Bergensten If you want me to see your reply, make sure to quote my post in your reply.
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?
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.
that kinda defeats the purpose the more tests you add to chunk initialization the longer it takes for chunks to load and the more strain on the server. this entire concept is to be as fast and simple as possible.
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.
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?
the timer for x would be the maximum time it can take for wheat to mature fully so basically if enough time passed it would grow to full maturity.
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
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
Cool, AGREED and you have my support
Rollback Post to RevisionRollBack
Lightning flashes bright, then fades away. It never heals, only destroys.
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.
Want some advice on how to thrive in the Suggestions section? Check this handy list of guidelines and tips for posting your ideas and responding to the ideas of others!
http://www.minecraftforum.net/forums/minecraft-discussion/suggestions/2775557-guidelines-for-the-suggestions-forum
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.
Why does everyone think I don't have an avatar? Is there anyone who can see the one black pixel.
Please click the dragons, they need to grow. Also, my fully grown dragons can be found in my bio.
Regardless of what change you do, no matter how small, someone will complain. - Jens Bergensten
If you want me to see your reply, make sure to quote my post in your reply.
that kinda defeats the purpose the more tests you add to chunk initialization the longer it takes for chunks to load and the more strain on the server. this entire concept is to be as fast and simple as possible.
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.
the timer for x would be the maximum time it can take for wheat to mature fully so basically if enough time passed it would grow 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