Skip to content

Commit d6575c2

Browse files
committed
feat: move Adventure-supported MC versions to replaceable constant
1 parent 61d04ff commit d6575c2

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

astro.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {
1111
LATEST_ADVENTURE_API_RELEASE,
1212
LATEST_ADVENTURE_PLATFORM_MOD_RELEASE,
1313
LATEST_ADVENTURE_PLATFORM_RELEASE,
14+
LATEST_ADVENTURE_SUPPORTED_MC,
15+
LATEST_ADVENTURE_SUPPORTED_MC_RANGE,
1416
LATEST_ANSI_RELEASE,
1517
LATEST_FOLIA_RELEASE,
1618
LATEST_MC_RELEASE,
@@ -552,6 +554,8 @@ export default defineConfig({
552554
LATEST_FOLIA_RELEASE,
553555
LATEST_WATERFALL_RELEASE,
554556
LATEST_USERDEV_RELEASE,
557+
LATEST_ADVENTURE_SUPPORTED_MC,
558+
LATEST_ADVENTURE_SUPPORTED_MC_RANGE,
555559
LATEST_ADVENTURE_API_RELEASE,
556560
LATEST_ADVENTURE_PLATFORM_RELEASE,
557561
LATEST_ADVENTURE_PLATFORM_MOD_RELEASE,

src/components/Dependency.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import { Code, TabItem, Tabs } from "@astrojs/starlight/components";
3-
import { LATEST_ADVENTURE_PLATFORM_MOD_RELEASE } from "../utils/versions";
3+
import { LATEST_ADVENTURE_SUPPORTED_MC_RANGE, LATEST_ADVENTURE_PLATFORM_MOD_RELEASE } from "../utils/versions";
44
55
type TemplateKey = "default" | "adventure-platform-mod";
66
@@ -68,7 +68,7 @@ dependencies {
6868
}
6969
7070
dependencies {
71-
modImplementation(include("net.kyori:adventure-platform-\{NAME}:${LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}")!!) // for Minecraft 1.21.5
71+
modImplementation(include("net.kyori:adventure-platform-\{NAME}:${LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}")!!) // for Minecraft ${LATEST_ADVENTURE_SUPPORTED_MC_RANGE}
7272
}`,
7373
},
7474
{
@@ -87,7 +87,7 @@ dependencies {
8787
}
8888
8989
dependencies {
90-
modImplementation include('net.kyori:adventure-platform-\{NAME}:${LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}') // for Minecraft 1.21.5
90+
modImplementation include('net.kyori:adventure-platform-\{NAME}:${LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}') // for Minecraft ${LATEST_ADVENTURE_SUPPORTED_MC_RANGE}
9191
}`,
9292
},
9393
],

src/content/docs/adventure/platform/bukkit.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ description: The Bukkit Adventure implementation.
44
---
55

66
import Dependency from "/src/components/Dependency.astro";
7-
import { LATEST_ADVENTURE_PLATFORM_RELEASE } from "/src/utils/versions";
7+
import { LATEST_ADVENTURE_SUPPORTED_MC, LATEST_ADVENTURE_PLATFORM_RELEASE } from "/src/utils/versions";
88

99
The Adventure platform implementation for Bukkit targets Paper, Spigot, and Bukkit for
10-
Minecraft 1.7.10 through 1.21.5.
10+
Minecraft 1.7.10 through {LATEST_ADVENTURE_SUPPORTED_MC}.
1111

1212
:::caution
1313

src/content/docs/adventure/platform/modded.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ As with the rest of the Adventure projects, releases are distributed on Maven Ce
3939

4040
dependencies {
4141
// Loom project
42-
modCompileOnly("net.kyori:adventure-platform-mod-shared-fabric-repack:\{LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}") // for Minecraft 1.21.5
42+
modCompileOnly("net.kyori:adventure-platform-mod-shared-fabric-repack:\{LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}") // for Minecraft \{LATEST_ADVENTURE_SUPPORTED_MC_RANGE}
4343

4444
// NeoGradle/ModDevGradle/VanillaGradle project
45-
compileOnly("net.kyori:adventure-platform-mod-shared:\{LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}") // for Minecraft 1.21.5
45+
compileOnly("net.kyori:adventure-platform-mod-shared:\{LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}") // for Minecraft \{LATEST_ADVENTURE_SUPPORTED_MC_RANGE}
4646
}
4747
```
4848
</TabItem>
@@ -61,10 +61,10 @@ As with the rest of the Adventure projects, releases are distributed on Maven Ce
6161
6262
dependencies {
6363
// Loom project
64-
modCompileOnly('net.kyori:adventure-platform-mod-shared-fabric-repack:\{LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}') // for Minecraft 1.21.5
64+
modCompileOnly('net.kyori:adventure-platform-mod-shared-fabric-repack:\{LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}') // for Minecraft \{LATEST_ADVENTURE_SUPPORTED_MC_RANGE}
6565
6666
// NeoGradle/ModDevGradle/VanillaGradle project
67-
compileOnly('net.kyori:adventure-platform-mod-shared:\{LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}') // for Minecraft 1.21.5
67+
compileOnly('net.kyori:adventure-platform-mod-shared:\{LATEST_ADVENTURE_PLATFORM_MOD_RELEASE}') // for Minecraft \{LATEST_ADVENTURE_SUPPORTED_MC_RANGE}
6868
}
6969
```
7070
</TabItem>

src/utils/versions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ const userdevVersions: string[] = await fetchGitHubTags("PaperMC/paperweight");
5959

6060
export const LATEST_USERDEV_RELEASE = userdevVersions[0];
6161

62+
export const LATEST_ADVENTURE_SUPPORTED_MC = "1.21.5";
63+
export const LATEST_ADVENTURE_SUPPORTED_MC_RANGE = LATEST_ADVENTURE_SUPPORTED_MC;
6264
export const LATEST_ADVENTURE_API_RELEASE = "4.22.0";
6365
export const LATEST_ADVENTURE_PLATFORM_RELEASE = "4.4.0";
6466
export const LATEST_ADVENTURE_PLATFORM_MOD_RELEASE = "6.4.0";

0 commit comments

Comments
 (0)