mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-15 09:05:08 +01:00
@@ -1,3 +1,5 @@
|
||||
## MidnightLib v1.9.1
|
||||
- Fix crash when loading existing main config on NeoForge
|
||||
# MidnightLib v1.9.0
|
||||
- Setup a **multiversion** build environment
|
||||
- MidnightLib will now always be up-to-date on all relevant versions of Minecraft
|
||||
|
||||
@@ -7,7 +7,7 @@ org.gradle.parallel=false
|
||||
#org.gradle.configureondemand=true
|
||||
|
||||
# Mod properties
|
||||
mod.version=1.9.0
|
||||
mod.version=1.9.1
|
||||
mod.group=eu.midnightdust
|
||||
mod.id=midnightlib
|
||||
mod.name=MidnightLib
|
||||
|
||||
@@ -4,20 +4,15 @@ import eu.midnightdust.lib.config.MidnightConfig;
|
||||
import eu.midnightdust.lib.util.PlatformFunctions;
|
||||
|
||||
public class MidnightLibConfig extends MidnightConfig {
|
||||
//? if fabric {
|
||||
@Entry public static ConfigButton config_screen_list = PlatformFunctions.isModLoaded("modmenu") ? ConfigButton.MODMENU : ConfigButton.TRUE;
|
||||
public static final boolean HAS_MODMENU = PlatformFunctions.isModLoaded("modmenu") || "neoforge".equals(PlatformFunctions.getPlatformName());
|
||||
|
||||
public static boolean shouldShowButton() {
|
||||
return config_screen_list.equals(ConfigButton.TRUE) || (config_screen_list.equals(ConfigButton.MODMENU) && !PlatformFunctions.isModLoaded("modmenu"));
|
||||
}
|
||||
//?} else {
|
||||
/*@Entry public static ConfigButton config_screen_list = ConfigButton.FALSE;
|
||||
@Entry public static ConfigButton config_screen_list = HAS_MODMENU ? ConfigButton.MODMENU : ConfigButton.TRUE;
|
||||
|
||||
public static boolean shouldShowButton() {
|
||||
return config_screen_list.equals(ConfigButton.TRUE);
|
||||
}
|
||||
*///?}
|
||||
public enum ConfigButton {
|
||||
TRUE, FALSE /*? if fabric {*/, MODMENU /*?}*/
|
||||
TRUE, FALSE, MODMENU
|
||||
}
|
||||
|
||||
public static boolean shouldShowButton() {
|
||||
return config_screen_list.equals(ConfigButton.TRUE) || (config_screen_list.equals(ConfigButton.MODMENU) && !HAS_MODMENU);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user