Jump to content

[1.7.10] WorldSaveData doesn't get loaded correctly


Flamy

Recommended Posts

Hello,

after I created my custom WorldSaveData, I tested it and realized that the stuff gets saved but doesn't get loaded in correctly.

Here are my classes:

 

WorldSavedDataClass(I know it's messy):

http://hastebin.com/sedawuyuhu.avrasm

 

DataClass:

http://hastebin.com/epenolaboc.coffee

 

WorldEventsClass:

http://hastebin.com/yutoriwupu.avrasm

 

The issue is somewhere here:

http://hastebin.com/sedawuyuhu.avrasm

@readFromNBT

 

Thanks,

Flamy

Link to comment
Share on other sites

Ahh didn't know that with the minecraftServer field. Thanks for that.

 

What I mean with "not get loaded proparly".

When I restart minecraft the special world data(warp,city,schedular) isn't here anymore. Let's say I create a warp in instance 1 it stays there until I restart. When I restart there aren't any warps anymore!

Link to comment
Share on other sites

public class CityList extends ArrayList<City>{

@Override
public boolean add(City c){
	WorldData.commitAll();
	return super.add(c);
}

}

All of my lists in the code are the same.

And commitAll():

	public static void commitAll(){
	get(MinecraftServer.getServer().getEntityWorld()).markDirty();
}

 

And I'm too silly to create a github repo

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.