Fix Forge Version in Import
This commit is contained in:
parent
20c0997b10
commit
ef27c65480
|
@ -43,12 +43,12 @@ public class ManifestJSON extends JSON {
|
||||||
@Expose
|
@Expose
|
||||||
public boolean primary;
|
public boolean primary;
|
||||||
|
|
||||||
public AddonscriptJSON.Relation toRelation() {
|
public AddonscriptJSON.Relation toRelation(String mcv) {
|
||||||
if (id != null && id.startsWith("forge-")) {
|
if (id != null && id.startsWith("forge-")) {
|
||||||
AddonscriptJSON.Relation rel = new AddonscriptJSON.Relation();
|
AddonscriptJSON.Relation rel = new AddonscriptJSON.Relation();
|
||||||
rel.type = "modloader";
|
rel.type = "modloader";
|
||||||
rel.id = "forge";
|
rel.id = "forge";
|
||||||
rel.versions = "[" + id.replaceAll("forge-", "") + "]";
|
rel.versions = "[" + id.replaceAll("forge", mcv) + "]";
|
||||||
rel.options = new ArrayList<>();
|
rel.options = new ArrayList<>();
|
||||||
rel.options.add("required");
|
rel.options.add("required");
|
||||||
rel.options.add("client");
|
rel.options.add("client");
|
||||||
|
@ -116,7 +116,7 @@ public class ManifestJSON extends JSON {
|
||||||
|
|
||||||
if (minecraft != null) {
|
if (minecraft != null) {
|
||||||
for (Modloader l : minecraft.modLoaders) {
|
for (Modloader l : minecraft.modLoaders) {
|
||||||
version.relations.add(l.toRelation());
|
version.relations.add(l.toRelation(minecraft.version));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue