Closed opsaaaaa closed 2 years ago
Also, if the script is not very smart, couldn't you make it smarter by saving the chunks that the player forceleoads to disk? so that you can see what chunks have been forceloaded using this app, and if a chunk is forceloaded that is not on your list it means that an admin forceloaded it, an if a chunk isn't forceloaded which was on your list means an admin unloaded it, so you remove it from the list.
Then you save the list to disk with __on_close()
and load it back with __on_start()
Though don't do it if it seems like too much.
I thought about keeping track in a list. In the end I decided that most people using this script probably don't mind if their players can basically use forceload. so I decided not to add the extra complexity and just let people know about it. If it becomes something people want then perhaps it will be worth changing at that time.
I figured scarpet had a way to load chunks but i couldn't find it, i don't know how i missed that.
Looks like the add_chunk_ticket
loads chunks for a certain amount of time, so I would need to add a schedule loop every 300 ticks to keep it loaded. Im glad to know about that, but I think I am satisfied with the forceload solution at the moment.
Lodestones are Loadstones aka chunk loaders. When a player clicks on a lodestone while sneaking it marks that chunk to be force loaded and if they click on it again the unmarks that chunk. Breaking the lodestone also unmarks the chunk.
Warning, with this script enabled players can unmark chunks admins intend to stay loaded. Only use this script on your server if you would trust your players with the
/forceload
command.