ckhgame / VillageBox

A village mod of minecraft
http://minecraft.curseforge.com/projects/village-box
Other
9 stars 4 forks source link

Cannot change or add Villagebox villager trades #20

Open jawsawn opened 7 years ago

jawsawn commented 7 years ago

I think I'm supposed to do that? Why can't I do that?

jawsawn commented 7 years ago

The config keeps reseting itself, i think it doesn't work as a configurable config.

ckhgame commented 7 years ago

I tested again just in case and it's working, I tried twice but both time the existed VillageBoxData.json didn't be replaced with the default one.

The code doesn't allow it to happen as well

public static void LoadData(File dir)
{
    File file = new File(dir, jsonDataFileName);
    if(file.exists())
    {
        try {
            loadDataFromFile(file);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    else
    {
        try {
            createDefaultDataFile(file);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }       
}
ckhgame commented 7 years ago

Do you have other mods installed? I guess maybe something cleans up the config folder every time MC launches

jawsawn commented 7 years ago

I have FTBU and I do /reload and /reload_client commands.

Also have Crafttweaker if it matters, using the Skyexchange 2 Lite pack,

I just love this mod, it even fits with projecte in a skyblock pack.

ckhgame commented 7 years ago

Thank you! I'm so glad you love our mod :D I don't see these matter.. Did you change the VillageBoxData.json on both client and server? VillageBoxData.json currently is not syncing across server and client(will be added in next version)..so you have to change the file on one side, and then manually copy it to another.

jawsawn commented 7 years ago

I also tried it clientside only. But how do I make sure the changes apply? Restart the client or does /reload works from ftbu?

jawsawn commented 7 years ago

And I have tried with only jei and villagebox, I changed the current values and added a different trade.

And when i closed the client and re opened it nothing changed, looked at the configs file and the things i have changed has reset to original values, but the lines I've added still remain. But no effect to the game.

ckhgame commented 7 years ago

you mean the json file remains changed but it doesn't affect the game? It sounds like the game is loading a different file rather than the one you modified. Do you have more than one minecraft installed on the same machine?

jawsawn commented 7 years ago

Of course I do, I use curse with many profiles if its the thing you mean.