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

docs: 添加 "在服务端运行仅客户端模组" #235

Merged
merged 2 commits into from
Mar 2, 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
4 changes: 2 additions & 2 deletions docs/.vitepress/analyzers/mcla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
} from "./mcla.api"
export * from "./mcla.api"

const VERSION = "v0.4.23"
const VERSION = "v0.5.0"
// const VERSION = "dev"
const RESOURCES_BASE = "https://globemc.github.io/mcla"
const GO_WASM_EXEC_URL = useCDN(`${RESOURCES_BASE}/${VERSION}/wasm_exec.js`)
Expand Down Expand Up @@ -226,7 +226,7 @@ async function loadMCLA(loadProgress?: Ref<number>): Promise<MCLAAPI> {

console.log("Loading MCLA ...")

await import(GO_WASM_EXEC_URL /* @vite-ignore */) // set variable `window.Go`
await import(/* @vite-ignore */ GO_WASM_EXEC_URL) // set variable `window.Go`

const go = new (window as any as containsGoCls).Go()
var res
Expand Down
5 changes: 4 additions & 1 deletion docs/.vitepress/theme/components/Analyzer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,9 @@ onUnmounted(() => {
匹配度: {{ match.match * 100 }}%
</span>
</h5>
<code class="result-parsed-error">
{{ match.desc.message }}
</code>
<div v-for="(sol, n) in match.desc.solutions" :key="n">
<div v-if="sol.ok">
<details :open="false">
Expand All @@ -1159,7 +1162,7 @@ onUnmounted(() => {
</div>
<div>
<b>解决方案: </b>
<a @click.prevent="redirectTo(sol.res.link_to, true)">
<a target="_blank" :href="sol.res.link_to">
打开文档 <OpenTabIcon />
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/workers/mcla.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async function setup(data: SetupData) {
)

console.debug(`Loading MCLA from ${data.wasm_url} ...`)
await import(data.wasm_exec /* @vite-ignore */) // set variable `globalThis.Go`
await import(/* @vite-ignore */ data.wasm_exec) // set variable `globalThis.Go`
const go = new globalThis.Go()
var res
if (WebAssembly.instantiateStreaming) {
Expand Down
16 changes: 16 additions & 0 deletions docs/server/mods.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Mod 问题

## 在服务端运行仅客户端模组

解决方案:移除日志中指示的 Mod。例如下方的情况应该移除 distanthorizons。

```
[net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Failed to create mod instance. ModID: distanthorizons, class com.seibel.distanthorizons.forge.ForgeMain
```

关键词:

```
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER

java.lang.NoClassDefFoundError: net/minecraft/client/Minecraft
```

## Fabric

### 模组问题
Expand Down
Loading