
Dimension Specific Overrides for Settings
Crudedragos opened this issue ยท 10 comments
Change Structure to:
/worldsettings/default/EntityHandlers/
/SpawnListEntries/
/BiomeGroups.cfg
/CreatureType.cfg
/...
/dim1 /EntityHandlers/
/SpawnListEntries/
/BiomeGroups.cfg
/CreatureType.cfg
/...
/dim2 /...
Where dim1 and dim2 are settings which override the default settings for dimensions 1 and 2 respectively.
Issue: Dimensions, at least in Forge, are only associated with integer IDs and not names. May not be user friendly.
Would it be possible to have an option to print a list of dim names and corresponding IDs to config file? Option defaults to false after first run. Can be reset to true to refresh the list on next run, with the option defaulting back to false on completion.
Then all that's needed is a short # statement letting users know to check dim_ids.cfg for listing. dim_ids.cfg could have its own short # statement, ie. "set to "true" to update the dimensions list. Defaults back to false."
I don't think there is a name to map to. You could query the provider but it just queries the world which wouldn't work for myltiverse... I think.
As of v0.16 there is a dimension command to fetch the I'd of the current dimension.
in that case, it's not user un-friendly anyway.
Unless.. are those dim folders in the same folder as "default"? So lets say I have 2 separate worlds with different setups for each. One world called "default" and the other called "alt". I want Ghasts to spawn in the Nether in high numbers in the "alt" world only. For this to work, the dim folders would have to be subfolders of the world folders
Yes. Overrides will be in their own folders inside the the current settings folder. They would contain all the usually world settings (handlers entity groups etc)
My 2 cents: even if you can only get a string and the dim list is impossible, it's still quite self-explanatory.
Tested, it does return the names of the dimension.
[23:41:21 INFO]: [com.example.examplemod.ExampleMod:init:25]: Nether
[23:41:21 INFO]: [com.example.examplemod.ExampleMod:init:26]: The End
[23:41:21 INFO]: [com.example.examplemod.ExampleMod:init:27]: Overworld
That does return the name of the provider, the Provider is not really the 'dimension' anymore than a Biome is. It can, and likely is, resused to recreate overworld/nether/end such as Mystcraft or Multiverse. Even if Mystcraft has its own provider (which it likely does, I know it wraps the biomes in its own) there is no guarantee that provider isn't reused (i.e. 2 Mystcraft ages/dimensions with similar setup) or has returns the same name as vanilla ones. Same goes for multiverse.
Unlike biome names (which can have the same issue) there is much more incentive to reuse providers. Particulary since most of the real magic occurs inside WorldType/ChunkManager/IChunkProvider.
[00:32:41 INFO]: Dimension ID:-37 -- Dimension Name: Spirit World
[00:32:41 INFO]: Dimension ID:-38 -- Dimension Name: Torment
[00:32:41 INFO]: Dimension ID:-19 -- Dimension Name: Bedrock
[00:32:41 INFO]: Dimension ID:7 -- Dimension Name: Twilight Forest
[00:32:41 INFO]: Dimension ID:-1 -- Dimension Name: Nether
[00:32:41 INFO]: Dimension ID:4 -- Dimension Name: Overworld
[00:32:41 INFO]: Dimension ID:2 -- Dimension Name: Overworld
[00:32:41 INFO]: Dimension ID:1 -- Dimension Name: The End
[00:32:41 INFO]: Dimension ID:0 -- Dimension Name: Overworld
Seems like all Multiverse is listed as overworld(4 being the only one created on this test server) for each dimension, your probably right about mystcraft being the same with its own provider.
You can use WorldProvider to get the dimension name by what I see in the JavaDoc.
DimensionManager.getProvider(Int dim).getDimensionName()
Although unsure if this just returns only the ID or the name associated with it by the mod (or minecraft), but I believe its the name due to it returns a string. Although it may only return the world name like you said in your previous post.
I'll test and see if it works how I think it does in a bit here.