So I made a class that saves and loads files by itself. And that is all working out. When the class writes the files than it prints to the console that it is saving and where. Now I don't want it "spamming" the console from auto saves but I still want to print when the "Saving chunks for level 'New World'/Overworld" also gets printed.
Yeah I am trying to detect if the save was triggered by the internal timer that saves every so often. I meant that with the autosave.
Edit: I fixed it. I just got the stack trace from the thread (Thread.currentThread().getStackTrace()) and checked if any line contained "net.minecraft.server.MinecraftServer.tick" because that is the line that des not appear when you cause a save when exiting the game or pausing it.
Code:
//join function joins together all objects from the given array in to a single string
if(!Util.join(Thread.currentThread().getStackTrace()).contains("net.minecraft.server.MinecraftServer.tick"))print saving
So I made a class that saves and loads files by itself. And that is all working out. When the class writes the files than it prints to the console that it is saving and where. Now I don't want it "spamming" the console from auto saves but I still want to print when the "Saving chunks for level 'New World'/Overworld" also gets printed.
Example:
What I want:
What I don't want:
File source
Anyone knows how to achieve this?
Not doing mc modding that much anymore because I am making a full blown game that does not have limitations that mc has. (rip Magiology for now)
I may come back if MC fixes it's rendering pipeline.
Anyone?
Not doing mc modding that much anymore because I am making a full blown game that does not have limitations that mc has. (rip Magiology for now)
I may come back if MC fixes it's rendering pipeline.
Yeah I am trying to detect if the save was triggered by the internal timer that saves every so often. I meant that with the autosave.
Edit: I fixed it. I just got the stack trace from the thread (Thread.currentThread().getStackTrace()) and checked if any line contained "net.minecraft.server.MinecraftServer.tick" because that is the line that des not appear when you cause a save when exiting the game or pausing it.
Code:
Not doing mc modding that much anymore because I am making a full blown game that does not have limitations that mc has. (rip Magiology for now)
I may come back if MC fixes it's rendering pipeline.