Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.7.10] Saving data to a file?


AnZaNaMa
 Share

Recommended Posts

Hi, I'm creating a custom mod for my server, because the use of KCauldron for plugin functionality seems to break a lot of things. Anyways, I'm currently working on a module for creating and managing sky islands for my skyfactory server. I have a command for people to create islands, but once the island is created, I want to somehow save the name of the island and it's coordinates so I can access it later. I considered storing it in player NBT data, but then the islands would have to be assigned to players and they would need to be online. I suppose I could also save it to the world's NBT data, but then if a player is in a different world and tries to access it, there may be problems. How can I save the data so that I can access it later?

- Just because things are the way they are doesn't mean they can't be the way you want them to be. Unless they're aspen trees. You can tell they're aspens 'cause the way they are.

Link to comment
Share on other sites

Simply save it to file using standard IO operations.

 

If you want to utilize NBT use CompressedStreamTools.

 

Coords can be saved server-wise (not per-world) in some static class/map/list.

1.7.10 is no longer supported by forge, you are on your own.

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
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.

 Share



×
×
  • Create New...

Important Information

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