Skip to content
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

Keep alive when using portal chunk loading? #31

Closed
mmodrow opened this issue Oct 5, 2022 · 2 comments
Closed

Keep alive when using portal chunk loading? #31

mmodrow opened this issue Oct 5, 2022 · 2 comments
Labels
question Further information is requested

Comments

@mmodrow
Copy link

mmodrow commented Oct 5, 2022

I don't know, how much insight into the world state and events within the server lazyMC actually has, but I was thinking about chunk loaders recently. I am about to build redstone machines on my server, that could break upon uncontrolled unloading. So I will add portal chunk loaders to keep the area loaded.

As of my current understanding this would not prevent the server from shutting down, if no one is connected. Currently I keep an afk player on via the minecraft console client, but if they get disconnected for any reason (or are no good option in the case) the server will still shut down.

Is there any way (or could one be added) to build something in-game to keep the server running until the redstone is finished?

@timvisee
Copy link
Owner

timvisee commented Oct 5, 2022

I don't know, how much insight into the world state and events within the server lazyMC actually has (...)

As little as possible.

The current version has no functionality for this. I believe there are three things you can do right now depending on what you want:

  • Set the sleep time to a high value that exceeds your redstone runtime to prevent the server from sleeping.
  • With your idle client connected, kick the client when your redstone logic is done. This may be possible with a redstone signal and a command block after your logic is completed. This doesn't, of course, solve the problem of your idle client disconnecting.
  • Without the idle client you may be able to /stop the server through a command block after your redstone logic is done. When setting wake_on_crash = false, the server won't automatically restart unless you reconnect.

    lazymc/res/lazymc.toml

    Lines 39 to 40 in c6f860f

    # Immediately wake server after crash.
    #wake_on_crash = false

If you don't want the server to automatically restart when reconnecting, you can also use the last method without lazymc.

I hope any of these three approaches are helpful!

By the way, lazymc knows as little about the server as possible of constant API changes in every new Minecraft version,. It would otherwise be a lot of work to keep the tool compatible.

@timvisee timvisee added the question Further information is requested label Oct 5, 2022
@mmodrow
Copy link
Author

mmodrow commented Oct 5, 2022

Thanks for the info. In this case I will combine long timeouts with the cli player.

Thanks fox explaining in detail.

@mmodrow mmodrow closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants