[Feature] Disable Survives-On Hint in UI (quiqueck/BetterNether#51)
This commit is contained in:
parent
0aca2f986d
commit
928dff6270
3 changed files with 15 additions and 2 deletions
|
@ -20,7 +20,7 @@ public class Configs {
|
|||
public static final BiomesConfig BIOMES_CONFIG = new BiomesConfig();
|
||||
|
||||
public static final String MAIN_PATCH_CATEGORY = "patches";
|
||||
public static final String MAIN_LOG_CATEGORY = "logs";
|
||||
public static final String MAIN_INFO_CATEGORY = "infos";
|
||||
|
||||
public static void save() {
|
||||
MAIN_CONFIG.saveChanges();
|
||||
|
|
|
@ -6,7 +6,13 @@ public class MainConfig extends NamedPathConfig {
|
|||
public static final ConfigToken<Boolean> VERBOSE_LOGGING = ConfigToken.Boolean(
|
||||
true,
|
||||
"verbose",
|
||||
Configs.MAIN_LOG_CATEGORY
|
||||
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,
|
||||
|
@ -39,4 +45,8 @@ public class MainConfig extends NamedPathConfig {
|
|||
public boolean verboseLogging() {
|
||||
return get(VERBOSE_LOGGING);
|
||||
}
|
||||
|
||||
public boolean survivesOnHint() {
|
||||
return get(SURVIES_ON_HINT);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.bclib.interfaces;
|
||||
|
||||
import org.betterx.bclib.config.Configs;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
@ -37,6 +39,7 @@ public interface SurvivesOnSpecialGround {
|
|||
|
||||
@Environment(EnvType.CLIENT)
|
||||
static void appendHoverText(List<Component> list, String description) {
|
||||
if (!Configs.MAIN_CONFIG.survivesOnHint()) return;
|
||||
final int MAX_LINES = 7;
|
||||
List<String> lines = splitLines(description);
|
||||
if (lines.size() == 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue