Jump to content

[1.7.10]Save data between minecraft saves


megabitus

Recommended Posts

Well, the first solution that comes to mind would be to save that data to an external save, e.g. a textfile or bytefile just like you would do in a normal application and save it to the minecraft folder(much like a config file). Then when you need to load the object that needs the data just read the data you loaded back into the game on startup(to save on waiting time).

 

That seems to be the most sensible. Otherwise going through the level.dat is complete and utter waste of computing time.

 

The only downside(or plusside) is that if you delete a world it won't delete the folder unless you specifically modify what it has to delete, which I'll guess without looking at the code would be quite a challenge.

 

And if there are build-in ways, which I do not know since I've never had to do such a thing, use those. Although to be honest I don't think there is, the only mod I can remember that does that is the one that has portals going from one world to another.

Link to comment
Share on other sites

you need to be careful saving items and blocks , if you use writenbttag methods they save the internal id of the items and blocks,

this could cause problems when loading into a different game, as the ids could be different

 

you will need to write your own saving method, and use the Item's name

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.