-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: integrate ConfigAnyTime * docs: correct javadoc of configanytime * refactor: fix config anytime mod container name * fix: inject config anytime container manually
- Loading branch information
1 parent
2ef257b
commit 1970f0b
Showing
6 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/com/cleanroommc/configanytime/ConfigAnytime.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.cleanroommc.configanytime; | ||
|
||
import net.minecraftforge.common.config.Config; | ||
import net.minecraftforge.common.config.ConfigManager; | ||
|
||
@Deprecated | ||
public class ConfigAnytime { | ||
/** | ||
* A wrapper of {@link ConfigManager#register(Class)}, created for compatibility. | ||
* @param configClass configuration class that is annotated with {@link Config} | ||
*/ | ||
public static void register(Class<?> configClass) { | ||
ConfigManager.register(configClass); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/net/minecraftforge/fml/common/ConfigAnytimeContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package net.minecraftforge.fml.common; | ||
|
||
import com.google.common.eventbus.EventBus; | ||
|
||
public class ConfigAnytimeContainer extends DummyModContainer{ | ||
public ConfigAnytimeContainer() { | ||
super(new ModMetadata()); | ||
ModMetadata meta = this.getMetadata(); | ||
meta.modId = "configanytime"; | ||
meta.name = "ConfigAnytime"; | ||
meta.description = "Allows Forge configurations to be setup at any point in time."; | ||
meta.version = "2.0"; | ||
meta.authorList.add("Rongmario"); | ||
} | ||
|
||
@Override | ||
public boolean registerBus(EventBus bus, LoadController controller) { | ||
bus.register(this); | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters