Abastro Posted April 14, 2015 Share Posted April 14, 2015 Hi, I'm Abastro, developing Stellarium mod. Currently I'm working on config load/save part from World. So I set up some code with WorldSavedData, and I confronted a vital problem. The problem was: The dimensions(providers) should be changed via the content of the config. but the World instance does not exist when dimensions can be changed, so WorldSavedData is invalid on that moment. As a result, loading/saving with WorldSavedData is incompatible with changing dimensions. I want to know whether I'm wrong somewhere or there are the best solutions for this problem. Is there any breakthrough for this problem? I'm looking forward to it! Any help would appreciated! Quote I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium. Link to comment Share on other sites More sharing options...
jabelar Posted April 14, 2015 Share Posted April 14, 2015 Would you only have to do it once before loading a world and then after that the world could use world save data? In that case I think you could use a Config -- use Config unless there is world save data then use that, and you can change the config based on what is happening in the game. If you need to keep track of multiple saves with different information, you could potentially make your own ID system for the world saves mapping to config info. But otherwise, file operations in Java aren't too hard. So you can take the configuration file path (there is one suggested passed into the pre init event) and make your own files there. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/ Link to comment Share on other sites More sharing options...
Abastro Posted April 14, 2015 Author Share Posted April 14, 2015 Would you only have to do it once before loading a world and then after that the world could use world save data? In that case I think you could use a Config -- use Config unless there is world save data then use that, and you can change the config based on what is happening in the game. If you need to keep track of multiple saves with different information, you could potentially make your own ID system for the world saves mapping to config info. But otherwise, file operations in Java aren't too hard. So you can take the configuration file path (there is one suggested passed into the pre init event) and make your own files there. Thanks for the reply. I have to use config information to determine which dimension exists or not, and change the provider of Overworld. So is there any other way to do this without direct file operations? Quote I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium. Link to comment Share on other sites More sharing options...
Abastro Posted April 18, 2015 Author Share Posted April 18, 2015 I just want some more explanations and solutions.. Quote I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium. Link to comment Share on other sites More sharing options...
Recommended Posts
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.