Just Another Spawner

Just Another Spawner

665k Downloads

"WorldProfiles": {} doing jack diddly squat.

Gondus opened this issue ยท 8 comments

commented

I assume "WorldProfiles": {} in the SaveConfigGson.cfg is suppose to use the created (or generate?) configuration files for the world entered into it.

Using the same format as the default world, it doesn't throw out any errors, but it also doesn't do anything. Unless you don't make it in the same structure as the config wants, than it will tell you about it.

When copying default then making changes, default is still used in the Test1 world on my server. (Told it to spawn no cows, sheep, pigs...etc. They had still spawned)

When having no Test1 folder, or even a empty one, configuration files are not generated in it.

Config provided below in case I am doing something wrong.

Here is my config:

{
  "IMPORTANT": "# Folder names are case sensitive if OS allows it. Beware invalid OS characters.",
  "FILE_VERSION": "1.0",
  "DefaultProfile": {
    "Save_Folder_Name": "DEFAULT",
    "Use_Universal_Entity_CFG": false,
    "Sort_Creature_By_Biome": true
  },
  "WorldProfiles": {
    "Test1": {
      "Save_Folder_Name": "Test1",
      "Use_Universal_Entity_CFG": false,
      "Sort_Creature_By_Biome": true
    }
  }
}

Folder Structure

World Settings
    DEFAULT
          EntityHandlers
          (All these subfiles and folders)
    Test1
           (Same as in default)  
    SaveConfigGson.cfg

Also tried Replacing "World Profile" with Test1 to see if I was using the configuration file wrong, still did nothing, and no error output.

{
  "IMPORTANT": "# Folder names are case sensitive if OS allows it. Beware invalid OS characters.",
  "FILE_VERSION": "1.0",
  "DefaultProfile": {
    "Save_Folder_Name": "DEFAULT",
    "Use_Universal_Entity_CFG": false,
    "Sort_Creature_By_Biome": true
  },
  "Test1": {
    "Save_Folder_Name": "Test1",
    "Use_Universal_Entity_CFG": false,
    "Sort_Creature_By_Biome": true
  }
}
commented

Forge version: 10.13.2.1236
Java Version: 1.8.0_25

commented

Ok, now ignore the above. Figured out that the only folder that JAS can detect is the core world folder on the root of the server. Is there a way around this? I tried putting the path into the config, this didnt work. Tried creating symbolic links on my server, still nothing.

{
  "IMPORTANT": "# Folder names are case sensitive if OS allows it. Beware invalid OS characters.",
  "FILE_VERSION": "1.0",
  "DefaultProfile": {
    "Save_Folder_Name": "DEFAULT",
    "Use_Universal_Entity_CFG": false,
    "Sort_Creature_By_Biome": true
  },
  "WorldProfiles": {
    "world": {                                       <--apparently only root worlds work
      "Save_Folder_Name": "world",
      "Use_Universal_Entity_CFG": false,
      "Sort_Creature_By_Biome": true
    },
    "DIM1": {                                        <---This wont work, killin me here.
      "Save_Folder_Name": "DIM1",
      "Use_Universal_Entity_CFG": false,
      "Sort_Creature_By_Biome": true
    }
  }
}
commented
"DIM1": {
      "Save_Folder_Name": "DIM1",
      "Use_Universal_Entity_CFG": false,
      "Sort_Creature_By_Biome": true
}

"DIM1" is the name of the world / game name in minecraft

"Save_Folder_Name": "DIM1" is the path/folder name where settings are found. you should be able to make this relative to other places on your system, but I haven't tried.

commented
{
  "IMPORTANT": "# Folder names are case sensitive if OS allows it. Beware invalid OS characters.",
  "FILE_VERSION": "1.0",
  "DefaultProfile": {
    "Save_Folder_Name": "DEFAULT",
    "Use_Universal_Entity_CFG": false,
    "Sort_Creature_By_Biome": true
  },
  "WorldProfiles": {
    "world": {
      "Save_Folder_Name": "world",
      "Use_Universal_Entity_CFG": false,
      "Sort_Creature_By_Biome": true
    },
    "test": {
      "Save_Folder_Name": "test",
      "Use_Universal_Entity_CFG": false,
      "Sort_Creature_By_Biome": true
    }
  }
}

Here is my config, world folder config files generates, but the test folder does not.
test world was created using Multiverse if that matters.

Also tried DIM1 and THE_END, still did not generate files for the ender world.

commented

Instead of using world I believe the mod needs to use DimensionManager.
net.minecraftforge.common.DimensionManager

All this would probably need to be changed in WorldSettings, and probably WolrdProperties.
Since this would take a bit of work, I wouldn't be surprised if your fine with the functionality that mod is currently in.

Take note: Although I have java experience, I don't have much Minecraft Modding/Forge experience and this is all from looking at your source code and Forges JavaDoc.

commented

Using

{
  "IMPORTANT": "# Folder names are case sensitive if OS allows it. Beware invalid OS characters.",
  "FILE_VERSION": "1.0",
  "DefaultProfile": {
    "Save_Folder_Name": "DEFAULT",
    "Use_Universal_Entity_CFG": false,
    "Sort_Creature_By_Biome": true
  },
  "WorldProfiles": {
    "WhatWorld2": {
      "Save_Folder_Name": "WhatWorld4",
      "Use_Universal_Entity_CFG": false,
      "Sort_Creature_By_Biome": true
    },
    "WhatWorld": {
      "Save_Folder_Name": "WhatWorld3",
      "Use_Universal_Entity_CFG": false,
      "Sort_Creature_By_Biome": true
    }
  }
}

Both WhatWorld4 and a WhatWorld3 folder are created. Each folder is only created if you actually load/login/join the world.

And what do you mean Also tried DIM1 and THE_END, still did not generate files for the ender world.?

commented

It works on single player for every new world created, but on a mutliplayer server, the structure of worlds is different, and it doesn't work for servers.

Root |
     |-World  | //Subfolder of root
              |- DIM1  //Subfolders of World
              |- CustomWorld1
              |- CustomWorld2

Only the core world config will be generated. All custom made worlds will not generate a config.
This is where net.minecraftforge.common.DimensionManager would have to be used I believe.
The way the mod is currently setup, is you can have custom spawns for each single player world, which doesn't really give the much functionality.

Edit: Nmv, the whole structure of your code is just to pick a single preset and use it globally. What I need is not possible unless a complete rewrite is done. Sorry for the wasted time.

commented

This is interesting. If each of the 'worlds' in multiverse setup as their own dimension, it would lend usefulness to dimension specific settings.

Something to look at in the future for sure.