Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Roadie

Farming and seasons in multiplay

7 posts in this topic

I'm just wondering if you guys have any plans or are able to make it to were the seasons don't change if no one is online on a server.

 

This is what kinda bugs me about multiplay:

 

In single player food is an actually concern and needs to be tended to. But on multiplay even if everyone is offline time still passes by and food grows and seasons change while no one is to witness it. Also there is no need to rotate crops because they have the time to grow in the players absence. It almost makes farming a passive commodity.

0

Share this post


Link to post
Share on other sites

The problem with this is that there really isn't any way for the game to check if no players are logged in. The only real solution is to have a limited up-time server, where the server admin manually shuts down the server whenever players aren't logged in, and then manually starts it back up when a user requests to log in.

0

Share this post


Link to post
Share on other sites

The problem with this is that there really isn't any way for the game to check if no players are logged in. The only real solution is to have a limited up-time server, where the server admin manually shuts down the server whenever players aren't logged in, and then manually starts it back up when a user requests to log in.

 

Doesn't the game unload chunks when no players are on? Could you use that feature to see if no chunks are loaded, stop tick progression?

1

Share this post


Link to post
Share on other sites

Doesn't the game unload chunks when no players are on? Could you use that feature to see if no chunks are loaded, stop tick progression?

 

Spawn chunks are always loaded as long as the server is running, that's just how vanilla works.

0

Share this post


Link to post
Share on other sites

The problem with this is that there really isn't any way for the game to check if no players are logged in. The only real solution is to have a limited up-time server

--------------------------------

 

( ͡° ͜ʖ ͡°)

0

Share this post


Link to post
Share on other sites

I think you cannot get around the fact that time has to continue on a server, when the growth of plants depends on the server wide season. If the time would depend on the online players the time progression would become unpredictable. Time progression on a server is much like reality, only you cannot really log off from earth.

 

There is already a feature in the game that could be used to solve this: the length of the tfc year, which can be adjusted in the settings file. Normally a year is 12 months with 8 days each (96 total). With a minecraft day lasting 20 real minutes this means that one year lasts 32 hours. Maybe a bit long for smp, but okay that is not the discussion here.

 

By connecting the crop growth speed to the year length would allow server admins to balance farming speed on the server (and would be quite believable/realistic at the same time), simply by adjusting the year length. For example wheat can be set to take 5 full months to grow. Maybe it already works like that in the code, I'm not sure.

 

For a server I would set a yearlength to about 5 days, so that also people that live up north can grow their crops and do not need to schedule a log in after only 16 real hours to harvest, just because winter is coming!

 

However, due to a small bug caused by a mismatching yearlength configuration between server and client you can get strange effects if you try to change the server year-length. The server determines things like crop growth, while the client handles visual effects. This can cause situations where the client has a summer with rain but sees snow appearing and crops popping out of the ground, simply because on the server it actually is winter. A workaround is to have all players adjust the yearlength manually. If the server would pass the proper yearlength setting to the client, this bug could be squashed (that is, if I understand the problem correctly ;)).

 

A downside of a longer yearlength is the huge buildup of snow that would occur over time, but that can perhaps be solved by adding craftable snowboots, negating the slowing down effect of the snow.

0

Share this post


Link to post
Share on other sites

A good method of solving this seemed to be to set up a very simple command block system in the spawn chunks (a compass can be very helpful here).

 

A command block is hooked up to a simple clock with "/testfor @a" as the command. This will check for any players online.

A comparator is used to pull the result from the command block.

This comparator goes directly into a second command block that has "/gamerule doDaylightCycle true".

On top of the second command block is a redstone torch and above that another command block with "/gamerule doDaylightCycle false".

 

This can all be compactly contained in bedrock (and hidden away underground if you wish).

 

 

 

Disclaimer: I haven't had any issues since using this on my server. This does not mean this is safe and you use this technique at your own risk! I take absolutely no responsibility for problems you may encounter.

0

Share this post


Link to post
Share on other sites