New config option to disable the experimental warning screen on level load
This commit is contained in:
parent
b60df41c6c
commit
ba7489ee79
4 changed files with 16 additions and 1 deletions
|
@ -4,6 +4,9 @@ import ru.bclib.BCLib;
|
||||||
import ru.bclib.api.dataexchange.handler.autosync.AutoSync;
|
import ru.bclib.api.dataexchange.handler.autosync.AutoSync;
|
||||||
|
|
||||||
public class ClientConfig extends NamedPathConfig {
|
public class ClientConfig extends NamedPathConfig {
|
||||||
|
public static final ConfigToken<Boolean> SUPPRESS_EXPERIMENTAL_DIALOG = ConfigToken.Boolean(false, "suppressExperimentalDialogOnLoad", "ui");
|
||||||
|
|
||||||
|
@ConfigUI(topPadding = 12)
|
||||||
public static final ConfigToken<Boolean> ENABLED = ConfigToken.Boolean(true, "enabled", AutoSync.SYNC_CATEGORY);
|
public static final ConfigToken<Boolean> ENABLED = ConfigToken.Boolean(true, "enabled", AutoSync.SYNC_CATEGORY);
|
||||||
|
|
||||||
@ConfigUI(leftPadding = 8)
|
@ConfigUI(leftPadding = 8)
|
||||||
|
@ -46,4 +49,7 @@ public class ClientConfig extends NamedPathConfig {
|
||||||
public boolean isShowingModInfo() {
|
public boolean isShowingModInfo() {
|
||||||
return get(DISPLAY_MOD_INFO) /*&& isAllowingAutoSync()*/;
|
return get(DISPLAY_MOD_INFO) /*&& isAllowingAutoSync()*/;
|
||||||
}
|
}
|
||||||
|
public boolean suppressExperimentalDialog() {
|
||||||
|
return get(SUPPRESS_EXPERIMENTAL_DIALOG);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import ru.bclib.api.LifeCycleAPI;
|
||||||
import ru.bclib.api.biomes.BiomeAPI;
|
import ru.bclib.api.biomes.BiomeAPI;
|
||||||
import ru.bclib.api.dataexchange.DataExchangeAPI;
|
import ru.bclib.api.dataexchange.DataExchangeAPI;
|
||||||
import ru.bclib.api.datafixer.DataFixerAPI;
|
import ru.bclib.api.datafixer.DataFixerAPI;
|
||||||
|
import ru.bclib.config.Configs;
|
||||||
import ru.bclib.interfaces.CustomColorProvider;
|
import ru.bclib.interfaces.CustomColorProvider;
|
||||||
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
@ -72,6 +73,11 @@ public abstract class MinecraftMixin {
|
||||||
else {
|
else {
|
||||||
LifeCycleAPI._runBeforeLevelLoad();
|
LifeCycleAPI._runBeforeLevelLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Configs.CLIENT_CONFIG.suppressExperimentalDialog()) {
|
||||||
|
this.doLoadLevel(levelID, RegistryAccess.builtin(), Minecraft::loadDataPacks, Minecraft::loadWorldData, false, ExperimentalDialogType.NONE);
|
||||||
|
ci.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "createLevel", at = @At("HEAD"))
|
@Inject(method = "createLevel", at = @At("HEAD"))
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
"title.config.bclib.generator.options.useOldBiomeGenerator": "Alten 1.17 Biome Generator verwenden",
|
"title.config.bclib.generator.options.useOldBiomeGenerator": "Alten 1.17 Biome Generator verwenden",
|
||||||
"title.config.bclib.main.patches.applyPatches": "Automatisches Anwenden von Patches beim Laden eines Levels",
|
"title.config.bclib.main.patches.applyPatches": "Automatisches Anwenden von Patches beim Laden eines Levels",
|
||||||
"title.config.bclib.main.patches.repairBiomesOnLoad": "Biomesource beim Laden eines Levels reparieren",
|
"title.config.bclib.main.patches.repairBiomesOnLoad": "Biomesource beim Laden eines Levels reparieren",
|
||||||
|
"title.config.bclib.client.ui.suppressExperimentalDialogOnLoad": "Experimenteller Warnbildschirm beim Laden deaktivieren",
|
||||||
|
|
||||||
"title.bclib.syncfiles.modInfo": "Mod Info",
|
"title.bclib.syncfiles.modInfo": "Mod Info",
|
||||||
"title.bclib.syncfiles.modlist": "Mod Information",
|
"title.bclib.syncfiles.modlist": "Mod Information",
|
||||||
|
@ -50,5 +51,6 @@
|
||||||
"message.bclib.datafixer.progress": "Anwenden aller Änderungen",
|
"message.bclib.datafixer.progress": "Anwenden aller Änderungen",
|
||||||
"title.bclib.datafixer.error": "Fehler beim Reparieren der Welt",
|
"title.bclib.datafixer.error": "Fehler beim Reparieren der Welt",
|
||||||
"message.bclib.datafixer.error": "Es gab Fehler beim Reparieren der Welt. Das bedeutet, dass dieser Level wahrscheinlich in einem inkonsistenten Zustand ist und Sie ihn nicht spielen sollten. Bitte stellen Sie Ihr Backup wieder her und beheben Sie die unten aufgeführten Fehler, bevor Sie es erneut versuchen.",
|
"message.bclib.datafixer.error": "Es gab Fehler beim Reparieren der Welt. Das bedeutet, dass dieser Level wahrscheinlich in einem inkonsistenten Zustand ist und Sie ihn nicht spielen sollten. Bitte stellen Sie Ihr Backup wieder her und beheben Sie die unten aufgeführten Fehler, bevor Sie es erneut versuchen.",
|
||||||
"title.bclib.datafixer.error.continue": "Continue and Mark as Fixed"
|
"title.bclib.datafixer.error.continue": "Continue and Mark as Fixed",
|
||||||
|
"title.config.bclib.main.ui.suppressExperimentalDialogOnLoad": "Disable Experimental Warning Screen on Load"
|
||||||
}
|
}
|
|
@ -32,6 +32,7 @@
|
||||||
"title.config.bclib.generator.options.useOldBiomeGenerator": "Use legacy 1.17 Biome Generator",
|
"title.config.bclib.generator.options.useOldBiomeGenerator": "Use legacy 1.17 Biome Generator",
|
||||||
"title.config.bclib.main.patches.applyPatches": "Automatically apply patches when loading level",
|
"title.config.bclib.main.patches.applyPatches": "Automatically apply patches when loading level",
|
||||||
"title.config.bclib.main.patches.repairBiomesOnLoad": "Fix Biomesource on level load",
|
"title.config.bclib.main.patches.repairBiomesOnLoad": "Fix Biomesource on level load",
|
||||||
|
"title.config.bclib.client.ui.suppressExperimentalDialogOnLoad": "Disable Experimental Warning Screen on Load",
|
||||||
|
|
||||||
"title.bclib.syncfiles.modInfo": "Mod Info",
|
"title.bclib.syncfiles.modInfo": "Mod Info",
|
||||||
"title.bclib.syncfiles.modlist": "Mod Information",
|
"title.bclib.syncfiles.modlist": "Mod Information",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue