Skip to content

Commit 54b0e0e

Browse files
committed
Merge branch 'mc/1.21.7' into mc/1.21.10
2 parents 20c0343 + 2d88fe1 commit 54b0e0e

17 files changed

Lines changed: 142 additions & 99 deletions

File tree

oneclick/src/fabric.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export async function downloadFabric(to: string, forceVersion: string, java: key
5959
await downloadMod(mods, "fabric", latestGame.version, { project: "lithium", filename: "Lithium.jar" })
6060
} catch {
6161
console.warn("could not download lithium")
62+
// TODO: write empty zip file? to help with updating from prior versions to avoid crashes
6263
}
6364
return await downloadMod(mods, "fabric", latestGame.version, { filename: "CrowdControl-Fabric.jar" })
6465
}

oneclick/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import { downloadNeoForge } from './neoforge.js';
88
const root = await mkdir(path.resolve("output", "Minecraft"))
99

1010
// await downloadJRE(root, 8)
11-
await downloadJRE(root, 21)
11+
// await downloadJRE(root, 21)
1212
await downloadJRE(root, 25)
1313

1414
const modVersions = await Promise.allSettled([
15-
downloadPaper(root, "1.21.11", 21),
16-
downloadFabric(root, "26.1", 25),
17-
downloadNeoForge(root, "26.1", 25),
15+
downloadPaper(root, "26.1.2", 25),
16+
downloadFabric(root, "26.1.2", 25),
17+
downloadNeoForge(root, "26.1.2", 25),
1818
])
1919

2020
const modVersion = modVersions

oneclick/src/paper.ts

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,40 @@ import { downloadFile, jrePaths, mkdir, uaheaderfull, writeConfig, writeEula, wr
33
import { downloadMod } from "./modrinth.js";
44

55
interface BaseBody {
6-
project_id: string
7-
project_name: string
6+
project: {
7+
id: string
8+
name: string
9+
}
810
}
911

1012
interface ProjectBody extends BaseBody {
11-
version_groups: string[]
12-
versions: string[]
13-
}
14-
15-
interface BuildsBody extends BaseBody {
16-
version: string
17-
builds: Build[]
13+
versions: Record<string, string[]>
1814
}
1915

2016
interface Build {
21-
build: number,
22-
time: string,
23-
channel: "default" | "experimental",
24-
promoted: boolean,
25-
changes: {
26-
commit: string,
27-
summary: string,
28-
message: string,
29-
}[],
17+
id: number
18+
time: string
19+
channel: 'STABLE' | 'BETA' | 'RECOMMENDED' | 'ALPHA'
20+
// commits
3021
downloads: {
31-
application: {
32-
name: string,
33-
sha256: string,
22+
"server:default": {
23+
name: string
24+
checksums: {
25+
sha256: string
26+
}
27+
size: number
28+
url: string
3429
}
3530
}
3631
}
3732

33+
type BuildsBody = Build[]
34+
3835
export async function fetchLatest(version: string, force?: boolean) {
39-
const data = await fetch(`https://api.papermc.io/v2/projects/paper/versions/${version}/builds`, uaheaderfull).then(r => r.json() as Promise<BuildsBody>)
36+
const data = await fetch(`https://fill.papermc.io/v3/projects/paper/versions/${version}/builds`, uaheaderfull).then(r => r.json() as Promise<BuildsBody>)
4037
return force
41-
? data.builds[data.builds.length - 1]
42-
: data.builds.findLast(build => build.channel === "default")
38+
? data[0]
39+
: data.find(build => build.channel === "STABLE")
4340
}
4441

4542
export async function downloadPaper(to: string, forceVersion: string, java: keyof (typeof jrePaths)) {
@@ -53,10 +50,10 @@ export async function downloadPaper(to: string, forceVersion: string, java: keyo
5350
await writeConfig(config)
5451

5552
console.info("Fetching Paper versions")
56-
const data = await fetch(`https://api.papermc.io/v2/projects/paper`, uaheaderfull).then(r => r.json() as Promise<ProjectBody>)
53+
const data = await fetch(`https://fill.papermc.io/v3/projects/paper`, uaheaderfull).then(r => r.json() as Promise<ProjectBody>)
5754
let build: Build | undefined
5855
let version: string | undefined
59-
for (const vers of data.versions.toReversed()) {
56+
for (const vers of Object.values(data.versions).flat().toReversed()) {
6057
if (forceVersion && vers !== forceVersion) continue;
6158
build = await fetchLatest(vers, !!forceVersion)
6259
if (build) {
@@ -69,9 +66,7 @@ export async function downloadPaper(to: string, forceVersion: string, java: keyo
6966

7067
console.info(`Downloading Paper ${version}`)
7168
const serverJar = path.resolve(root, "paper.jar")
72-
let dlName = build.downloads.application.name
73-
if (path.extname(dlName) !== ".jar") dlName += ".jar"
74-
const paperDlUrl = `https://api.papermc.io/v2/projects/paper/versions/${version}/builds/${build.build}/downloads/${dlName}`
69+
const paperDlUrl = build.downloads["server:default"].url
7570
await downloadFile(serverJar, paperDlUrl)
7671

7772
await writeRun(serverJar, java)

website/components/JoinGuide.vue

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<script setup lang="ts">
2+
import { useVersion } from '~/composables/useVersion'
3+
import * as versions from '~/utils/versions'
4+
5+
defineProps<{ embedded?: boolean }>()
6+
7+
const versionData = useVersion(versions.unsureML)
8+
const { version } = versionData
9+
10+
const fabricAvailable = computed(() => versions.fabricML.versions.some(item => item.id === version.id))
11+
const neoAvailable = computed(() => versions.neoForgeML.versions.some(item => item.id === version.id))
12+
</script>
13+
14+
<template>
15+
<div :class="{ 'border-solid border-0 border-l-4 border-l-slate-500 pl-4 pr-3 bg-slate-500/10 py-px': embedded }">
16+
<h1>Joining an External {{ version.id }} Server</h1>
17+
18+
<p>The following steps are for streamers who are connecting to another individual's Minecraft {{ version.id }} Crowd Control server.</p>
19+
20+
<ol v-if="!version.legacy">
21+
<li>(Recommended) Download and install the <a href="https://crowdcontrol.live/">Crowd Control app</a> to be able to manage the cost of effects among other settings.</li>
22+
<li>(Optional) For extra effects and the best experience, install the client mod using the <NuxtLink :to="`/guide/fabric/client?v=${version.id}`">Fabric</NuxtLink> or <NuxtLink :to="`/guide/neoforge/client?v=${version.id}`">NeoForge</NuxtLink> Client Setup guide.</li>
23+
<li>Join the Minecraft server in your game using the IP address provided to you by your server administrator.
24+
<ul>
25+
<li>This is usually the same IP address you use to connect in-game.</li>
26+
<li>For local servers, use <code>localhost</code>.</li>
27+
</ul>
28+
</li>
29+
<li>Follow the instructions in the chat to link your Crowd Control account and start your session.</li>
30+
<li>Test some effects from the Interact Link shared in the chat to ensure everything is working.</li>
31+
</ol>
32+
<ol v-else>
33+
<li>Download and install the <a href="https://crowdcontrol.live/">Crowd Control app</a>.</li>
34+
<li>In the <strong>Game Selection</strong> tab, select <strong>Minecraft</strong>.</li>
35+
<li>Under <strong>Select a Pack</strong>, choose the last option <strong>Minecraft (Legacy)</strong>.
36+
<ul>
37+
<li>If you selected the wrong option, you can click on the blue button that says "Default" on the top of the app to re-open this menu.</li>
38+
</ul>
39+
</li>
40+
<li>Select <strong>Configure Minecraft</strong>.</li>
41+
<li>Enter your Minecraft username and click next.</li>
42+
<li>Select <strong>Remote</strong>.</li>
43+
<li>Enter the IP address provided to you by your server administrator and click next.
44+
<ul>
45+
<li>This is usually the same IP address you use to connect in-game.</li>
46+
<li>For local servers, use <code>localhost</code>.</li>
47+
</ul>
48+
</li>
49+
<li>If you were provided a secret passphrase by the server administrator, enter it here. Otherwise, leave the default value of <code>crowdcontrol</code>. Click next.</li>
50+
<li>The checklist should now all have green checks.
51+
<ul>
52+
<li>If you are the server owner and are seeing Awaiting Connector or Connector Error, make sure the port 58431 is open on the server's firewall.
53+
If your server host only assigns random ports, make sure to specify that port in the config file at <code>&lt;root&gt;/plugins/CrowdControl/config.yml</code>.</li>
54+
</ul>
55+
</li>
56+
<li v-if="fabricAvailable || neoAvailable">
57+
(Optional) For extra effects and the best experience, install the client mod using the
58+
<NuxtLink v-if="fabricAvailable" :to="`/guide/fabric/client?v=${version.id}`">Fabric</NuxtLink>
59+
<span v-if="fabricAvailable && neoAvailable"> or </span>
60+
<NuxtLink v-if="neoAvailable" :to="`/guide/neoforge/client?v=${version.id}`">NeoForge</NuxtLink>
61+
Client Setup guide.
62+
</li>
63+
<li>Join the Minecraft server in your game.
64+
<ul>
65+
<li>This is usually the same IP address you use to connect in the app.</li>
66+
<li>For local servers, use <code>localhost</code>.</li>
67+
</ul>
68+
</li>
69+
<li>(Optional) If you're sharing effects with another streamer, run the command <code>/account link INSERT_USERNAME</code> to receive their effects. Use the username from the top left corner of the Crowd Control app.</li>
70+
<li>Click the <strong>Start Session</strong> button in the Crowd Control app.</li>
71+
<li>Open the <strong>Effect List</strong> in the Crowd Control app to test effects.</li>
72+
</ol>
73+
</div>
74+
</template>

website/pages/guide/fabric/client.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { useVersion } from '~/composables/useVersion'
33
import VersionWarning from '~/components/VersionWarning.vue'
44
import * as versions from '~/utils/versions'
5+
import JoinGuide from '~/components/JoinGuide.vue'
56
67
const versionData = useVersion(versions.fabricML)
78
const { version } = versionData
@@ -85,5 +86,7 @@ useSeoMeta({
8586
<li>Select <strong>Start Session</strong> in the Crowd Control app.</li>
8687
<li>Open the <strong>Effect Manager</strong> in the Crowd Control app to test effects.</li>
8788
</ol>
89+
90+
<JoinGuide embedded />
8891
</div>
8992
</template>

website/pages/guide/fabric/server/local.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useVersion } from '~/composables/useVersion'
33
import VersionWarning from '~/components/VersionWarning.vue'
44
import PortForward from '~/components/PortForward.vue'
55
import * as versions from '~/utils/versions'
6+
import JoinGuide from '~/components/JoinGuide.vue'
67
78
const versionData = useVersion(versions.fabricML)
89
const { version } = versionData
@@ -48,5 +49,7 @@ useSeoMeta({
4849
</p>
4950

5051
<p>For extra security, consider enabling a user whitelist using the vanilla <code>/whitelist</code> command. This prevents unknown players from joining the server and potentially griefing your builds.</p>
52+
53+
<JoinGuide embedded />
5154
</div>
5255
</template>

website/pages/guide/fabric/server/remote.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useVersion } from '~/composables/useVersion'
33
import VersionWarning from '~/components/VersionWarning.vue'
44
import PortInstructions from '~/components/PortInstructions.vue'
55
import * as versions from '~/utils/versions'
6+
import JoinGuide from '~/components/JoinGuide.vue'
67
78
const versionData = useVersion(versions.fabricML)
89
const { version } = versionData
@@ -58,5 +59,7 @@ useSeoMeta({
5859
This prevents unknown players from joining the server and potentially griefing your builds.
5960
Additionally, you can use permissions mods such as LuckPerms to restrict the <code>crowdcontrol.use</code> permission to trusted users.
6061
</p>
62+
63+
<JoinGuide embedded />
6164
</div>
6265
</template>

website/pages/guide/join.vue

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script setup lang="ts">
2+
import JoinGuide from '~/components/JoinGuide.vue'
23
import { useVersion } from '~/composables/useVersion'
34
import * as versions from '~/utils/versions'
45
@@ -10,69 +11,8 @@ useSeoMeta({
1011
description: `Tutorial on joining a Minecraft ${version.id} Crowd Control server`,
1112
ogDescription: `Tutorial on joining a Minecraft ${version.id} Crowd Control server`,
1213
})
13-
14-
const fabricAvailable = computed(() => versions.fabricML.versions.some(item => item.id === version.id))
15-
const neoAvailable = computed(() => versions.neoForgeML.versions.some(item => item.id === version.id))
1614
</script>
1715

1816
<template>
19-
<div>
20-
<h1>Joining an External {{ version.id }} Server</h1>
21-
22-
<p>The following steps are for streamers who are connecting to another individual's Minecraft {{ version.id }} Crowd Control server.</p>
23-
24-
<ol v-if="!version.legacy">
25-
<li>(Recommended) Download and install the <a href="https://crowdcontrol.live/">Crowd Control app</a> to be able to manage the cost of effects among other settings.</li>
26-
<li>(Optional) For extra effects and the best experience, install the client mod using the <NuxtLink :to="`/guide/fabric/client?v=${version.id}`">Fabric</NuxtLink> or <NuxtLink :to="`/guide/neoforge/client?v=${version.id}`">NeoForge</NuxtLink> Client Setup guide.</li>
27-
<li>Join the Minecraft server in your game using the IP address provided to you by your server administrator.
28-
<ul>
29-
<li>This is usually the same IP address you use to connect in-game.</li>
30-
<li>For local servers, use <code>localhost</code>.</li>
31-
</ul>
32-
</li>
33-
<li>Follow the instructions in the chat to link your Crowd Control account and start your session.</li>
34-
<li>Test some effects from the Interact Link shared in the chat to ensure everything is working.</li>
35-
</ol>
36-
<ol v-else>
37-
<li>Download and install the <a href="https://crowdcontrol.live/">Crowd Control app</a>.</li>
38-
<li>In the <strong>Game Selection</strong> tab, select <strong>Minecraft</strong>.</li>
39-
<li>Under <strong>Select a Pack</strong>, choose the last option <strong>Minecraft (Legacy)</strong>.
40-
<ul>
41-
<li>If you selected the wrong option, you can click on the blue button that says "Default" on the top of the app to re-open this menu.</li>
42-
</ul>
43-
</li>
44-
<li>Select <strong>Configure Minecraft</strong>.</li>
45-
<li>Enter your Minecraft username and click next.</li>
46-
<li>Select <strong>Remote</strong>.</li>
47-
<li>Enter the IP address provided to you by your server administrator and click next.
48-
<ul>
49-
<li>This is usually the same IP address you use to connect in-game.</li>
50-
<li>For local servers, use <code>localhost</code>.</li>
51-
</ul>
52-
</li>
53-
<li>If you were provided a secret passphrase by the server administrator, enter it here. Otherwise, leave the default value of <code>crowdcontrol</code>. Click next.</li>
54-
<li>The checklist should now all have green checks.
55-
<ul>
56-
<li>If you are the server owner and are seeing Awaiting Connector or Connector Error, make sure the port 58431 is open on the server's firewall.
57-
If your server host only assigns random ports, make sure to specify that port in the config file at <code>&lt;root&gt;/plugins/CrowdControl/config.yml</code>.</li>
58-
</ul>
59-
</li>
60-
<li v-if="fabricAvailable || neoAvailable">
61-
(Optional) For extra effects and the best experience, install the client mod using the
62-
<NuxtLink v-if="fabricAvailable" :to="`/guide/fabric/client?v=${version.id}`">Fabric</NuxtLink>
63-
<span v-if="fabricAvailable && neoAvailable"> or </span>
64-
<NuxtLink v-if="neoAvailable" :to="`/guide/neoforge/client?v=${version.id}`">NeoForge</NuxtLink>
65-
Client Setup guide.
66-
</li>
67-
<li>Join the Minecraft server in your game.
68-
<ul>
69-
<li>This is usually the same IP address you use to connect in the app.</li>
70-
<li>For local servers, use <code>localhost</code>.</li>
71-
</ul>
72-
</li>
73-
<li>(Optional) If you're sharing effects with another streamer, run the command <code>/account link INSERT_USERNAME</code> to receive their effects. Use the username from the top left corner of the Crowd Control app.</li>
74-
<li>Click the <strong>Start Session</strong> button in the Crowd Control app.</li>
75-
<li>Open the <strong>Effect List</strong> in the Crowd Control app to test effects.</li>
76-
</ol>
77-
</div>
17+
<JoinGuide />
7818
</template>

website/pages/guide/neoforge/client.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { useVersion } from '~/composables/useVersion'
33
import VersionWarning from '~/components/VersionWarning.vue'
44
import * as versions from '~/utils/versions'
5+
import JoinGuide from '~/components/JoinGuide.vue'
56
67
const versionData = useVersion(versions.neoForgeML)
78
const { version } = versionData
@@ -84,5 +85,7 @@ useSeoMeta({
8485
<li>Select <strong>Start Session</strong> in the Crowd Control app.</li>
8586
<li>Open the <strong>Effect Manager</strong> in the Crowd Control app to test effects.</li>
8687
</ol>
88+
89+
<JoinGuide embedded />
8790
</div>
8891
</template>

website/pages/guide/neoforge/server/local.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script setup lang="ts">
2+
import JoinGuide from '~/components/JoinGuide.vue';
23
import * as versions from '../../../../utils/versions'
34
import PortForward from '~/components/PortForward.vue';
45
import VersionWarning from '~/components/VersionWarning.vue';
@@ -51,5 +52,7 @@ useSeoMeta({
5152
</p>
5253

5354
<p>For extra security, consider enabling a user whitelist using the vanilla <code>/whitelist</code> command. This prevents unknown players from joining the server and potentially griefing your builds.</p>
55+
56+
<JoinGuide embedded />
5457
</div>
5558
</template>

0 commit comments

Comments
 (0)