Fix Forge Version in Import

This commit is contained in:
Timo Ley 2020-08-15 16:21:57 +02:00
parent 20c0997b10
commit ef27c65480
1 changed files with 3 additions and 3 deletions

View File

@ -43,12 +43,12 @@ public class ManifestJSON extends JSON {
@Expose
public boolean primary;
public AddonscriptJSON.Relation toRelation() {
public AddonscriptJSON.Relation toRelation(String mcv) {
if (id != null && id.startsWith("forge-")) {
AddonscriptJSON.Relation rel = new AddonscriptJSON.Relation();
rel.type = "modloader";
rel.id = "forge";
rel.versions = "[" + id.replaceAll("forge-", "") + "]";
rel.versions = "[" + id.replaceAll("forge", mcv) + "]";
rel.options = new ArrayList<>();
rel.options.add("required");
rel.options.add("client");
@ -116,7 +116,7 @@ public class ManifestJSON extends JSON {
if (minecraft != null) {
for (Modloader l : minecraft.modLoaders) {
version.relations.add(l.toRelation());
version.relations.add(l.toRelation(minecraft.version));
}
}