[Change] Moved "Survives On" Setting to the client config

This commit is contained in:
Frank 2022-10-13 20:25:38 +02:00
parent f89c305dfe
commit 3e7a2e869d
3 changed files with 11 additions and 11 deletions

View file

@ -107,6 +107,11 @@ public class ClientConfig extends NamedPathConfig {
"rendering",
(config) -> config.get(CUSTOM_FOG_RENDERING)
);
public static final ConfigToken<Boolean> SURVIES_ON_HINT = ConfigToken.Boolean(
true,
"survives_on_hint",
Configs.MAIN_INFO_CATEGORY
);
public ClientConfig() {
@ -189,4 +194,8 @@ public class ClientConfig extends NamedPathConfig {
public void setForceBetterXPreset(boolean v) {
set(FORCE_BETTERX_PRESET, v);
}
public boolean survivesOnHint() {
return get(ClientConfig.SURVIES_ON_HINT);
}
}

View file

@ -9,18 +9,13 @@ public class MainConfig extends NamedPathConfig {
Configs.MAIN_INFO_CATEGORY
);
public static final ConfigToken<Boolean> SURVIES_ON_HINT = ConfigToken.Boolean(
true,
"survives_on_hint",
Configs.MAIN_INFO_CATEGORY
);
public static final ConfigToken<Boolean> APPLY_PATCHES = ConfigToken.Boolean(
true,
"applyPatches",
Configs.MAIN_PATCH_CATEGORY
);
@ConfigUI(leftPadding = 8)
@ConfigUI(leftPadding = 8, topPadding = 8)
public static final ConfigToken<Boolean> REPAIR_BIOMES = DependendConfigToken.Boolean(
false,
"repairBiomesOnLoad",
@ -45,8 +40,4 @@ public class MainConfig extends NamedPathConfig {
public boolean verboseLogging() {
return get(VERBOSE_LOGGING);
}
public boolean survivesOnHint() {
return get(SURVIES_ON_HINT);
}
}

View file

@ -39,7 +39,7 @@ public interface SurvivesOnSpecialGround {
@Environment(EnvType.CLIENT)
static void appendHoverText(List<Component> list, String description) {
if (!Configs.MAIN_CONFIG.survivesOnHint()) return;
if (!Configs.CLIENT_CONFIG.survivesOnHint()) return;
final int MAX_LINES = 7;
List<String> lines = splitLines(description);
if (lines.size() == 1) {