mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-26 02:29:14 +00:00
Simplify settings
This commit is contained in:
@@ -36,7 +36,6 @@ public class IrisSettings {
|
||||
public int configurationVersion = 3;
|
||||
private IrisSettingsCache cache = new IrisSettingsCache();
|
||||
private IrisSettingsConcurrency concurrency = new IrisSettingsConcurrency();
|
||||
private IrisSettingsParallax parallax = new IrisSettingsParallax();
|
||||
private IrisSettingsGeneral general = new IrisSettingsGeneral();
|
||||
private IrisSettingsGUI gui = new IrisSettingsGUI();
|
||||
private IrisSettingsGenerator generator = new IrisSettingsGenerator();
|
||||
@@ -116,10 +115,6 @@ public class IrisSettings {
|
||||
return getGui().isUseServerLaunchedGuis();
|
||||
}
|
||||
|
||||
public long getParallaxRegionEvictionMS() {
|
||||
return getParallax().getParallaxRegionEvictionMS();
|
||||
}
|
||||
|
||||
public void forceSave() {
|
||||
File s = Iris.instance.getDataFile("settings.json");
|
||||
|
||||
@@ -139,21 +134,14 @@ public class IrisSettings {
|
||||
@Data
|
||||
public static class IrisSettingsConcurrency {
|
||||
public int parallelism = -1;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsParallax {
|
||||
public int parallaxRegionEvictionMS = 15000;
|
||||
public int parallaxChunkEvictionMS = 5000;
|
||||
public int parallaxEvictionMS = 10000;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsGeneral {
|
||||
public boolean commandSounds = true;
|
||||
public boolean debug = false;
|
||||
public boolean ignoreWorldEdit = false;
|
||||
public boolean disableNMS = false;
|
||||
public boolean keepProductionOnReload = false;
|
||||
public boolean pluginMetrics = true;
|
||||
public boolean splashLogoStartup = true;
|
||||
public boolean autoStartDefaultStudio = false;
|
||||
@@ -165,7 +153,7 @@ public class IrisSettings {
|
||||
public int spinb = 8;
|
||||
|
||||
public boolean canUseCustomColors(VolmitSender volmitSender) {
|
||||
return (volmitSender.isPlayer() && useCustomColorsIngame) || (!volmitSender.isPlayer() && useConsoleCustomColors);
|
||||
return volmitSender.isPlayer() ? useCustomColorsIngame : useConsoleCustomColors;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,14 +161,12 @@ public class IrisSettings {
|
||||
public static class IrisSettingsGUI {
|
||||
public boolean useServerLaunchedGuis = true;
|
||||
public boolean maximumPregenGuiFPS = false;
|
||||
public boolean localPregenGui = true;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsGenerator {
|
||||
public String defaultWorldType = "overworld";
|
||||
public boolean headlessPregeneration = false;
|
||||
public boolean systemEffects = true;
|
||||
public int maxBiomeChildDepth = 4;
|
||||
public boolean preventLeafDecay = true;
|
||||
}
|
||||
|
||||
@@ -121,8 +121,7 @@ public class IrisEngine implements Engine {
|
||||
bud = new AtomicInteger(0);
|
||||
buds = new AtomicInteger(0);
|
||||
metrics = new EngineMetrics(32);
|
||||
cleanLatch = new ChronoLatch(Math.max(10000, Math.min(IrisSettings.get().getParallax()
|
||||
.getParallaxChunkEvictionMS(), IrisSettings.get().getParallax().getParallaxRegionEvictionMS())));
|
||||
cleanLatch = new ChronoLatch(Math.max(10000, IrisSettings.get().getConcurrency().getParallaxEvictionMS()));
|
||||
generatedLast = new AtomicInteger(0);
|
||||
perSecond = new AtomicDouble(0);
|
||||
perSecondLatch = new ChronoLatch(1000, false);
|
||||
|
||||
@@ -493,7 +493,7 @@ public class B {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (bx instanceof Leaves && IrisSettings.get().getGenerator().preventLeafDecay) {
|
||||
if (bx instanceof Leaves && IrisSettings.get().getGenerator().isPreventLeafDecay()) {
|
||||
((Leaves) bx).setPersistent(true);
|
||||
} else if (bx instanceof Leaves) {
|
||||
((Leaves) bx).setPersistent(false);
|
||||
|
||||
Reference in New Issue
Block a user