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


  • Posts

  • Joined

  • Last visited

Everything posted by Atijaf

  1. Hey coolAlias! I was wondering when you'd show up:p Thanks again for your help, and thanks for the tutorial on IEEP. It's gotten me thus far. As for your tip, it worked wonders. And thanks diesieben07, I very greatly appreciate all the help you have given me throughout this learning experience. I'll be back sooner or later. Haha. For those that are reading this, I have updated those pastebin Links to show what Is currently working for me. buh bye.
  2. I was about to update my last reply, but realized your prompt response. I appreciate that! Very strange, It seems that it is running through the read method now. One moment while I look at it please! Got it working! For the most part. Just a quick question though if you don't mind. I have a for loop to go through my list of data. for(int i = 0; nbt.getIntArray("myBlockPos" + i) != null; i++){ //obtain info } nbt.getIntArray never returns null though. Is there another way to check if it contains no information?
  3. Okay. I removed the event. When I run the command for the first time, it creates a new instance of WorldData, adds information to it, then sets it dirty. I save and quit the game. The second time, it still creates a new instance. Is that suppose to happen? It doesn't have any data stored in it, nor does readFromNBT get called.
  4. I need the data it holds to load when the server starts
  5. That deffinately did something. I debugged and it walked through all the saving of the class after I set it dirty. It then set the dirty boolean back to false. I believe my event handler is wrong now. Any Ideas? This is the event now. It doesn't find anything in the get method with the given identifier and world. http://pastebin.com/KCdMq01Z Thank you for everything you've done.
  6. So I have a list of locations called myBlockPos. myBlockPos has private variables named, BlockPos, IBlockState, and int. It is used to let blocks respawn in said locations. While in the game, I use a command, fill in the required information, and store it in myBlockPos. Now to the problem. It doesn't save. Data is added, I set the instance's dirty boolean to true, but after I reset minecraft, it isn't there anymore... In other words, the get method doesn't find anything with the given identifier and it creates a brand new instance. Thanks! Edit: SOLVED Current classes: WorldData http://pastebin.com/iRLVfB6g Command http://pastebin.com/s0LaLxs1
  7. All I can figure out is that the method "readFromNBT(NBTTagCompound nbt) is not getting called automatically, but when I manually call it, nbt has nothing saved in it. Am I suppose to register WorldData? or just use the method "public static WorldData get(World world). Also, when the command to set a few variables is used and I use the method "nbt.setTag(Identifier, tagList)" nbt gets data, and then closes. If I call the method again, nbt has no data again, as if I never used the command once. It's weird...
  8. Thanks for explaining that. That's what I was worried about... I am thinking that I probably missed something obvious near the beginning. After I use markDirty(), it sets dirty to true. I then save it. Re enter the command to add more data and before it even gets to the mothod, markDirty(), dirty is still true. (I'm gussing dirty is suppose to be switched back to false when it saves) I will look at my code for a while and possibly make a new thread that deals more with WorldSavedData.
  9. I apologize! Haha. How long should I allow it to sit until it saves? I used markDirty and waited about 5 minutes to see if it had changed, but it was still markedDirty when I checked it.
  10. I've messed with the code a little bit and created a method called saveData. I call this method after I add data to nbt. I run that bit of code, save and quit, reload, and data is null again. The only thing that I can think of that would be wrong is the retrieval of the information.. Or maybe even saving it. Is there anything wrong with this bit of code. I am coding in 1.8, if that makes a difference.
  11. alright. I'll give that a go. Would I call that method in the writeToNBT method?
  12. There was one more class that I forgot to include in pastebin. Also, every time i start minecraft and debug. It goes through the method, WorldData get(World world), and data is null so it creates a new one. Is that suppose to happen? I also never call the method, setDirty(); I went ahead and changed the static variable to a private class variable. No change... I'll leave it a private class variable though Here's my SyncWorldData class http://pastebin.com/dgNBV6G2
  13. Event handler for WorldData http://pastebin.com/3GQee1TY PacketDispatcher. http://pastebin.com/mYgCMeVH WorldData Class http://pastebin.com/RU0fXDcK Tuple Class http://pastebin.com/Xw2H5iNU
  14. Will do:p You tell me. haha! I haven't used Pastebin before. Is this how I share it? http://pastebin.com/u/Atijaf
  15. When I use my command to add new information, it runs through the write method and adds the data I want it to inside of the nbt and It also works correctly while reading the information. But, when I restart the game, it doesn't find anything there. My only guess would be that the world Data information I am using is different every time I load the game. Here is some code. Event Handler PacketDispatcher / sendTo methods SnycWorldData Class I know that this is a lot of information. I don't expect you, nor anyone, to read all of it. I am just curious if you can spot any errors. The packetDispatcher should be just fine, as I have used it to store information with players.
  16. Alright I think I'm getting somewhere. I've noticed that you didn't use the methods nbt.setTag or nbt.getTag inside readFromNBT and writeToNBT. I also see that you are using a method inside QuestologyWorldData get(World world), called world.setItemData(IDENTIFIER, data) Why not use nbt.setTag/getTag and what is "world.setItemData" Also, is markDirty() saving the information? Thank you! Sorry for the load of questions!
  17. What is the purpose of having a nextQuestId and fracturerUsed?
  18. I have a list of blocks and block locations that are suppose to regenerate in specific areas. I have a command that I can use to add them to a list and once I save and quit, I would like to store this information so that it may be used the next time I load into the world.
  19. I've got the read and write methods working. Where do I call them though? In a event handler when the world loads?
  20. Would it be possible to save custom classes? It would be easier in the long run and I would also learn something.
  21. I have a class that contains BlockPos, IBlockState, and world Id. Is there a way to save this type of data in a NBTTagCompound? className is named myBlockPos
  22. What do you mean by returning proper values? I will have different x y and z values. Hundreds actually.
  23. This does work. However, I acquire the blockPos position in the event. In my main code, I declare the locations that I want to have as either a true or false output.
  24. I have a hashMap that uses BlockPos as a key. CODE However, I would like to use the "get(object) function to obtain the Boolean that is inside, within my event handler... The only way I know how to obtain a BlockPos is like so.. When using new, BlockPos is now consider an entirely new object and inside my hashMap, it doesn't exist. Example: Does anyone know any work arounds or even a better way to implement this? Thanks:)
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.