Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 1.20.1 NeoForge link #52

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 7 additions & 28 deletions assets/js/neoforge.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,16 @@ const DOWNLOAD_URL = 'https://maven.neoforged.net/releases'
// To filter a specific MC version: https://maven.neoforged.net/api/maven/latest/version/releases/net/neoforged/neoforge?filter=20.4
async function loadLatestVersions(minecraftVersions) {
for (const mcVersion of minecraftVersions) {
let gav;
let fn;
let gav = FORGE_GAV;
let fn = "neoforge";
let mcvers;
let dropDown_VAL;
let badges_beta;
let badges_new;
let badges_legacy;
if (mcVersion.startsWith("1.20.1")) {
gav = LEGACY_GAV;
fn = "forge";
mcvers = "1.20.1";
badges_new = "";
badges_legacy = `<font class="badges badges_legacy">LEGACY</font>`;
badges_beta = "";
dropDown_VAL = "";
} else {
gav = FORGE_GAV;
fn = "neoforge";
badges_beta = "";
badges_new = `<font class="badges badges_new">NEW</font>`;
badges_legacy = "";
dropDown_VAL = ` open="open"`;
}
let dropDown_VAL = ` open="open"`;
let badges_beta = "";
let badges_new = "";
let badges_legacy = "";

let currentMcVersionUrl;
let currentMcVersionUrl = new URL(LATEST_ENDPOINT + encodeURIComponent(gav));
let versionJson;
if (mcvers == "1.20.1") {
currentMcVersionUrl = new URL(LATEST_ENDPOINT + encodeURIComponent(gav) + '?filter=' + encodeURIComponent(mcVersion));
} else {
currentMcVersionUrl = new URL(LATEST_ENDPOINT + encodeURIComponent(gav));
}

try {
const response = await fetch(currentMcVersionUrl);
Expand Down
1 change: 0 additions & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ description: |
You can find a direct link to our latest installer files below.

{{< files "latest" >}}
{{< files "1.20.1" >}}
{{< versions >}}

# Using NeoForge for mod development
Expand Down
Loading