Compare commits

..

No commits in common. "master" and "master" have entirely different histories.

8 changed files with 10 additions and 26 deletions

View File

@ -1,11 +1,5 @@
# Changelog
**1.1.11**
* Add Translations
**1.1.10**
* Improve
**1.1.9**
* Add ```modupdater``` Entry-Point

View File

@ -2,17 +2,17 @@
org.gradle.jvmargs = -Xmx1G
# Fabric Properties
minecraft_version = 1.16.2-rc2
minecraft_version = 1.16.2
curseforge_id = 391583
simple_minecraft_version = 1.16.2
yarn_build = 1
fabric_loader_version = 0.9.1+build.205
# Mod Properties
mod_version = 1.1.11
mod_version = 1.1.9
maven_group = com.thebrokenrail
# Dependencies
fabric_api_version = 0.17.2+build.396-1.16
modmenu_version = 1.14.6+build.31
modmenu_version = 1.14.2+build.27
moshi_version = 1.9.2

View File

@ -10,7 +10,7 @@ import com.thebrokenrail.modupdater.api.UpdateStrategy;
import com.thebrokenrail.modupdater.data.ModUpdate;
import com.thebrokenrail.modupdater.util.Util;
import net.fabricmc.loader.api.SemanticVersion;
import net.fabricmc.loader.api.VersionParsingException;
import net.fabricmc.loader.util.version.VersionParsingException;
import javax.annotation.Nullable;
import java.io.IOException;
@ -65,7 +65,7 @@ public class CurseForgeStrategy implements UpdateStrategy {
String versionStr;
GameVersion version = Util.getMinecraftVersion();
if (version.isStable()) {
versionStr = version.getId();
versionStr = version.getName();
} else {
versionStr = version.getReleaseTarget() + "-Snapshot";
}

View File

@ -9,7 +9,7 @@ import com.thebrokenrail.modupdater.api.UpdateStrategy;
import com.thebrokenrail.modupdater.data.ModUpdate;
import com.thebrokenrail.modupdater.util.Util;
import net.fabricmc.loader.api.SemanticVersion;
import net.fabricmc.loader.api.VersionParsingException;
import net.fabricmc.loader.util.version.VersionParsingException;
import javax.annotation.Nullable;
import java.io.IOException;

View File

@ -61,7 +61,7 @@ public class JSONStrategy implements UpdateStrategy {
return null;
}
String version = Util.getMinecraftVersion().getId();
String version = Util.getMinecraftVersion().getName();
if (map.containsKey(version)) {
LatestVersionEntry entry = map.get(version);
if (!oldVersion.equals(entry.version)) {

View File

@ -6,7 +6,7 @@ import com.thebrokenrail.modupdater.api.UpdateStrategy;
import com.thebrokenrail.modupdater.data.ModUpdate;
import com.thebrokenrail.modupdater.util.Util;
import net.fabricmc.loader.api.SemanticVersion;
import net.fabricmc.loader.api.VersionParsingException;
import net.fabricmc.loader.util.version.VersionParsingException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

View File

@ -75,13 +75,13 @@ public class Util {
if (parts.length > 1) {
return String.format("%s.%s", parts[0], parts[1]);
} else {
return minecraftVersion.getId();
return minecraftVersion.getName();
}
}
private static boolean isVersionCompatible(String versionStr, char prefix, boolean strict) {
updateMinecraftVersion();
return versionStr.endsWith(prefix + minecraftVersionSemantic) || versionStr.endsWith(prefix + minecraftVersion.getId()) || (!strict && (versionStr.endsWith(prefix + minecraftVersion.getReleaseTarget()) || versionStr.endsWith(prefix + getMajorVersion())));
return versionStr.endsWith(prefix + minecraftVersionSemantic) || versionStr.endsWith(prefix + minecraftVersion.getName()) || (!strict && (versionStr.endsWith(prefix + minecraftVersion.getReleaseTarget()) || versionStr.endsWith(prefix + getMajorVersion())));
}
public static boolean isVersionCompatible(String id, String versionStr, boolean strict) {

View File

@ -1,10 +0,0 @@
{
"gui.modupdater.title": "可用的模组更新",
"gui.modupdater.download": "下载",
"gui.modupdater.refresh": "刷新",
"gui.modupdater.loading": "加载中...",
"commands.modupdater.not_loaded": "模组更新加载时无法进行其它操作",
"commands.modupdater.refresh_start": "刷新模组更新列表中",
"commands.modupdater.hover": "点击下载",
"commands.modupdater.list_title": "可用的模组更新:"
}