Updated everything
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
package com.seibel.lod.common;
|
||||
|
||||
import com.seibel.lod.common.wrappers.config.ConfigGui;
|
||||
import com.seibel.lod.common.wrappers.world.DimensionTypeWrapper;
|
||||
import com.seibel.lod.core.config.*;
|
||||
import com.seibel.lod.core.enums.config.*;
|
||||
import com.seibel.lod.core.enums.rendering.*;
|
||||
@@ -57,8 +56,11 @@ public class Config extends ConfigGui
|
||||
@ConfigAnnotations.ScreenEntry
|
||||
public static Client client;
|
||||
|
||||
// I know this option should be in Client
|
||||
// This is a hacky method to not show the button in the options screen but show it in the mod menu
|
||||
// Tough it is in client in the wrapper singleton
|
||||
@ConfigAnnotations.Entry
|
||||
public static boolean ShowButton = true;
|
||||
public static boolean optionsButton = true;
|
||||
|
||||
public static class Client
|
||||
{
|
||||
@@ -101,7 +103,6 @@ public class Config extends ConfigGui
|
||||
@ConfigAnnotations.Entry(minValue = 2, maxValue = 32)
|
||||
public static int horizontalScale = IQuality.HORIZONTAL_SCALE_MIN_DEFAULT_MAX.defaultValue;
|
||||
|
||||
@ConfigAnnotations.Category("client.graphics.quality")
|
||||
@ConfigAnnotations.Entry
|
||||
public static HorizontalQuality horizontalQuality = IQuality.HORIZONTAL_QUALITY_DEFAULT;
|
||||
}
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
package com.seibel.lod.common.clouds;
|
||||
|
||||
import com.mojang.blaze3d.platform.NativeImage;
|
||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.levelgen.WorldgenRandom;
|
||||
import net.minecraft.world.level.levelgen.synth.SimplexNoise;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
public class CloudTexture {
|
||||
|
||||
public List<PixelCoordinate> pixels = new LinkedList<PixelCoordinate>() {};
|
||||
|
||||
public SimplexNoise noise;
|
||||
public DynamicTexture cloudsTexture;
|
||||
public ResourceLocation resourceLocation;
|
||||
public double cloudiness;
|
||||
|
||||
public CloudTexture(ResourceLocation resourceLocation) {
|
||||
this.resourceLocation = resourceLocation;
|
||||
}
|
||||
|
||||
public void updateImage(long time) {
|
||||
Random random = new Random(time);
|
||||
|
||||
// Comment to clear sky
|
||||
SkyCoverGenerators.cloudySkyUpdate(random, this.noise, this.cloudsTexture.getPixels(), pixels, this.cloudiness);
|
||||
|
||||
}
|
||||
|
||||
public void updatePixels() {
|
||||
pixels.removeIf(pixel -> !fadePixel(Objects.requireNonNull(this.cloudsTexture.getPixels()), pixel.posX, pixel.posZ, pixel.fading));
|
||||
|
||||
this.cloudsTexture.upload();
|
||||
}
|
||||
|
||||
public boolean fadePixel(NativeImage image, int x, int z, boolean fading) {
|
||||
int color = image.getPixelRGBA(x, z);
|
||||
int alpha = (color >> 24) & 0xFF;
|
||||
//int alpha = image.getLuminanceOrAlpha(x, z) + 128;
|
||||
|
||||
if (fading) alpha -= 5;
|
||||
else alpha += 5;
|
||||
|
||||
int newColor = alpha << 24 | 255 << 16 | 255 << 8 | 255;
|
||||
//int newColor = NativeImage.combine(alpha, 255, 255, 255);
|
||||
image.setPixelRGBA(x, z, newColor);
|
||||
|
||||
if (alpha <= 0) {
|
||||
image.setPixelRGBA(x, z, 0);
|
||||
return false;
|
||||
} else return alpha < 255;
|
||||
}
|
||||
|
||||
public void setTexture(DynamicTexture texture) {
|
||||
this.cloudsTexture = texture;
|
||||
}
|
||||
|
||||
public void initNoise(Random random) {
|
||||
this.noise = new SimplexNoise(new WorldgenRandom(random.nextLong()));
|
||||
// this.noise = new SimplexNoise(new LegacyRandomSource(random.nextLong()));
|
||||
}
|
||||
|
||||
public DynamicTexture getNativeImage() {
|
||||
NativeImage image = new NativeImage(256, 256, false);
|
||||
|
||||
Random random = new Random();
|
||||
|
||||
this.cloudiness = random.nextDouble();
|
||||
|
||||
// Switch these out to clear sky
|
||||
// Never comment both or something weird will happen
|
||||
// SkyCoverGenerators.clearSkyGenerator(this.noise, image, this.cloudiness);
|
||||
SkyCoverGenerators.cloudySkyGenerator(this.noise, image, this.cloudiness);
|
||||
|
||||
return new DynamicTexture(image);
|
||||
}
|
||||
|
||||
public static class PixelCoordinate {
|
||||
public int posX;
|
||||
public int posZ;
|
||||
public boolean fading;
|
||||
|
||||
public PixelCoordinate(int posX, int posZ, boolean fading) {
|
||||
this.posX = posX;
|
||||
this.posZ = posZ;
|
||||
this.fading = fading;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package com.seibel.lod.common.clouds;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public final class NoiseCloudHandler {
|
||||
|
||||
public static List<CloudTexture> cloudTextures = new LinkedList<CloudTexture>() {};
|
||||
|
||||
private static long cloudIdx = -1;
|
||||
private static long timeIdx = -1;
|
||||
private static long lastTime = -1;
|
||||
|
||||
public static void update() {
|
||||
Minecraft client = Minecraft.getInstance();
|
||||
assert client.level != null;
|
||||
long time = client.level.getGameTime();
|
||||
if (time > lastTime) {
|
||||
lastTime = time;
|
||||
updateSkyCover(time);
|
||||
|
||||
long update = time / 600;
|
||||
if (update > timeIdx) {
|
||||
timeIdx = update;
|
||||
for (CloudTexture cloudTexture : cloudTextures) {
|
||||
if (cloudTexture.cloudsTexture.getPixels() != null) {
|
||||
cloudTexture.updateImage(time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (CloudTexture cloudTexture : cloudTextures) {
|
||||
if (cloudTexture.cloudsTexture.getPixels() != null) {
|
||||
cloudTexture.updatePixels();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void updateSkyCover(long time) {
|
||||
long idx = time / 12000;
|
||||
|
||||
if (idx > cloudIdx) {
|
||||
cloudIdx = idx;
|
||||
}
|
||||
}
|
||||
|
||||
public static void initCloudTextures(ResourceLocation defaultCloud) {
|
||||
CloudTexture defaultCloudTexture = new CloudTexture(defaultCloud);
|
||||
|
||||
cloudTextures.add(defaultCloudTexture);
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.seibel.lod.common.clouds;
|
||||
|
||||
import com.mojang.blaze3d.platform.NativeImage;
|
||||
import net.minecraft.world.level.levelgen.synth.SimplexNoise;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class SkyCoverGenerators {
|
||||
|
||||
public static final int COLOR = NativeImage.combine(255, 255, 255, 255);
|
||||
|
||||
// Where the generator for clouds could be made
|
||||
// TODO: Try to implement this https://www.reddit.com/r/Minecraft/comments/e7xol/this_is_how_clouds_should_work_gif_simulation/
|
||||
|
||||
public static void clearSkyGenerator(SimplexNoise noiseSampler, NativeImage image, double cloudiness) {
|
||||
for (int x = 0; x < 256; x++) {
|
||||
for (int z = 0; z < 256; z++) {
|
||||
if (noiseSampler.getValue(x / 16.0, 0, z / 16.0) * 2.5 < cloudiness || image.getPixelRGBA(x, z) != 0) {
|
||||
image.setPixelRGBA(x, z, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void cloudySkyGenerator(SimplexNoise noiseSampler, NativeImage image, double cloudiness) {
|
||||
for (int x = 0; x < 256; x++) {
|
||||
for (int z = 0; z < 256; z++) {
|
||||
image.setPixelRGBA(x, z, COLOR);
|
||||
if (noiseSampler.getValue(x / 16.0, 0, z / 16.0) * 2.5 >= cloudiness || image.getPixelRGBA(x, z) != 0) {
|
||||
if ((int) (noiseSampler.getValue(x / 16.0, 0, z / 16.0) * 2.5) != 0) {
|
||||
image.setPixelRGBA(x, z, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void cloudySkyUpdate(Random random, SimplexNoise noiseSampler, NativeImage image, List<CloudTexture.PixelCoordinate> pixels, double cloudiness) {
|
||||
int count = random.nextInt(4000) + 4000;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
int x = random.nextInt(256);
|
||||
int z = random.nextInt(256);
|
||||
|
||||
if (!updatingPixel(x, z, pixels)) {
|
||||
if (noiseSampler.getValue(x / 16.0, 0, z / 16.0) * 2.5 < cloudiness && image.getPixelRGBA(x, z) == 0) {
|
||||
if ((int) (noiseSampler.getValue(x / 16.0, 0, z / 16.0) * 2.5) != 0) {
|
||||
pixels.add(new CloudTexture.PixelCoordinate(x, z, true));
|
||||
} else {
|
||||
pixels.add(new CloudTexture.PixelCoordinate(x, z, false));
|
||||
}
|
||||
} else {
|
||||
pixels.add(new CloudTexture.PixelCoordinate(x, z, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean updatingPixel(int x, int z, List<CloudTexture.PixelCoordinate> pixels) {
|
||||
for (CloudTexture.PixelCoordinate pixel : pixels) {
|
||||
if (pixel.posX == x && pixel.posZ == z) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
||||
* Credits to Motschen
|
||||
*
|
||||
* @author coolGi2007
|
||||
* @version 12-28-2021
|
||||
* @version 1-6-2022
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public abstract class ConfigGui
|
||||
@@ -68,6 +68,7 @@ public abstract class ConfigGui
|
||||
/*
|
||||
TODO list
|
||||
|
||||
Fix floats not working
|
||||
Make a wiki
|
||||
Make it so you can enable and disable buttons from showing
|
||||
Make min and max not final
|
||||
@@ -85,6 +86,7 @@ public abstract class ConfigGui
|
||||
private static final Pattern DECIMAL_ONLY_REGEX = Pattern.compile("-?([\\d]+\\.?[\\d]*|[\\d]*\\.?[\\d]+|\\.)");
|
||||
|
||||
private static final List<EntryInfo> entries = new ArrayList<>();
|
||||
public static final Map<String,EntryInfo> entryMap = new HashMap<>();
|
||||
|
||||
// Change these to your own mod
|
||||
private static final String MOD_NAME = ModInfo.NAME; // For file saving and identifying
|
||||
@@ -107,7 +109,7 @@ public abstract class ConfigGui
|
||||
public static final int ResetButtonWidth = 40;
|
||||
}
|
||||
|
||||
protected static class EntryInfo<T>
|
||||
public static class EntryInfo<T>
|
||||
{
|
||||
Field field;
|
||||
Object widget;
|
||||
@@ -169,6 +171,7 @@ public abstract class ConfigGui
|
||||
|
||||
if (field.isAnnotationPresent(ConfigAnnotations.Entry.class))
|
||||
{
|
||||
entryMap.put((!category.isEmpty() ? category + "." : "") + field.getName(), info);
|
||||
info.varClass = field.getType();
|
||||
try
|
||||
{
|
||||
@@ -324,6 +327,7 @@ public abstract class ConfigGui
|
||||
|
||||
for (EntryInfo info : entries) {
|
||||
if (info.field.isAnnotationPresent(ConfigAnnotations.Entry.class)) {
|
||||
// editSingleOption.saveOption(info);
|
||||
config.set((info.category.isEmpty() ? "" : info.category + ".") + info.field.getName(), info.value);
|
||||
}
|
||||
}
|
||||
@@ -352,6 +356,7 @@ public abstract class ConfigGui
|
||||
// Puts everything into its variable
|
||||
for (EntryInfo info : entries) {
|
||||
if (info.field.isAnnotationPresent(ConfigAnnotations.Entry.class)) {
|
||||
// editSingleOption.loadOption(info);
|
||||
String itemPath = (info.category.isEmpty() ? "" : info.category + ".") + info.field.getName();
|
||||
if (config.contains(itemPath)) {
|
||||
if (info.field.getType().isEnum())
|
||||
@@ -363,13 +368,59 @@ public abstract class ConfigGui
|
||||
|
||||
try {
|
||||
info.field.set(null, info.value);
|
||||
} catch (IllegalAccessException ignored) {}
|
||||
} catch (IllegalAccessException ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config.close();
|
||||
}
|
||||
|
||||
public static class editSingleOption {
|
||||
public static EntryInfo getEntry(String name) {
|
||||
return entryMap.get(name);
|
||||
}
|
||||
|
||||
public static void saveOption(String name) {
|
||||
saveOption(entryMap.get(name));
|
||||
}
|
||||
|
||||
public static void saveOption(EntryInfo info) {
|
||||
CommentedFileConfig config = CommentedFileConfig.builder(configFilePath.toFile()).build();
|
||||
config.load();
|
||||
|
||||
config.set((info.category.isEmpty() ? "" : info.category + ".") + info.field.getName(), info.value);
|
||||
|
||||
config.save();
|
||||
config.close();
|
||||
}
|
||||
|
||||
public static void loadOption(String name) {
|
||||
loadOption(entryMap.get(name));
|
||||
}
|
||||
|
||||
public static void loadOption(EntryInfo info) {
|
||||
CommentedFileConfig config = CommentedFileConfig.builder(configFilePath.toFile()).autosave().build();
|
||||
config.load();
|
||||
|
||||
String itemPath = (info.category.isEmpty() ? "" : info.category + ".") + info.field.getName();
|
||||
if (config.contains(itemPath)) {
|
||||
if (info.field.getType().isEnum())
|
||||
info.value = config.getEnum(itemPath, info.varClass);
|
||||
else
|
||||
info.value = config.get(itemPath);
|
||||
} else
|
||||
config.set(itemPath, info.value);
|
||||
|
||||
try {
|
||||
info.field.set(null, info.value);
|
||||
} catch (IllegalAccessException ignored) {
|
||||
}
|
||||
|
||||
config.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static Screen getScreen(Screen parent, String category)
|
||||
{
|
||||
|
||||
+73
-31
@@ -50,6 +50,18 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean getOptionsButton()
|
||||
{
|
||||
return Config.optionsButton;
|
||||
}
|
||||
@Override
|
||||
public void setOptionsButton(boolean newOptionsButton)
|
||||
{
|
||||
ConfigGui.editSingleOption.getEntry("optionsButton").value = newOptionsButton;
|
||||
ConfigGui.editSingleOption.saveOption("optionsButton");
|
||||
}
|
||||
|
||||
|
||||
//================//
|
||||
// Client Configs //
|
||||
@@ -118,7 +130,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setDrawResolution(HorizontalResolution newHorizontalResolution)
|
||||
{
|
||||
Config.Client.Graphics.Quality.drawResolution = newHorizontalResolution;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.quality.drawResolution").value = newHorizontalResolution;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.quality.drawResolution");
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +143,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setLodChunkRenderDistance(int newLodChunkRenderDistance)
|
||||
{
|
||||
Config.Client.Graphics.Quality.lodChunkRenderDistance = newLodChunkRenderDistance;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.quality.lodChunkRenderDistance").value = newLodChunkRenderDistance;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.quality.lodChunkRenderDistance");
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +156,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setVerticalQuality(VerticalQuality newVerticalQuality)
|
||||
{
|
||||
Config.Client.Graphics.Quality.verticalQuality = newVerticalQuality;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.quality.verticalQuality").value = newVerticalQuality;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.quality.verticalQuality");
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +169,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setHorizontalScale(int newHorizontalScale)
|
||||
{
|
||||
Config.Client.Graphics.Quality.horizontalScale = newHorizontalScale;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.quality.horizontalScale").value = newHorizontalScale;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.quality.horizontalScale");
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +182,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setHorizontalQuality(HorizontalQuality newHorizontalQuality)
|
||||
{
|
||||
Config.Client.Graphics.Quality.horizontalQuality = newHorizontalQuality;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.quality.horizontalQuality").value = newHorizontalQuality;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.quality.horizontalQuality");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +198,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setFogDistance(FogDistance newFogDistance)
|
||||
{
|
||||
Config.Client.Graphics.FogQuality.fogDistance = newFogDistance;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.fogQuality.fogDistance").value = newFogDistance;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.fogQuality.fogDistance");
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +212,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setFogDrawMode(FogDrawMode setFogDrawMode)
|
||||
{
|
||||
Config.Client.Graphics.FogQuality.fogDrawMode = setFogDrawMode;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.fogQuality.fogDrawMode").value = setFogDrawMode;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.fogQuality.fogDrawMode");
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +226,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setFogColorMode(FogColorMode newFogColorMode)
|
||||
{
|
||||
Config.Client.Graphics.FogQuality.fogColorMode = newFogColorMode;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.fogQuality.fogColorMode").value = newFogColorMode;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.fogQuality.fogColorMode");
|
||||
}
|
||||
|
||||
|
||||
@@ -219,7 +239,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setDisableVanillaFog(boolean newDisableVanillaFog)
|
||||
{
|
||||
Config.Client.Graphics.FogQuality.disableVanillaFog = newDisableVanillaFog;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.fogQuality.disableVanillaFog").value = newDisableVanillaFog;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.fogQuality.disableVanillaFog");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +255,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setCustomClouds(boolean newCustomClouds)
|
||||
{
|
||||
Config.Client.Graphics.CloudQuality.customClouds = newCustomClouds;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.cloudQuality.customClouds").value = newCustomClouds;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.cloudQuality.customClouds");
|
||||
}
|
||||
|
||||
|
||||
@@ -246,7 +268,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setFabulousClouds(boolean newFabulousClouds)
|
||||
{
|
||||
Config.Client.Graphics.CloudQuality.fabulousClouds = newFabulousClouds;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.cloudQuality.fabulousClouds").value = newFabulousClouds;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.cloudQuality.fabulousClouds");
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +281,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setExtendClouds(boolean newExtendClouds)
|
||||
{
|
||||
Config.Client.Graphics.CloudQuality.extendClouds = newExtendClouds;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.cloudQuality.extendClouds").value = newExtendClouds;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.cloudQuality.extendClouds");
|
||||
}
|
||||
|
||||
|
||||
@@ -270,7 +294,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setCloudHeight(double newCloudHeight)
|
||||
{
|
||||
Config.Client.Graphics.CloudQuality.cloudHeight = newCloudHeight;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.cloudQuality.cloudHeight").value = newCloudHeight;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.cloudQuality.cloudHeight");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +310,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setDisableDirectionalCulling(boolean newDisableDirectionalCulling)
|
||||
{
|
||||
Config.Client.Graphics.AdvancedGraphics.disableDirectionalCulling = newDisableDirectionalCulling;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.advancedGraphics.disableDirectionalCulling").value = newDisableDirectionalCulling;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.disableDirectionalCulling");
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +323,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setAlwaysDrawAtMaxQuality(boolean newAlwaysDrawAtMaxQuality)
|
||||
{
|
||||
Config.Client.Graphics.AdvancedGraphics.alwaysDrawAtMaxQuality = newAlwaysDrawAtMaxQuality;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.advancedGraphics.alwaysDrawAtMaxQuality").value = newAlwaysDrawAtMaxQuality;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.alwaysDrawAtMaxQuality");
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +336,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setVanillaOverdraw(VanillaOverdraw newVanillaOverdraw)
|
||||
{
|
||||
Config.Client.Graphics.AdvancedGraphics.vanillaOverdraw = newVanillaOverdraw;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.advancedGraphics.vanillaOverdraw").value = newVanillaOverdraw;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.vanillaOverdraw");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -318,9 +346,10 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
return Config.Client.Graphics.AdvancedGraphics.backsideCullingRange;
|
||||
}
|
||||
@Override
|
||||
public void setBacksideCullingRange(int backsideCullingRange)
|
||||
public void setBacksideCullingRange(int newBacksideCullingRange)
|
||||
{
|
||||
Config.Client.Graphics.AdvancedGraphics.backsideCullingRange = backsideCullingRange;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.advancedGraphics.backsideCullingRange").value = newBacksideCullingRange;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.backsideCullingRange");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -331,7 +360,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setUseExtendedNearClipPlane(boolean newUseExtendedNearClipPlane)
|
||||
{
|
||||
Config.Client.Graphics.AdvancedGraphics.useExtendedNearClipPlane = newUseExtendedNearClipPlane;
|
||||
ConfigGui.editSingleOption.getEntry("client.graphics.advancedGraphics.useExtendedNearClipPlane").value = newUseExtendedNearClipPlane;
|
||||
ConfigGui.editSingleOption.saveOption("client.graphics.advancedGraphics.useExtendedNearClipPlane");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,7 +382,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setGenerationPriority(GenerationPriority newGenerationPriority)
|
||||
{
|
||||
Config.Client.WorldGenerator.generationPriority = newGenerationPriority;
|
||||
ConfigGui.editSingleOption.getEntry("client.worldGenerator.generationPriority").value = newGenerationPriority;
|
||||
ConfigGui.editSingleOption.saveOption("client.worldGenerator.generationPriority");
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +395,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setDistanceGenerationMode(DistanceGenerationMode newDistanceGenerationMode)
|
||||
{
|
||||
Config.Client.WorldGenerator.distanceGenerationMode = newDistanceGenerationMode;
|
||||
ConfigGui.editSingleOption.getEntry("client.worldGenerator.distanceGenerationMode").value = newDistanceGenerationMode;
|
||||
ConfigGui.editSingleOption.saveOption("client.worldGenerator.distanceGenerationMode");
|
||||
}
|
||||
|
||||
|
||||
@@ -376,7 +408,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setAllowUnstableFeatureGeneration(boolean newAllowUnstableFeatureGeneration)
|
||||
{
|
||||
Config.Client.WorldGenerator.allowUnstableFeatureGeneration = newAllowUnstableFeatureGeneration;
|
||||
ConfigGui.editSingleOption.getEntry("client.worldGenerator.allowUnstableFeatureGeneration").value = newAllowUnstableFeatureGeneration;
|
||||
ConfigGui.editSingleOption.saveOption("client.worldGenerator.allowUnstableFeatureGeneration");
|
||||
}
|
||||
|
||||
|
||||
@@ -388,7 +421,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setBlockToAvoid(BlocksToAvoid newBlockToAvoid)
|
||||
{
|
||||
Config.Client.WorldGenerator.blocksToAvoid = newBlockToAvoid;
|
||||
ConfigGui.editSingleOption.getEntry("client.worldGenerator.blocksToAvoid").value = newBlockToAvoid;
|
||||
ConfigGui.editSingleOption.saveOption("client.worldGenerator.blocksToAvoid");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,7 +477,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setNumberOfWorldGenerationThreads(int newNumberOfWorldGenerationThreads)
|
||||
{
|
||||
Config.Client.Advanced.Threading.numberOfWorldGenerationThreads = newNumberOfWorldGenerationThreads;
|
||||
ConfigGui.editSingleOption.getEntry("client.advanced.threading.numberOfWorldGenerationThreads").value = newNumberOfWorldGenerationThreads;
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.threading.numberOfWorldGenerationThreads");
|
||||
}
|
||||
|
||||
|
||||
@@ -455,7 +490,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setNumberOfBufferBuilderThreads(int newNumberOfWorldBuilderThreads)
|
||||
{
|
||||
Config.Client.Advanced.Threading.numberOfBufferBuilderThreads = newNumberOfWorldBuilderThreads;
|
||||
ConfigGui.editSingleOption.getEntry("client.advanced.threading.numberOfBufferBuilderThreads").value = newNumberOfWorldBuilderThreads;
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.threading.numberOfBufferBuilderThreads");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,7 +511,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setDrawLods(boolean newDrawLods)
|
||||
{
|
||||
Config.Client.Advanced.Debugging.drawLods = newDrawLods;
|
||||
ConfigGui.editSingleOption.getEntry("client.advanced.debugging.drawLods").value = newDrawLods;
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.debugging.drawLods");
|
||||
}
|
||||
|
||||
|
||||
@@ -487,7 +524,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setDebugMode(DebugMode newDebugMode)
|
||||
{
|
||||
Config.Client.Advanced.Debugging.debugMode = newDebugMode;
|
||||
ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugMode").value = newDebugMode;
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugMode");
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +537,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setDebugKeybindingsEnabled(boolean newEnableDebugKeybindings)
|
||||
{
|
||||
Config.Client.Advanced.Debugging.enableDebugKeybindings = newEnableDebugKeybindings;
|
||||
ConfigGui.editSingleOption.getEntry("client.advanced.debugging.enableDebugKeybindings").value = newEnableDebugKeybindings;
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.debugging.enableDebugKeybindings");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,7 +554,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setGpuUploadMethod(GpuUploadMethod newDisableVanillaFog)
|
||||
{
|
||||
Config.Client.Advanced.Buffers.gpuUploadMethod = newDisableVanillaFog;
|
||||
ConfigGui.editSingleOption.getEntry("client.advanced.buffers.gpuUploadMethod").value = newDisableVanillaFog;
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.buffers.gpuUploadMethod");
|
||||
}
|
||||
|
||||
|
||||
@@ -526,7 +566,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
}
|
||||
@Override
|
||||
public void setGpuUploadPerMegabyteInMilliseconds(int newMilliseconds) {
|
||||
Config.Client.Advanced.Buffers.gpuUploadPerMegabyteInMilliseconds = newMilliseconds;
|
||||
ConfigGui.editSingleOption.getEntry("client.advanced.buffers.gpuUploadPerMegabyteInMilliseconds").value = newMilliseconds;
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.buffers.gpuUploadPerMegabyteInMilliseconds");
|
||||
}
|
||||
|
||||
|
||||
@@ -538,7 +579,8 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
@Override
|
||||
public void setRebuildTimes(BufferRebuildTimes newBufferRebuildTimes)
|
||||
{
|
||||
Config.Client.Advanced.Buffers.rebuildTimes = newBufferRebuildTimes;
|
||||
ConfigGui.editSingleOption.getEntry("client.advanced.buffers.newBufferRebuildTimes").value = newBufferRebuildTimes;
|
||||
ConfigGui.editSingleOption.saveOption("client.advanced.buffers.newBufferRebuildTimes");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user