Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58c420d35f |
@@ -30,12 +30,17 @@ public class OmegaConfigGui {
|
|||||||
*/
|
*/
|
||||||
public static <T extends Config> void registerConfigScreen(T config) {
|
public static <T extends Config> void registerConfigScreen(T config) {
|
||||||
if(FabricLoader.getInstance().isModLoaded("modmenu")) {
|
if(FabricLoader.getInstance().isModLoaded("modmenu")) {
|
||||||
OmegaScreenFactory<Screen> factory = OmegaConfigGui.getConfigScreenFactory(config);
|
// Ensure the config has a valid modid.
|
||||||
|
if(config.getModid() != null) {
|
||||||
|
OmegaScreenFactory<Screen> factory = OmegaConfigGui.getConfigScreenFactory(config);
|
||||||
|
|
||||||
if(modMenuInitialized) {
|
if(modMenuInitialized) {
|
||||||
OmegaModMenu.injectScreen(config, factory);
|
OmegaModMenu.injectScreen(config, factory);
|
||||||
|
} else {
|
||||||
|
REGISTERED_CONFIGURATIONS.put(config, factory);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
REGISTERED_CONFIGURATIONS.put(config, factory);
|
OmegaConfig.LOGGER.warn(String.format("Skipping config screen registration for '%s' - you must implement getModid() in your config class!", config.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user