Skip to content

Commit

Permalink
Provide generators for 1.21.1-1.21.4 (#23)
Browse files Browse the repository at this point in the history
* Provide generators for 1.21.1-1.21.3

* Add note to clarify where web server is viewed

* Add 1.21.4
  • Loading branch information
cassiancc authored Dec 3, 2024
1 parent ebb13de commit daa3fd3
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A generator for Architectury mod templates with a web UI and an interactive comm

Run `./gradlew buildWeb`. The output will be in `build/web`.

The local test web server can be launched with `./gradlew runTestServer` (requires Python).
The local test web server can be launched with `./gradlew runTestServer` (requires Python). While running, this web server can be viewed at http://localhost:8000.

## Building (native)

Expand Down
2 changes: 1 addition & 1 deletion src/app/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

pub const LOOM_VERSION: &'static str = "1.6-SNAPSHOT";
pub const LOOM_VERSION: &'static str = "1.7-SNAPSHOT";
pub const PLUGIN_VERSION: &'static str = "3.4-SNAPSHOT";

use miette::Result;
Expand Down
37 changes: 37 additions & 0 deletions version_resolver/src/minecraft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ pub enum MinecraftVersion {
Minecraft1_20_6,
#[serde(rename = "1.21")]
Minecraft1_21,
#[serde(rename = "1.21.1")]
Minecraft1_21_1,
#[serde(rename = "1.21.2")]
Minecraft1_21_2,
#[serde(rename = "1.21.3")]
Minecraft1_21_3,
#[serde(rename = "1.21.4")]
Minecraft1_21_4,
}

impl MinecraftVersion {
Expand All @@ -62,6 +70,10 @@ impl MinecraftVersion {
Self::Minecraft1_20_5 => "1.20.5",
Self::Minecraft1_20_6 => "1.20.6",
Self::Minecraft1_21 => "1.21",
Self::Minecraft1_21_1 => "1.21.1",
Self::Minecraft1_21_2 => "1.21.2",
Self::Minecraft1_21_3 => "1.21.3",
Self::Minecraft1_21_4 => "1.21.4",
}
}

Expand Down Expand Up @@ -127,6 +139,10 @@ impl MinecraftVersion {
Self::Minecraft1_20_5 => None,
Self::Minecraft1_20_6 => None,
Self::Minecraft1_21 => None,
Self::Minecraft1_21_1 => None,
Self::Minecraft1_21_2 => None,
Self::Minecraft1_21_3 => None,
Self::Minecraft1_21_4 => None,
}
}

Expand All @@ -147,6 +163,11 @@ impl MinecraftVersion {
Self::Minecraft1_20_5 => "12.0",
Self::Minecraft1_20_6 => "12",
Self::Minecraft1_21 => "13",
Self::Minecraft1_21_1 => "13",
Self::Minecraft1_21_2 => "14",
Self::Minecraft1_21_3 => "14",
Self::Minecraft1_21_4 => "15",

}
}

Expand All @@ -156,6 +177,10 @@ impl MinecraftVersion {
Self::Minecraft1_20_5 => Some("2"),
Self::Minecraft1_20_6 => Some("2"),
Self::Minecraft1_21 => Some("4"),
Self::Minecraft1_21_1 => Some("4"),
Self::Minecraft1_21_2 => Some("4"),
Self::Minecraft1_21_3 => Some("4"),
Self::Minecraft1_21_4 => Some("4"),
_ => None,
}
}
Expand All @@ -166,6 +191,10 @@ impl MinecraftVersion {
Self::Minecraft1_20_5 => Some("20.5"),
Self::Minecraft1_20_6 => Some("20.6"),
Self::Minecraft1_21 => Some("21.0"),
Self::Minecraft1_21_1 => Some("21.1"),
Self::Minecraft1_21_2 => Some("21.2"),
Self::Minecraft1_21_3 => Some("21.3"),
Self::Minecraft1_21_4 => Some("21.4"),
_ => None,
}
}
Expand All @@ -175,6 +204,10 @@ impl MinecraftVersion {
Self::Minecraft1_20_5 => Some("1.20.5"),
Self::Minecraft1_20_6 => Some("1.20.6"),
Self::Minecraft1_21 => Some("1.21"),
Self::Minecraft1_21_1 => Some("1.21"),
Self::Minecraft1_21_2 => Some("1.21"),
Self::Minecraft1_21_3 => Some("1.21"),
Self::Minecraft1_21_4 => Some("1.21"),
_ => None,
}
}
Expand All @@ -196,6 +229,10 @@ impl MinecraftVersion {
Self::Minecraft1_20_5 => None,
Self::Minecraft1_20_6 => None,
Self::Minecraft1_21 => None,
Self::Minecraft1_21_1 => None,
Self::Minecraft1_21_2 => None,
Self::Minecraft1_21_3 => None,
Self::Minecraft1_21_4 => None,
}
}

Expand Down

0 comments on commit daa3fd3

Please sign in to comment.