Skip to content

Commit

Permalink
docs: 添加 "在服务端运行仅客户端模组" (#235)
Browse files Browse the repository at this point in the history
- fix serval issue about analyzer, and bump MCLA to v0.5.0
- docs: add 在服务端运行仅客户端模组 close #231
  • Loading branch information
zyxkad authored Mar 2, 2024
2 parents dff07e6 + f7c4848 commit 41efff7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
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

0 comments on commit 41efff7

Please sign in to comment.