Ok, was talking with Aichan just now, asked me to add what I said before, so:
Chunk loaders seem to have evolved since the last time I looked at them, at leat those on direwolfs20 FTB modpack. They is a limit of chunkloaders per player, and they consume enderpearls to function; if such supply isn't easily automatable (for instance, it has to be refiled by an actual player), and if a chunkloader peripheral for turtles is made to work in the same way, it would be safe to give all players the right to use chunkloaders.(To avoid lag, up until now most servers blacklisted them)For this particular use (remotely starting up a turtle), it would be awesome to pre-program the chunkloader to load the chunk upon receiving an external signal. Not sure what would be an interesting signal in general; In your case, your script would have to interact with the minecraft java-side somehow, and for instance throw an event that the peripheral class would catch. Last resource, would be your script writing to a file it's requests (and deleting old ones), and java reading it regularly.A rednet msg would oblige to have the rednet emitter loaded, even if the message is caught java-side (where the chunks activation ensues).Safety constraints are similar to those restricting your web editor: delays between loading/unloading the same chunk, maximum number of chunks loading at the same time, ect.Pretty much like simulating a new kind of player, the automaton (the turtle), which requires a pre-intervention from a real player to be able to 'play' for a limited time.Compared to chunk-loading peripherals,that already implement something like:
-activateChunkLoader()
-deactivateChunkLoader() <- needs to be protected against spamming, and possibly have a global action queue of chunk loaders to deactivate, making a sleep between each.
the new stuff, java-side, would be:
-implementing behavior that I've already seen in recent chunkloaders:
need a player-only refill of a resource (like enderpearls), so there is a time limit for the chunk-loader to be active without player interaction, and there is a limit of active chunk-loaders per player;
-loadComputer(id,player)
would check if the said chunk loader peripheral is present in the turtle/computer with said id, properly filled, and belongs to @player, and if so, load the chunk where said turtle is, turning on the chunk loader.
This function needs to be protected against spamming,e.g. a global queue with a delay between chunk loaders activations.
To actually do what the OP wants, an interface between Java and it's server script is necessary, that would gather requests of the type (id,player). The actual authentication of the player connecting through the OP web interface is another story, but it isn't done java-side.
Activating chunks from in-game in this restricted fashion also seems useful, so adding this to the Lua chunkloader peripheral methods would be nice:
–activateChunkLoader(id)
Would call loadComputer(id, [player username of who placed the peripheral which is calling loadComputer]).
Note: both queues have to be protected against duplicates of the same requests (identified by chunloaders), by not queuing them again; a delay between unloading and loading a same chunkloader is also a good idea.
EDIT: checked out
forge api for chunkloading, seems this would involve keeping track of where the chunkloader is and requesting new tickets each time it crosses a chunk.