maruohon / justenoughdimensions

A simple Minecraft mod to register custom dimensions to the game
GNU General Public License v3.0
12 stars 7 forks source link

can't change dimension id with JSON #54

Closed PercyJames closed 3 years ago

PercyJames commented 3 years ago

I'm mingcming from curseforge. i have a new pastebin. it's the result of correcting until it's correct. i couldn't even do that. the comma at the end is the result of the corrections. i don't know what to do.

https://pastebin.com/Q699U24Q

maruohon commented 3 years ago

All braces/brackets must come in pairs. A pair of curly braces { } makes an object, and an object is basically a number of key value pairs, in the form "key": "value", "something": 123, so all keys must be double quoted strings, a key is followed by a colon and then the value, and if there are more than one key-value pair then they are separated by commas. Square brackets [ ] make a list, and a list consists of just values, without names, for example in the dimension config dimensions is an array ([ ]) of objects ({ }), one object per dimension, which then holds a number of key-value pairs.

I would recommend for example https://jsonlint.com/ to check for errors.

And here is your config corrected for JSON syntax errors (and not using overlapping IDs):

{
    "dimensions":
    [
        {
            "dim": 3,
            "unregister": true
        },
        {
            "dim": 456,
            "dimensiontype": {
                "existing_dimensiontype": "eyedimension"
            }
        },
        {
            "dim": 789,
            "dimensiontype": {
                "id": 789,
                "name": "eyedimension",
                "worldprovider": "mod.mcreator.mcreator_eyedimension.WorldProviderMod",
                "require_exact_match": true
            }
        }
    ]
}
PercyJames commented 3 years ago

let's hope this finally freakin works! thanks for i the info. i think i'll need it for future id writing.

PercyJames commented 3 years ago

i don't even know anymore. my file is a JSON file, it's in UTF8, and i copied your code directly into it but it doesn't work.

and it still says "Unable to load world for dimension for (insert id here)"

i'm starting to think it's impossible.

maruohon commented 3 years ago

Then it might just be those mcreator mods and their dimensions being somehow unusable. I would need to try it out, but I don't currently have really any time to look into it.

PercyJames commented 3 years ago

ok

PercyJames commented 3 years ago

wait, do it need to name the config anything specific?

maruohon commented 3 years ago

Yes, the config file needs to be at .minecraft/config/justenoughdimensions/dimension.json (in single player, on a server obviously similarly in the server's config directory).

PercyJames commented 3 years ago

does the last part mean i name the config dimension.json?

maruohon commented 3 years ago

Yes.

PercyJames commented 3 years ago

ok. i just needed clarification

PercyJames commented 3 years ago

let's hope this works

PercyJames commented 3 years ago

ok so, something strange is happening. when i load minecraft it works. but when i try to load a world, it only works every other attempt

edit: load a new world

edit 2: also, for somehow it didn't work

PercyJames commented 3 years ago

i think i might be a moron. i downloaded a dev version of JED

maruohon commented 3 years ago

You want to be using the latest 1.6.0-dev version. The 1.5.5 version is super old and lacking like half of the functionality.

PercyJames commented 3 years ago

no version even works at this point. i think i quit.

maruohon commented 3 years ago

This config works for me to register the eye dimension as dimensions 456 and 789:

{
    "dimensions":
    [

        {
            "dim": 456,
            "dimensiontype": {
                "existing_dimensiontype": "eyedimension"
            }
        },
        {
            "dim": 789,
            "dimensiontype": {
                "id": 789,
                "name": "eyedimension",
                "worldprovider": "mod.mcreator.mcreator_eyedimension$WorldProviderMod",
                "require_exact_match": true
            }
        }
    ]
}

(notice the one character difference in the WorldProvider name, $ instead of ., since this is what /jed debug was outputting in the original dimension).

However this doesn't help you with the problem that these dimension mods all try to register their dimension as dimension 3 during the game launch, and there is no config file to change it. JED can't resolve those conflicts that already happen during game launch. MCreator mods are often very low quality and problematic, and the lack of configs is a problem here.

PercyJames commented 3 years ago

ah. i was trying to prevent the conflict from happening in the first place..

PercyJames commented 3 years ago

thanks for the help anyway