use of blue.endless.jankson.JsonObject in project canvas by vram-guild.
the class Configurator method loadConfig.
private static void loadConfig() {
ConfigData config = new ConfigData();
try {
final JsonObject configJson = JANKSON.load(configFile);
final String regularized = configJson.toJson(false, false, 0);
config = GSON.fromJson(regularized, ConfigData.class);
} catch (final Exception e) {
e.printStackTrace();
CanvasMod.LOG.error("Unable to load config. Using default values.");
}
itemShaderRender = config.itemShaderRender;
hardcoreDarkness = config.hardcoreDarkness;
subtleFog = config.subtleFog;
shaderDebug = config.shaderDebug;
// enableCompactGPUFormats = config.enableCompactGPUFormats;
minChunkBudgetNanos = config.minChunkBudgetNanos;
maxLightmapDelayFrames = config.maxLightmapDelayFrames;
moreLightmap = config.moreLightmap;
hdLightmaps = config.hdLightmaps;
lightmapNoise = config.lightmapNoise;
diffuseShadingMode = config.diffuseShadingMode;
lightSmoothing = config.lightSmoothing;
aoShadingMode = config.aoShadingMode;
fastChunkOcclusion = config.fastChunkOcclusion;
batchedChunkRender = config.batchedChunkRender;
// disableVanillaChunkMatrix = config.disableVanillaChunkMatrix;
preventDepthFighting = config.preventDepthFighting;
clampExteriorVertices = config.clampExteriorVertices;
// padTranslucentFormats = config.padTranslucentFormats;
fixLuminousBlockShading = config.fixLuminousBlockShading;
lightmapDebug = config.lightmapDebug;
conciseErrors = config.conciseErrors;
logMachineInfo = config.logMachineInfo;
logGlStateChanges = config.logGlStateChanges;
debugNativeMemoryAllocation = config.debugNativeMemoryAllocation;
safeNativeMemoryAllocation = config.safeNativeMemoryAllocation;
}
Aggregations