Skip to content

Commit

Permalink
Fix mod cannot be separated for loading (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrix-Shen committed Jun 23, 2022
1 parent 083cdb2 commit 25660ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fabricWrapper/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "${mod_version}",
"icon": "assets/${mod_id}/icon.png",
"name": "${mod_name}",
"description": "${mod_name}",
"description": "Add something interesting <3",
"authors": [
{
"name": "Hendrix_Shen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

public class TweakMyClientReference {
private static final String MOD_ID = "tweakmyclient";
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);
//#elseif MC > 11701
Expand All @@ -25,6 +21,9 @@ public class TweakMyClientReference {
//#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
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "${mod_version}",
"icon": "assets/${mod_id}/icon.png",
"name": "${mod_name} for ${minecraft_version}",
"description": "${mod_name} for ${minecraft_version}",
"description": "Add something interesting <3",
"authors": [
{
"name": "Hendrix_Shen",
Expand Down

0 comments on commit 25660ba

Please sign in to comment.