Skip to content

Commit

Permalink
Fix mod cannot be separated for loading (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrix-Shen committed Dec 27, 2022
1 parent ff2e8ca commit 0aaac10
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@
import top.hendrixshen.bilibilidanmaku.config.ConfigHandler;
import top.hendrixshen.bilibilidanmaku.util.VersionParser;
import top.hendrixshen.magiclib.config.ConfigManager;
import top.hendrixshen.magiclib.util.FabricUtil;

public class BilibiliDanmakuReference {
private static final String MOD_ID = "bilibili-danmaku";
private static final String MOD_NAME = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getName();
private static final String MOD_VERSION = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
private static final String MOD_VERSION_TYPE = VersionParser.getVersionType(MOD_VERSION);

//#if MC > 11802
private static final String CURRENT_MOD_ID = String.format("%s-1_19", MOD_ID);
private static final String CURRENT_MOD_ID = String.format("%s-1_19_2", MOD_ID);
//#elseif MC > 11701
//$$ private static final String CURRENT_MOD_ID = String.format("%s-1_18_2", MOD_ID);
//#elseif MC > 11605
Expand All @@ -25,6 +20,9 @@ public class BilibiliDanmakuReference {
//#else
//$$ private static final String CURRENT_MOD_ID = String.format("%s-1_14_4", MOD_ID);
//#endif
private static final String MOD_NAME = FabricLoader.getInstance().getModContainer(CURRENT_MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getName();
private static final String MOD_VERSION = FabricLoader.getInstance().getModContainer(CURRENT_MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
private static final String MOD_VERSION_TYPE = VersionParser.getVersionType(MOD_VERSION);

private static final int CONFIG_VERSION = 1;
private static final ConfigManager CONFIG_MANAGER = ConfigManager.get(MOD_ID);
Expand Down

0 comments on commit 0aaac10

Please sign in to comment.