Posted December 27, 201410 yr 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
December 28, 201410 yr 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
December 28, 201410 yr Author Okay I removed the WorldEvents class but my data still doesn't get loaded correctly. It saves on ServerStop.
December 28, 201410 yr Author Main Class Code: http://hastebin.com/jesucozada.avrasm WorldData Code: http://hastebin.com/jihapexexi.avrasm
December 28, 201410 yr 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!
December 28, 201410 yr 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
December 28, 201410 yr Author I changed it to this: http://hastebin.com/erakusibis.avrasm Still it doesn't get loaded correctly!
December 28, 201410 yr 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!
December 28, 201410 yr Author I just wanted to say, I copy pasted it from the Warps class there it wasn't an instance from the class.
December 30, 201410 yr Author After some research I found out, that the tagCount is always 0? Idk why NBT Explorer says this:
December 30, 201410 yr 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);
December 30, 201410 yr 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.