Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • Author

@dieSieben007

Two things:

1. Why don't I need the WorldEvents Class? It saves/loads the worlddata in.

2. How should I load the data in? MarkDirty only saves the WorldData.

 

~Flamy

  • Author

Okay I removed the WorldEvents class but my data still doesn't get loaded correctly. It saves on ServerStop.

  • Author

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!

  • Author

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

  • Author

I already have done that:

public void addWarp(Warp warp){

warpList.add(warp);

get(MinecraftServer.getServer().getEntityWorld()).markDirty();

}

But the data still doesn't get loaded!

  • Author

I just wanted to say, I copy pasted it from the Warps class there it wasn't an instance from the class.

  • Author

After some research I found out, that the tagCount is always 0? Idk why NBT Explorer says this:

54c18fd678.png

  • Author

I'm already checking if the world isn't remote. And I'm adding the WARPS via the command. It gets saved and I can see it in NBT Explorer but it doesn't get loaded inGame(The tagCount of every list is ALWAYS:0);

  • Author

I'll try to create one okay? But it will be very messy and unprofessionall, because I still test stuff. I'll clean it up later!

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.