actually save the generator settings to the worldinfo
This commit is contained in:
parent
4190d40a2b
commit
54b7ad7e85
@ -43,12 +43,8 @@ public class SettingsHelper {
|
||||
|
||||
public static CompoundNBT applyDefaults(CompoundNBT options, TerraSettings dest) {
|
||||
if (options.isEmpty()) {
|
||||
try (Reader reader = new BufferedReader(new FileReader(DEFAULTS_FILE))) {
|
||||
JsonElement json = new JsonParser().parse(reader);
|
||||
options = NBTHelper.fromJson(json);
|
||||
} catch (IOException ignored) {
|
||||
|
||||
}
|
||||
TerraSettings defaults = readDefaults();
|
||||
options = NBTHelper.serialize(defaults);
|
||||
}
|
||||
NBTHelper.deserialize(options, dest);
|
||||
return options;
|
||||
|
@ -34,6 +34,7 @@ import com.terraforged.mod.client.gui.page.SimplePage;
|
||||
import com.terraforged.mod.client.gui.page.SimplePreviewPage;
|
||||
import com.terraforged.mod.client.gui.page.WorldPage;
|
||||
import com.terraforged.mod.client.gui.preview.PreviewPage;
|
||||
import com.terraforged.mod.util.nbt.NBTHelper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.IGuiEventListener;
|
||||
import net.minecraft.client.gui.screen.CreateWorldScreen;
|
||||
@ -111,7 +112,7 @@ public class SettingsScreen extends OverlayScreen {
|
||||
for (Page page : pages) {
|
||||
page.save();
|
||||
}
|
||||
// parent.chunkProviderSettingsJson = NBTHelper.serializeCompact(settings);
|
||||
parent.chunkProviderSettingsJson = NBTHelper.serializeCompact(instance.settings);
|
||||
SettingsScreen.setSeed(parent, preview.getSeed());
|
||||
onClose();
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user