Skip to content

Commit

Permalink
Make NeoFormRuntimeSpecification#getNeoFormVersion work with suffixed…
Browse files Browse the repository at this point in the history
… neoform versions (#124)
  • Loading branch information
lukebemish committed Feb 28, 2024
1 parent 6b4435a commit 2467789
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ public String getMinecraftVersion() {
}

public String getNeoFormVersion() {
return getVersion().substring(getVersion().lastIndexOf("-") + 1);
String prefix = getMinecraftVersion() + "-";
if (getVersion().startsWith(prefix)) {
return getVersion().substring(prefix.length());
} else {
throw new RuntimeException("NeoForm version " + getVersion() + " does not start with Minecraft version" + getMinecraftVersion());
}
}

public File getNeoFormArchive() {
Expand Down

0 comments on commit 2467789

Please sign in to comment.