cortico 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +47 -0
- package/package.json +43 -0
- package/src/boot.ts +46 -0
- package/src/bot.ts +1342 -0
- package/src/config-file.ts +41 -0
- package/src/core/README.md +92 -0
- package/src/core/billing.ts +26 -0
- package/src/core/blobs.ts +106 -0
- package/src/core/bus.ts +311 -0
- package/src/core/config-schema.ts +201 -0
- package/src/core/config.ts +262 -0
- package/src/core/core.ts +699 -0
- package/src/core/cost.ts +244 -0
- package/src/core/event-store.ts +304 -0
- package/src/core/fork.ts +113 -0
- package/src/core/generation.ts +118 -0
- package/src/core/instance-lock.ts +215 -0
- package/src/core/ipc-logger.ts +105 -0
- package/src/core/language.ts +62 -0
- package/src/core/log-context.ts +38 -0
- package/src/core/loop.ts +1858 -0
- package/src/core/markers.ts +48 -0
- package/src/core/prefix.ts +121 -0
- package/src/core/run.ts +95 -0
- package/src/core/secrets.ts +18 -0
- package/src/core/session.ts +56 -0
- package/src/core/sessions.ts +261 -0
- package/src/core/state.ts +104 -0
- package/src/core/template.ts +72 -0
- package/src/core/timers.ts +129 -0
- package/src/core/tool-log.ts +135 -0
- package/src/core/transcript.ts +92 -0
- package/src/core/truncate.ts +121 -0
- package/src/core/types.ts +1140 -0
- package/src/core/usage-log.ts +79 -0
- package/src/core/util.ts +386 -0
- package/src/deploy-listing.ts +160 -0
- package/src/deploy.ts +162 -0
- package/src/extensions/README.md +72 -0
- package/src/extensions/dry-mount.ts +390 -0
- package/src/extensions/manifest.ts +153 -0
- package/src/extensions/runtime.ts +42 -0
- package/src/extensions.ts +519 -0
- package/src/launcher.ts +285 -0
- package/src/paths.ts +155 -0
- package/src/protocol/open-responses/LICENSE +201 -0
- package/src/protocol/open-responses/README.md +14 -0
- package/src/protocol/open-responses/context-helpers.ts +27 -0
- package/src/protocol/open-responses/context-log.ts +59 -0
- package/src/protocol/open-responses/context.ts +89 -0
- package/src/protocol/open-responses/generated.ts +115 -0
- package/src/protocol/open-responses/index.ts +33 -0
- package/src/protocol/open-responses/openapi.json +4230 -0
- package/src/protocol/open-responses/stream.ts +146 -0
- package/src/protocol/open-responses/tokens.ts +31 -0
- package/src/providers/README.md +86 -0
- package/src/providers/base.ts +111 -0
- package/src/providers/configuration.ts +97 -0
- package/src/providers/console/config.ts +21 -0
- package/src/providers/console/settings.ts +443 -0
- package/src/providers/console/strings.ts +74 -0
- package/src/providers/console/types.ts +11 -0
- package/src/providers/llamacpp/archive.ts +148 -0
- package/src/providers/llamacpp/catalog.ts +247 -0
- package/src/providers/llamacpp/config.ts +36 -0
- package/src/providers/llamacpp/console/client.ts +6 -0
- package/src/providers/llamacpp/console/models-panel.ts +120 -0
- package/src/providers/llamacpp/console/runtime-panel.ts +173 -0
- package/src/providers/llamacpp/console/server.ts +153 -0
- package/src/providers/llamacpp/index.ts +95 -0
- package/src/providers/llamacpp/native.ts +51 -0
- package/src/providers/llamacpp/options.ts +117 -0
- package/src/providers/llamacpp/runtime-store.ts +139 -0
- package/src/providers/llamacpp/runtime.ts +214 -0
- package/src/providers/llamacpp/server.ts +286 -0
- package/src/providers/llamacpp/strings.ts +230 -0
- package/src/providers/openai-responses-compat/config.ts +20 -0
- package/src/providers/openai-responses-compat/index.ts +89 -0
- package/src/providers/openai-responses-compat/native.ts +127 -0
- package/src/providers/openai-responses-compat/strings.ts +19 -0
- package/src/providers/pricebook.ts +75 -0
- package/src/providers/registry.ts +137 -0
- package/src/providers/strings.ts +71 -0
- package/src/providers/transport/chat.ts +156 -0
- package/src/providers/transport/errors.ts +48 -0
- package/src/providers/transport/history.ts +68 -0
- package/src/providers/transport/native-input.ts +83 -0
- package/src/providers/transport/native-types.ts +13 -0
- package/src/providers/transport/response-assembly.ts +191 -0
- package/src/providers/transport/response-http.ts +196 -0
- package/src/providers/transport/response-meters.ts +27 -0
- package/src/providers/transport/responses-input.ts +56 -0
- package/src/web/README.md +84 -0
- package/src/web/client/console-pages/builtins/llm-settings/panel.ts +625 -0
- package/src/web/client/console-pages/builtins/llm-settings/pricing-panel.ts +168 -0
- package/src/web/client/console-pages/builtins/llm-settings/strings.ts +213 -0
- package/src/web/client/console-pages/builtins.ts +10 -0
- package/src/web/client/console-pages/context.ts +135 -0
- package/src/web/client/console-pages/host.ts +633 -0
- package/src/web/client/console-pages/loader.ts +132 -0
- package/src/web/client/console-pages/strings.ts +90 -0
- package/src/web/client/console-pages/tools/strings.ts +49 -0
- package/src/web/client/console-pages/tools/view.ts +215 -0
- package/src/web/client/core/api.ts +200 -0
- package/src/web/client/core/language.ts +56 -0
- package/src/web/client/core/lifecycle.ts +132 -0
- package/src/web/client/core/router.ts +199 -0
- package/src/web/client/core/stream.ts +157 -0
- package/src/web/client/core/websocket.ts +82 -0
- package/src/web/client/features/appearance/index.ts +333 -0
- package/src/web/client/features/appearance/strings.ts +87 -0
- package/src/web/client/features/config/index.ts +11 -0
- package/src/web/client/features/config/strings.ts +41 -0
- package/src/web/client/features/config/view.ts +428 -0
- package/src/web/client/features/core/events.ts +197 -0
- package/src/web/client/features/core/index.ts +254 -0
- package/src/web/client/features/core/run.ts +56 -0
- package/src/web/client/features/core/runlog.ts +214 -0
- package/src/web/client/features/core/sessions.ts +53 -0
- package/src/web/client/features/core/strings.ts +157 -0
- package/src/web/client/features/extensions/index.ts +422 -0
- package/src/web/client/features/extensions/strings.ts +164 -0
- package/src/web/client/features/feature.ts +93 -0
- package/src/web/client/features/live/context.ts +280 -0
- package/src/web/client/features/live/fork.ts +156 -0
- package/src/web/client/features/live/index.ts +392 -0
- package/src/web/client/features/live/onboarding.ts +113 -0
- package/src/web/client/features/live/protocol.ts +122 -0
- package/src/web/client/features/live/sessions.ts +71 -0
- package/src/web/client/features/live/status.ts +68 -0
- package/src/web/client/features/live/strings.ts +252 -0
- package/src/web/client/features/live/timeline.ts +590 -0
- package/src/web/client/features/prompts/editor.ts +292 -0
- package/src/web/client/features/prompts/index.ts +346 -0
- package/src/web/client/features/prompts/strings.ts +136 -0
- package/src/web/client/features/prompts/view.ts +256 -0
- package/src/web/client/features/providers/index.ts +100 -0
- package/src/web/client/features/providers/strings.ts +23 -0
- package/src/web/client/features/settings/general.ts +28 -0
- package/src/web/client/features/settings/index.ts +82 -0
- package/src/web/client/features/settings/strings.ts +33 -0
- package/src/web/client/features/storage/index.ts +1 -0
- package/src/web/client/features/storage/strings.ts +45 -0
- package/src/web/client/features/storage/view.ts +154 -0
- package/src/web/client/features/usage/chart.ts +486 -0
- package/src/web/client/features/usage/index.ts +407 -0
- package/src/web/client/features/usage/labels.ts +46 -0
- package/src/web/client/features/usage/range.ts +36 -0
- package/src/web/client/features/usage/state.ts +37 -0
- package/src/web/client/features/usage/strings.ts +191 -0
- package/src/web/client/features/usage/tooltip.ts +86 -0
- package/src/web/client/features/usage/types.ts +96 -0
- package/src/web/client/features/worlds/index.ts +424 -0
- package/src/web/client/features/worlds/strings.ts +121 -0
- package/src/web/client/main.ts +273 -0
- package/src/web/client/shell/avatar.ts +233 -0
- package/src/web/client/shell/index.ts +549 -0
- package/src/web/client/shell/strings.ts +89 -0
- package/src/web/client/theme/handoff.ts +43 -0
- package/src/web/client/theme/palette.ts +109 -0
- package/src/web/client/theme/registry.ts +130 -0
- package/src/web/client/theme/storage.ts +72 -0
- package/src/web/client/theme/strings.ts +123 -0
- package/src/web/client/theme/studio.ts +366 -0
- package/src/web/client/ui/actions.ts +109 -0
- package/src/web/client/ui/data.ts +185 -0
- package/src/web/client/ui/dom.ts +23 -0
- package/src/web/client/ui/fields.ts +191 -0
- package/src/web/client/ui/format.ts +75 -0
- package/src/web/client/ui/icons.ts +183 -0
- package/src/web/client/ui/images.ts +91 -0
- package/src/web/client/ui/index.ts +89 -0
- package/src/web/client/ui/lamp.ts +125 -0
- package/src/web/client/ui/log.ts +98 -0
- package/src/web/client/ui/overlay.ts +184 -0
- package/src/web/client/ui/page.ts +8 -0
- package/src/web/client/ui/prompt-input.tsx +311 -0
- package/src/web/client/ui/sheet.ts +131 -0
- package/src/web/client/ui/strings.ts +71 -0
- package/src/web/console-pages.ts +367 -0
- package/src/web/files.ts +107 -0
- package/src/web/path-picker.ts +296 -0
- package/src/web/public/index.html +17 -0
- package/src/web/public/styles.css +1715 -0
- package/src/web/server.ts +1883 -0
- package/src/web/shared/client-panel.ts +603 -0
- package/src/web/shared/console-protocol.ts +560 -0
- package/src/web/shared/css.d.ts +1 -0
- package/src/web/shared/path-picker.ts +23 -0
- package/src/web/shared/theme.ts +256 -0
- package/src/web/theme-store.ts +37 -0
- package/src/world.ts +449 -0
- package/src/worlds/bilibili/ENV_PROMPT.md +5 -0
- package/src/worlds/bilibili/README.md +176 -0
- package/src/worlds/bilibili/audience-admission.ts +995 -0
- package/src/worlds/bilibili/client.ts +528 -0
- package/src/worlds/bilibili/coalescing-buffer.ts +125 -0
- package/src/worlds/bilibili/config.ts +185 -0
- package/src/worlds/bilibili/console/client.ts +202 -0
- package/src/worlds/bilibili/definition.ts +35 -0
- package/src/worlds/bilibili/gift-frame.ts +131 -0
- package/src/worlds/bilibili/normalize.ts +452 -0
- package/src/worlds/bilibili/overlay/announcement.ts +76 -0
- package/src/worlds/bilibili/overlay/assets.ts +82 -0
- package/src/worlds/bilibili/overlay/model.ts +494 -0
- package/src/worlds/bilibili/overlay/project.ts +202 -0
- package/src/worlds/bilibili/overlay/server.ts +286 -0
- package/src/worlds/bilibili/overlay/types.ts +217 -0
- package/src/worlds/bilibili/overlay/web/app.js +690 -0
- package/src/worlds/bilibili/overlay/web/editor.css +297 -0
- package/src/worlds/bilibili/overlay/web/editor.html +102 -0
- package/src/worlds/bilibili/overlay/web/editor.js +2116 -0
- package/src/worlds/bilibili/overlay/web/overlay.html +13 -0
- package/src/worlds/bilibili/overlay/web/styles.css +258 -0
- package/src/worlds/bilibili/protobuf.ts +123 -0
- package/src/worlds/bilibili/wire.ts +94 -0
- package/src/worlds/bilibili/world.ts +1389 -0
- package/src/worlds/console-fixture/ENV_PROMPT.md +1 -0
- package/src/worlds/console-fixture/console/client.ts +72 -0
- package/src/worlds/console-fixture/world.ts +73 -0
- package/src/worlds/index.ts +15 -0
- package/src/worlds/minecraft/ENV_PROMPT.md +32 -0
- package/src/worlds/minecraft/ENV_PROMPT_CAMERA.md +2 -0
- package/src/worlds/minecraft/LICENSE-mineflayer-pathfinder.txt +21 -0
- package/src/worlds/minecraft/README.md +917 -0
- package/src/worlds/minecraft/blueprint-plan.ts +915 -0
- package/src/worlds/minecraft/blueprint-registry.ts +566 -0
- package/src/worlds/minecraft/blueprint-repair.ts +236 -0
- package/src/worlds/minecraft/blueprint-resource.ts +272 -0
- package/src/worlds/minecraft/blueprint.ts +492 -0
- package/src/worlds/minecraft/body-lease.ts +340 -0
- package/src/worlds/minecraft/bridge.ts +749 -0
- package/src/worlds/minecraft/check.ts +651 -0
- package/src/worlds/minecraft/chests.ts +292 -0
- package/src/worlds/minecraft/client-launch.ts +272 -0
- package/src/worlds/minecraft/client-options.ts +85 -0
- package/src/worlds/minecraft/client-skins.ts +164 -0
- package/src/worlds/minecraft/client-window.ps1 +91 -0
- package/src/worlds/minecraft/client.ts +423 -0
- package/src/worlds/minecraft/combat-context.ts +109 -0
- package/src/worlds/minecraft/combat.ts +1552 -0
- package/src/worlds/minecraft/config.ts +499 -0
- package/src/worlds/minecraft/console/access.ts +218 -0
- package/src/worlds/minecraft/console/client.ts +244 -0
- package/src/worlds/minecraft/console/log.ts +110 -0
- package/src/worlds/minecraft/console/mount.ts +420 -0
- package/src/worlds/minecraft/console/skin.ts +257 -0
- package/src/worlds/minecraft/console/style.css +154 -0
- package/src/worlds/minecraft/console/world.ts +449 -0
- package/src/worlds/minecraft/deaths.ts +135 -0
- package/src/worlds/minecraft/definition.ts +18 -0
- package/src/worlds/minecraft/engine-child.ts +274 -0
- package/src/worlds/minecraft/engine-ipc.ts +98 -0
- package/src/worlds/minecraft/entity-facts.ts +132 -0
- package/src/worlds/minecraft/escape.ts +407 -0
- package/src/worlds/minecraft/executor.ts +14494 -0
- package/src/worlds/minecraft/explored.ts +156 -0
- package/src/worlds/minecraft/geometry.ts +205 -0
- package/src/worlds/minecraft/goal-plan.ts +647 -0
- package/src/worlds/minecraft/item-break.ts +126 -0
- package/src/worlds/minecraft/item-facts.ts +146 -0
- package/src/worlds/minecraft/item-pick.ts +67 -0
- package/src/worlds/minecraft/level-dat.ts +176 -0
- package/src/worlds/minecraft/log.ts +132 -0
- package/src/worlds/minecraft/mineflayer-fixes.ts +1180 -0
- package/src/worlds/minecraft/names.ts +377 -0
- package/src/worlds/minecraft/pathfinder-lib.d.ts +13 -0
- package/src/worlds/minecraft/pathfinder-perf.ts +796 -0
- package/src/worlds/minecraft/piglin.ts +49 -0
- package/src/worlds/minecraft/policy.ts +547 -0
- package/src/worlds/minecraft/precheck.ts +655 -0
- package/src/worlds/minecraft/proxy.ts +445 -0
- package/src/worlds/minecraft/ranged.ts +635 -0
- package/src/worlds/minecraft/readouts.ts +102 -0
- package/src/worlds/minecraft/round.ts +26 -0
- package/src/worlds/minecraft/search-observation.ts +92 -0
- package/src/worlds/minecraft/server-config.ts +467 -0
- package/src/worlds/minecraft/server.ts +658 -0
- package/src/worlds/minecraft/show.ts +84 -0
- package/src/worlds/minecraft/skills.ts +1763 -0
- package/src/worlds/minecraft/terrain.ts +1735 -0
- package/src/worlds/minecraft/window.ts +96 -0
- package/src/worlds/minecraft/works.ts +179 -0
- package/src/worlds/minecraft/world.ts +6438 -0
- package/src/worlds/qq/ENV_PROMPT.md +5 -0
- package/src/worlds/qq/config.ts +108 -0
- package/src/worlds/qq/console/client.ts +126 -0
- package/src/worlds/qq/console/events.ts +155 -0
- package/src/worlds/qq/console/gate.ts +232 -0
- package/src/worlds/qq/console/roster.ts +203 -0
- package/src/worlds/qq/console/style.css +65 -0
- package/src/worlds/qq/conversation.ts +28 -0
- package/src/worlds/qq/definition.ts +62 -0
- package/src/worlds/qq/driver.ts +375 -0
- package/src/worlds/qq/history-tools.ts +209 -0
- package/src/worlds/qq/normalize.ts +323 -0
- package/src/worlds/qq/qface-map.ts +282 -0
- package/src/worlds/qq/vision-prompt.ts +27 -0
- package/src/worlds/qq/vision.ts +642 -0
- package/src/worlds/qq/vlm.ts +142 -0
- package/src/worlds/qq/world.ts +1503 -0
- package/src/worlds/terminal/ENV_PROMPT.md +11 -0
- package/src/worlds/terminal/config.ts +9 -0
- package/src/worlds/terminal/definition.ts +14 -0
- package/src/worlds/terminal/world.ts +700 -0
- package/src/worlds/websearch/ENV_PROMPT.md +1 -0
- package/src/worlds/websearch/brave-client.ts +261 -0
- package/src/worlds/websearch/config.ts +75 -0
- package/src/worlds/websearch/definition.ts +20 -0
- package/src/worlds/websearch/world.ts +171 -0
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
import type { ConfigGroup } from '../../core/types.ts';
|
|
2
|
+
|
|
3
|
+
export const MINECRAFT_DEFAULTS = {
|
|
4
|
+
// enabled 由Persona的装配层显式开启。
|
|
5
|
+
enabled: false,
|
|
6
|
+
/** 服务器地址(私服 dry-run 默认本机) */
|
|
7
|
+
host: '127.0.0.1',
|
|
8
|
+
port: 25565,
|
|
9
|
+
/** 游戏内用户名(offline 模式直接生效) */
|
|
10
|
+
username: 'corti',
|
|
11
|
+
/**
|
|
12
|
+
* 全链路的版本约定:服务器(Paper)、观察者客户端(Fabric+SpectatorPlus)、
|
|
13
|
+
* mineflayer 协议必须使用同一版本。1.20.6 是 SpectatorPlus(观察者附身时补渲
|
|
14
|
+
* HUD/手臂/手持)客户端模组支持的 1.20.x 最高版;1.20.5+ 需要 Java 21。
|
|
15
|
+
*/
|
|
16
|
+
version: '1.20.6',
|
|
17
|
+
/** prismarine-viewer 网页端口(OBS 浏览器源 + 画面源之一);0=不开 */
|
|
18
|
+
viewerPort: 7792,
|
|
19
|
+
/** 控制台一键启停的本地服务器(空 = 未配置,按钮会提示去配置) */
|
|
20
|
+
local: {
|
|
21
|
+
/** 受管本地服务器与 bot 连接的持久化总开关。 */
|
|
22
|
+
serverEnabled: false,
|
|
23
|
+
/** 含 server.jar 的目录 */
|
|
24
|
+
serverDir: '',
|
|
25
|
+
/** java 路径;空 = 自动(serverDir 邻近 jdk → PATH) */
|
|
26
|
+
javaPath: '',
|
|
27
|
+
/** 服务器 JVM 参数 */
|
|
28
|
+
jvmArgs: '-Xms1G -Xmx2G',
|
|
29
|
+
/**
|
|
30
|
+
* 作弊权限:托管启动服务器前把她、摄像机、玩家三个名字补进 ops.json(4 级)。
|
|
31
|
+
* 专用服没有单人存档那个「开作弊」开关,能不能下 /tp、/gamemode 全看这份名单。
|
|
32
|
+
* 关掉则只按名单现状来(既不补也不删),名单本身在「权限与作弊」面板里改。
|
|
33
|
+
*/
|
|
34
|
+
cheats: true,
|
|
35
|
+
},
|
|
36
|
+
world: {
|
|
37
|
+
/** 世界变化节流 tick(秒) */
|
|
38
|
+
tickSec: 8,
|
|
39
|
+
/** 位移超过多少格才值得说 */
|
|
40
|
+
moveThreshold: 12,
|
|
41
|
+
/** 世界快照进上下文的最短间隔(秒)。快照是投递成文事件:搭车走,发车刻现拿 */
|
|
42
|
+
snapshotSec: 10,
|
|
43
|
+
/** 分段去重下强制发一次全量快照的间隔(秒),给增量流的基线兜底 */
|
|
44
|
+
snapshotAnchorSec: 600,
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* 寻路垫脚/搭路可用的方块,顺序即优先级。列表外的方块寻路器不会当垫脚用——
|
|
48
|
+
* 圆石等兼作合成材料的方块,不想被路上消耗就从这里拿掉。
|
|
49
|
+
*/
|
|
50
|
+
scaffoldBlocks: ['dirt', 'cobblestone'],
|
|
51
|
+
/** 受理时报告前置试算的否定结果,出队时重查并阻断 hard;关闭后不执行这两次试算。 */
|
|
52
|
+
precheck: true,
|
|
53
|
+
/** 受理回执附上相同任务的上次终态。 */
|
|
54
|
+
priorOutcome: true,
|
|
55
|
+
reflex: {
|
|
56
|
+
/** 受击反击 */
|
|
57
|
+
fightBack: true,
|
|
58
|
+
/** 生命低于此值就脱离战斗;不还手也照样跑 */
|
|
59
|
+
fleeHealth: 10,
|
|
60
|
+
/** 两次受击反应的最短间隔 */
|
|
61
|
+
reactCooldownSec: 8,
|
|
62
|
+
antiDrown: true,
|
|
63
|
+
/**
|
|
64
|
+
* 挨烧就跑。这一条不能交给主脑:岩浆浇脸、蹭到流动岩浆柱都是环境自己找上门,
|
|
65
|
+
* 20 血在岩浆里只够活两秒半,等她下一轮想明白再动人已经烧没了。挖掘绕开岩浆
|
|
66
|
+
* 是预防,预防挡不住被浇的那种。
|
|
67
|
+
*/
|
|
68
|
+
antiLava: true,
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* 被打或敌对进入 engageRadius 时,按策略及血线决定交战;沿用 reflex.fleeHealth。
|
|
72
|
+
* 战斗期间挂起任务,结束后从断点恢复,事件照常投递。关闭后受击交回反射层。
|
|
73
|
+
*/
|
|
74
|
+
combat: {
|
|
75
|
+
enabled: true,
|
|
76
|
+
/** 触发半径:敌对贴到这么近才动手 */
|
|
77
|
+
engageRadius: 3,
|
|
78
|
+
/** 追击上限(格) */
|
|
79
|
+
chaseMax: 6,
|
|
80
|
+
/** E3 硬时长闸(秒):到点强制交还,防止刷怪笼/夜晚开阔地"永久失声" */
|
|
81
|
+
maxSec: 30,
|
|
82
|
+
/**
|
|
83
|
+
* 理想间距(格)。僵尸有效攻击距离 p99=2.40、玩家上限 3.0,安全带宽约 0.6:
|
|
84
|
+
* 2.88 几乎无敌(台架值),2.6 会偶尔挨打、看起来像个会玩的人——这是观感旋钮
|
|
85
|
+
*/
|
|
86
|
+
space: 2.6,
|
|
87
|
+
/** E4:5 分钟滑窗里战斗时长占比超过此百分数就强制冷却 */
|
|
88
|
+
busyRatio: 60,
|
|
89
|
+
/** E4 触发后多少秒内不自动进场 */
|
|
90
|
+
cooldownSec: 60,
|
|
91
|
+
},
|
|
92
|
+
/** 观察者客户端:真客户端 + 观察者模式跟着 bot,支持光影/模组 */
|
|
93
|
+
client: {
|
|
94
|
+
enabled: false,
|
|
95
|
+
/** .minecraft 目录 */
|
|
96
|
+
gameDir: '',
|
|
97
|
+
/** versions/ 下的版本 id;空 = 目录里唯一那个(装了 Fabric/Iris 就填那个整合版 id) */
|
|
98
|
+
versionId: '',
|
|
99
|
+
/**
|
|
100
|
+
* java 路径;空 = PATH 上的 java。版本要与游戏对上:1.20.6 用 Java 21。
|
|
101
|
+
* 更高的 JDK 会让游戏自带的 LWJGL 3.3.3 认不出 JNI 版本(启动日志里有
|
|
102
|
+
* Unsupported JNI version 警告),之后随机原生崩溃。
|
|
103
|
+
*/
|
|
104
|
+
javaPath: '',
|
|
105
|
+
jvmArgs: '-Xmx4G',
|
|
106
|
+
/** 摄像机账号名(必须与 bot 的名字不同) */
|
|
107
|
+
username: 'CortiCam',
|
|
108
|
+
width: 1280,
|
|
109
|
+
height: 720,
|
|
110
|
+
/** 启动即直连服务器(1.20+ 走 quickPlay,更早走 --server/--port) */
|
|
111
|
+
autoJoin: true,
|
|
112
|
+
/** 自动把摄像机切观察者模式并附身到 bot */
|
|
113
|
+
autoSpectate: true,
|
|
114
|
+
/** 周期性重下 spectate 指令(bot 死亡/重连会掉);0=只在事件点下 */
|
|
115
|
+
resyncSec: 30,
|
|
116
|
+
/** 摄像机进程崩了自动重启的上限(10 分钟窗口内);0=不重启 */
|
|
117
|
+
restartMax: 3,
|
|
118
|
+
/**
|
|
119
|
+
* 启动前调整该游戏目录的设置:options.txt(失焦不暂停、跳引导屏、主音量拉满)
|
|
120
|
+
* 与 SpectatorPlus 的 client.json(openScreens 按 syncGui 写)
|
|
121
|
+
*/
|
|
122
|
+
noPauseOnLostFocus: true,
|
|
123
|
+
/** GUI 演出:bot 开箱子/合成/熔炉时把那张界面同步到摄像机画面上(重启客户端生效) */
|
|
124
|
+
syncGui: true,
|
|
125
|
+
},
|
|
126
|
+
/** 演出节拍:同步 GUI 开着时把容器操作放慢到人手速度;预算封顶防慢动作长镜头 */
|
|
127
|
+
show: {
|
|
128
|
+
clickMs: 200,
|
|
129
|
+
dwellOpenMs: 400,
|
|
130
|
+
dwellResultMs: 600,
|
|
131
|
+
dwellCloseMs: 300,
|
|
132
|
+
reopenGapMs: 600,
|
|
133
|
+
budgetMs: 6000,
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* 玩家客户端:以普通玩家身份再开一份客户端进同一个服务器,人跟她一起玩。
|
|
137
|
+
* 与观察者摄像机是两份进程、两个账号名,谁都不影响谁。
|
|
138
|
+
*/
|
|
139
|
+
player: {
|
|
140
|
+
/** 开着则 World 启动时一并拉起;关着也能在挂载面板里手动启停 */
|
|
141
|
+
enabled: false,
|
|
142
|
+
/** 玩家账号名(离线),必须与 bot 和摄像机都不同 */
|
|
143
|
+
username: 'Player',
|
|
144
|
+
/** .minecraft 目录;空 = 用观察者客户端那一份 */
|
|
145
|
+
gameDir: '',
|
|
146
|
+
/** versions/ 下的版本 id;空 = 目录里唯一那个 */
|
|
147
|
+
versionId: '',
|
|
148
|
+
/** java 路径;空 = 用观察者客户端那一份 */
|
|
149
|
+
javaPath: '',
|
|
150
|
+
jvmArgs: '-Xmx4G',
|
|
151
|
+
width: 1280,
|
|
152
|
+
height: 720,
|
|
153
|
+
/** 启动即直连服务器;关掉就停在主菜单自己进 */
|
|
154
|
+
autoJoin: true,
|
|
155
|
+
/** 进服后把这个玩家传送到 bot 旁边(服务器控制台优先,退回 bot 的 op 指令) */
|
|
156
|
+
teleportToBot: true,
|
|
157
|
+
},
|
|
158
|
+
} as const;
|
|
159
|
+
|
|
160
|
+
export interface MinecraftConfigSection {
|
|
161
|
+
enabled: boolean;
|
|
162
|
+
host: string;
|
|
163
|
+
port: number;
|
|
164
|
+
username: string;
|
|
165
|
+
version: string;
|
|
166
|
+
viewerPort: number;
|
|
167
|
+
local: {
|
|
168
|
+
serverEnabled: boolean;
|
|
169
|
+
serverDir: string;
|
|
170
|
+
javaPath: string;
|
|
171
|
+
jvmArgs: string;
|
|
172
|
+
cheats: boolean;
|
|
173
|
+
};
|
|
174
|
+
world: { tickSec: number; moveThreshold: number; snapshotSec: number; snapshotAnchorSec: number };
|
|
175
|
+
/** 寻路垫脚方块名单,顺序即优先级;列表外的不当垫脚用 */
|
|
176
|
+
scaffoldBlocks: readonly string[];
|
|
177
|
+
/** 前置试算:受理时报告否定,出队时阻断 hard;默认开启。 */
|
|
178
|
+
precheck: boolean;
|
|
179
|
+
/** 受理回执附相同任务的上次终态;默认开启。 */
|
|
180
|
+
priorOutcome: boolean;
|
|
181
|
+
reflex: {
|
|
182
|
+
fightBack: boolean; fleeHealth: number;
|
|
183
|
+
reactCooldownSec: number; antiDrown: boolean; antiLava: boolean;
|
|
184
|
+
};
|
|
185
|
+
combat: {
|
|
186
|
+
enabled: boolean; engageRadius: number; chaseMax: number; maxSec: number;
|
|
187
|
+
space: number; busyRatio: number; cooldownSec: number;
|
|
188
|
+
};
|
|
189
|
+
client: {
|
|
190
|
+
enabled: boolean; gameDir: string; versionId: string; javaPath: string; jvmArgs: string;
|
|
191
|
+
username: string; width: number; height: number;
|
|
192
|
+
autoJoin: boolean; autoSpectate: boolean; resyncSec: number; restartMax: number;
|
|
193
|
+
noPauseOnLostFocus: boolean; syncGui: boolean;
|
|
194
|
+
};
|
|
195
|
+
/** 容器操作的 GUI 演出节拍(摄像机开着且 syncGui 开着时生效) */
|
|
196
|
+
show: {
|
|
197
|
+
clickMs: number; dwellOpenMs: number; dwellResultMs: number;
|
|
198
|
+
dwellCloseMs: number; budgetMs: number; reopenGapMs: number;
|
|
199
|
+
};
|
|
200
|
+
player: {
|
|
201
|
+
enabled: boolean; username: string; gameDir: string; versionId: string; javaPath: string;
|
|
202
|
+
jvmArgs: string; width: number; height: number; autoJoin: boolean; teleportToBot: boolean;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* java 路径旋钮的选择器过滤。只有 Windows 的 java 带 `.exe`;在别的平台上按这个后缀过滤,
|
|
208
|
+
* `/usr/bin/java` 会被对话框挡在外面(见 web/path-picker.ts 的 validatePickedPath)。
|
|
209
|
+
*/
|
|
210
|
+
const JAVA_PATH_PICKER = process.platform === 'win32'
|
|
211
|
+
? { kind: 'file' as const, extensions: ['.exe'] }
|
|
212
|
+
: { kind: 'file' as const };
|
|
213
|
+
|
|
214
|
+
/** 连接与本地服务器:重启生效的那些 */
|
|
215
|
+
export const MINECRAFT_CONFIG_GROUP: ConfigGroup = {
|
|
216
|
+
id: 'world:minecraft',
|
|
217
|
+
owner: 'world:minecraft',
|
|
218
|
+
schema: {
|
|
219
|
+
type: 'object',
|
|
220
|
+
title: 'Minecraft · 连接',
|
|
221
|
+
description: '连接项要重启 World 才生效;受管服务器开关热改,路径在下次启动时采用。',
|
|
222
|
+
properties: {
|
|
223
|
+
'worlds.minecraft.host': { type: 'string', title: '服务器地址', 'x-hot': false },
|
|
224
|
+
'worlds.minecraft.port': { type: 'integer', title: '端口', minimum: 1, maximum: 65535, 'x-hot': false },
|
|
225
|
+
'worlds.minecraft.username': { type: 'string', title: '游戏内用户名', 'x-hot': false },
|
|
226
|
+
'worlds.minecraft.version': {
|
|
227
|
+
type: 'string', title: '协议版本', 'x-hot': false,
|
|
228
|
+
description: 'mineflayer 按此版本连接,要与服务器一致。',
|
|
229
|
+
},
|
|
230
|
+
'worlds.minecraft.viewerPort': {
|
|
231
|
+
type: 'integer', title: 'viewer 端口', minimum: 0, maximum: 65535, 'x-hot': false,
|
|
232
|
+
description: '0=不开。prismarine-viewer 的网页:OBS 浏览器源与"viewer"帧源都吃它。',
|
|
233
|
+
},
|
|
234
|
+
'worlds.minecraft.local.serverDir': {
|
|
235
|
+
type: 'string', title: '本地服务器目录', 'x-hot': false,
|
|
236
|
+
description: '含 server.jar 的目录;运行中修改会在停止并重新启动后采用。',
|
|
237
|
+
'x-path': { kind: 'directory', recommendedDir: '../Cortico-Resources/minecraft/server' },
|
|
238
|
+
},
|
|
239
|
+
'worlds.minecraft.local.serverEnabled': {
|
|
240
|
+
type: 'boolean', title: '受管本地服务器', 'x-hot': true,
|
|
241
|
+
description: '开=启动本地服务器并连接;关=断开 bot、取消重连并保存后关服。未配置本地服务器时不影响远程连接。',
|
|
242
|
+
},
|
|
243
|
+
'worlds.minecraft.local.javaPath': {
|
|
244
|
+
type: 'string', title: '服务器 java 路径', 'x-hot': true,
|
|
245
|
+
description: '空 = 自动:服务器目录邻近的 jdk/,再退回 PATH 上的 java。',
|
|
246
|
+
'x-path': JAVA_PATH_PICKER,
|
|
247
|
+
},
|
|
248
|
+
'worlds.minecraft.local.jvmArgs': {
|
|
249
|
+
type: 'string', title: '服务器 JVM 参数', 'x-hot': true,
|
|
250
|
+
description: '空格分隔,下次启动生效。默认 -Xms1G -Xmx2G。',
|
|
251
|
+
},
|
|
252
|
+
'worlds.minecraft.local.cheats': {
|
|
253
|
+
type: 'boolean', title: '自动授权作弊权限', 'x-hot': true,
|
|
254
|
+
description: '本 World 每次启动服务器前,把她、摄像机、玩家补进管理员名单(ops.json,4 级)。'
|
|
255
|
+
+ '关掉则只按名单现状来。名单与相关的服务器项在「权限与作弊」面板里改。',
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export const MINECRAFT_RHYTHM_CONFIG_GROUP: ConfigGroup = {
|
|
262
|
+
id: 'world:minecraft:rhythm',
|
|
263
|
+
owner: 'world:minecraft',
|
|
264
|
+
schema: {
|
|
265
|
+
type: 'object',
|
|
266
|
+
title: 'Minecraft · 节奏与反射',
|
|
267
|
+
description:
|
|
268
|
+
'节流决定多久才值得说一次话;反射是不经 LLM 的自保,做了什么一律事后汇报。都热改即生效。',
|
|
269
|
+
properties: {
|
|
270
|
+
'worlds.minecraft.world.tickSec': {
|
|
271
|
+
type: 'integer', title: '世界节流 tick', minimum: 5, maximum: 300, 'x-suffix': 's', 'x-hot': true,
|
|
272
|
+
},
|
|
273
|
+
'worlds.minecraft.world.moveThreshold': {
|
|
274
|
+
type: 'integer', title: '位移播报阈值', minimum: 4, maximum: 200, 'x-suffix': '格', 'x-hot': true,
|
|
275
|
+
},
|
|
276
|
+
'worlds.minecraft.world.snapshotSec': {
|
|
277
|
+
type: 'integer', title: '世界快照间隔', minimum: 5, maximum: 300, 'x-suffix': 's', 'x-hot': true,
|
|
278
|
+
description: '世界快照随下一批事件投递,不单独唤醒;投递时读取世界状态。此值为快照的最短间隔。',
|
|
279
|
+
},
|
|
280
|
+
'worlds.minecraft.world.snapshotAnchorSec': {
|
|
281
|
+
type: 'integer', title: '快照全量锚间隔', minimum: 60, maximum: 3600, 'x-suffix': 's', 'x-hot': true,
|
|
282
|
+
description: '快照按段去重,只发有变化的段;距上一份全量超过此间隔就强制发一次全量,给增量流的基线兜底(上下文截断后也会强制全量)。',
|
|
283
|
+
},
|
|
284
|
+
'worlds.minecraft.precheck': {
|
|
285
|
+
type: 'boolean', title: '前置试算', 'x-hot': true,
|
|
286
|
+
description: '受理任务时先纯读试算一遍,把「现在就做不成」的步当场写进受理回执(只报否定);每一步动手前再试算一次,判死的步不动手。关掉则回到旧行为:照跑、跑完才知道。',
|
|
287
|
+
},
|
|
288
|
+
'worlds.minecraft.priorOutcome': {
|
|
289
|
+
type: 'boolean', title: '受理回执带上次下场', 'x-hot': true,
|
|
290
|
+
description: '下同一件事(技能+目标相同,不看坐标数量)时,受理回执捎一句 15 分钟内上次是什么下场;上次成了就不出声。补的是已经被上下文交接压掉的那一段。关掉则受理回执只说这一单。',
|
|
291
|
+
},
|
|
292
|
+
'worlds.minecraft.reflex.fightBack': {
|
|
293
|
+
type: 'boolean', title: '受击反击', 'x-hot': true,
|
|
294
|
+
description: '关掉则挨打不还手,打不打交给主脑决定;血线以下的脱离不受它影响。',
|
|
295
|
+
},
|
|
296
|
+
'worlds.minecraft.reflex.fleeHealth': {
|
|
297
|
+
type: 'integer', title: '脱离战斗血线', minimum: 0, maximum: 20, 'x-hot': true,
|
|
298
|
+
description: '生命低于此值就撤,不恋战。反击关着也照样撤。只管会还手的(玩家和敌对生物):打猪打鱼这类找吃的不受血线约束。',
|
|
299
|
+
},
|
|
300
|
+
'worlds.minecraft.reflex.reactCooldownSec': {
|
|
301
|
+
type: 'integer', title: '受击反应冷却', minimum: 1, maximum: 120, 'x-suffix': 's', 'x-hot': true,
|
|
302
|
+
},
|
|
303
|
+
'worlds.minecraft.reflex.antiDrown': { type: 'boolean', title: '防溺水上浮', 'x-hot': true },
|
|
304
|
+
'worlds.minecraft.reflex.antiLava': {
|
|
305
|
+
type: 'boolean', title: '挨烧自动逃离', 'x-hot': true,
|
|
306
|
+
description: '碰到岩浆/火就立刻手动冲出去,再交给寻路器。判定看碰撞箱压着什么,'
|
|
307
|
+
+ '不是脚下那格——贴着岩浆边缘走时人已经在掉血而中心格还是空气。关掉则烧死为止。',
|
|
308
|
+
},
|
|
309
|
+
'worlds.minecraft.combat.enabled': {
|
|
310
|
+
type: 'boolean', title: '战斗模式(夜间自保)', 'x-hot': true,
|
|
311
|
+
description: '被打或敌对贴到触发半径内就接管移动与出手打完这一场,期间任务挂起、'
|
|
312
|
+
+ '事件照常推(夺手不夺嘴)。不主动招惹。关掉退回"受击反击"那套 10 秒挥两下。',
|
|
313
|
+
},
|
|
314
|
+
'worlds.minecraft.combat.engageRadius': {
|
|
315
|
+
type: 'integer', title: '战斗触发半径', minimum: 2, maximum: 8, 'x-suffix': '格', 'x-hot': true,
|
|
316
|
+
description: '敌对贴到这么近才动手;不是先手圈,是"找上门"的判据。',
|
|
317
|
+
},
|
|
318
|
+
'worlds.minecraft.combat.chaseMax': {
|
|
319
|
+
type: 'integer', title: '战斗追击上限', minimum: 4, maximum: 24, 'x-suffix': '格', 'x-hot': true,
|
|
320
|
+
},
|
|
321
|
+
'worlds.minecraft.combat.maxSec': {
|
|
322
|
+
type: 'integer', title: '战斗硬时长', minimum: 10, maximum: 300, 'x-suffix': 's', 'x-hot': true,
|
|
323
|
+
description: '到点强制收手交还,哪怕怪还在——刷怪笼旁边"索得到敌"永久为真,没有这道闸就是直播失声。',
|
|
324
|
+
},
|
|
325
|
+
'worlds.minecraft.combat.space': {
|
|
326
|
+
type: 'number', title: '战斗理想间距', minimum: 2.0, maximum: 2.95, 'x-suffix': '格', 'x-hot': true,
|
|
327
|
+
description: '僵尸有效攻击距离约 2.2-2.4 格、出手上限 3.0。2.88 几乎不挨打(更强),'
|
|
328
|
+
+ '2.6 偶尔挨打(更像人)。这是观感旋钮。',
|
|
329
|
+
},
|
|
330
|
+
'worlds.minecraft.combat.busyRatio': {
|
|
331
|
+
type: 'integer', title: '战斗占比闸', minimum: 10, maximum: 100, 'x-suffix': '%', 'x-hot': true,
|
|
332
|
+
description: '5 分钟滑窗里战斗时长占比超过此值就强制冷却,不再自动进场——怪一波接一波的地方该换地方,不该无限打。',
|
|
333
|
+
},
|
|
334
|
+
'worlds.minecraft.combat.cooldownSec': {
|
|
335
|
+
type: 'integer', title: '战斗冷却', minimum: 10, maximum: 600, 'x-suffix': 's', 'x-hot': true,
|
|
336
|
+
description: '占比闸触发后这么久内不自动进场(挨打了照样还手)。',
|
|
337
|
+
},
|
|
338
|
+
'worlds.minecraft.show.clickMs': {
|
|
339
|
+
type: 'integer', title: '演出·逐格间隔', minimum: 0, maximum: 2000, 'x-suffix': 'ms', 'x-hot': true,
|
|
340
|
+
description: 'GUI 演出开着时,逐格摆料/逐栈存取之间停这么久。0=瞬时。'
|
|
341
|
+
+ '摄像机没开或「GUI 演出」关着时,整套节拍自动归零。',
|
|
342
|
+
},
|
|
343
|
+
'worlds.minecraft.show.dwellOpenMs': {
|
|
344
|
+
type: 'integer', title: '演出·开窗停顿', minimum: 0, maximum: 3000, 'x-suffix': 'ms', 'x-hot': true,
|
|
345
|
+
description: '打开容器界面后,等待此时长再操作。',
|
|
346
|
+
},
|
|
347
|
+
'worlds.minecraft.show.dwellResultMs': {
|
|
348
|
+
type: 'integer', title: '演出·产物亮相', minimum: 0, maximum: 5000, 'x-suffix': 'ms', 'x-hot': true,
|
|
349
|
+
description: '合成材料摆齐后停一拍,让产出槽在画面上亮一会儿再收。',
|
|
350
|
+
},
|
|
351
|
+
'worlds.minecraft.show.dwellCloseMs': {
|
|
352
|
+
type: 'integer', title: '演出·关窗停顿', minimum: 0, maximum: 3000, 'x-suffix': 'ms', 'x-hot': true,
|
|
353
|
+
},
|
|
354
|
+
'worlds.minecraft.show.reopenGapMs': {
|
|
355
|
+
type: 'integer', title: '演出·再开窗间隔', minimum: 0, maximum: 3000, 'x-suffix': 'ms', 'x-hot': true,
|
|
356
|
+
description: '关闭容器界面到下次打开的最短间隔,不计入单次预算。',
|
|
357
|
+
},
|
|
358
|
+
'worlds.minecraft.show.budgetMs': {
|
|
359
|
+
type: 'integer', title: '演出·单次预算', minimum: 0, maximum: 30000, 'x-suffix': 'ms', 'x-hot': true,
|
|
360
|
+
description: '一单操作的节拍总预算,超了剩余步骤恢复瞬时——整箱掏空不会变成慢动作长镜头。',
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
/** 画面与观察者客户端 */
|
|
367
|
+
export const MINECRAFT_CLIENT_CONFIG_GROUP: ConfigGroup = {
|
|
368
|
+
id: 'world:minecraft:client',
|
|
369
|
+
owner: 'world:minecraft',
|
|
370
|
+
schema: {
|
|
371
|
+
type: 'object',
|
|
372
|
+
title: 'Minecraft · 观察者客户端',
|
|
373
|
+
description:
|
|
374
|
+
'真游戏窗口以观察者模式跟着 bot,与观众同一幅画面(含光影/模组),代价是一份客户端进程。' +
|
|
375
|
+
'观众看到的画面由 OBS 采集这扇窗口或 viewer 网页,不经 World。',
|
|
376
|
+
properties: {
|
|
377
|
+
'worlds.minecraft.client.enabled': {
|
|
378
|
+
type: 'boolean', title: '观察者客户端', 'x-hot': false,
|
|
379
|
+
description: '开启后 World 启动时一并拉起客户端;也可以在挂载面板里单独启停。',
|
|
380
|
+
},
|
|
381
|
+
'worlds.minecraft.client.gameDir': {
|
|
382
|
+
type: 'string', title: '.minecraft 目录', 'x-hot': false,
|
|
383
|
+
description: '未配置时观察者客户端起不来。运行中修改会在停止并重新启动后采用。',
|
|
384
|
+
'x-path': { kind: 'directory', recommendedDir: '../Cortico-Resources/minecraft/client' },
|
|
385
|
+
},
|
|
386
|
+
'worlds.minecraft.client.versionId': {
|
|
387
|
+
type: 'string', title: '版本 id', 'x-hot': true,
|
|
388
|
+
description: '空 = versions/ 下唯一那个。Fabric+Iris 这类填整合版目录名,继承关系自动解。',
|
|
389
|
+
},
|
|
390
|
+
'worlds.minecraft.client.javaPath': {
|
|
391
|
+
type: 'string', title: '客户端 java 路径', 'x-hot': true,
|
|
392
|
+
description:
|
|
393
|
+
'空 = PATH 上的 java。版本要与游戏对上:1.20.6 用 Java 21。更高的 JDK 会让游戏自带的 '
|
|
394
|
+
+ 'LWJGL 3.3.3 认不出 JNI 版本(启动日志里有 Unsupported JNI version 警告),之后随机原生崩溃。',
|
|
395
|
+
'x-path': JAVA_PATH_PICKER,
|
|
396
|
+
},
|
|
397
|
+
'worlds.minecraft.client.jvmArgs': {
|
|
398
|
+
type: 'string', title: '客户端 JVM 参数', 'x-hot': true,
|
|
399
|
+
description: '空格分隔。开光影建议 -Xmx4G 起。',
|
|
400
|
+
},
|
|
401
|
+
'worlds.minecraft.client.username': {
|
|
402
|
+
type: 'string', title: '摄像机账号名', 'x-hot': true,
|
|
403
|
+
description: '离线账号,必须与 bot 的游戏内用户名不同。',
|
|
404
|
+
},
|
|
405
|
+
'worlds.minecraft.client.width': {
|
|
406
|
+
type: 'integer', title: '窗口宽', minimum: 320, maximum: 3840, 'x-suffix': 'px', 'x-hot': true,
|
|
407
|
+
},
|
|
408
|
+
'worlds.minecraft.client.height': {
|
|
409
|
+
type: 'integer', title: '窗口高', minimum: 240, maximum: 2160, 'x-suffix': 'px', 'x-hot': true,
|
|
410
|
+
},
|
|
411
|
+
'worlds.minecraft.client.autoJoin': {
|
|
412
|
+
type: 'boolean', title: '启动即进服', 'x-hot': true,
|
|
413
|
+
},
|
|
414
|
+
'worlds.minecraft.client.autoSpectate': {
|
|
415
|
+
type: 'boolean', title: '自动观察者附身', 'x-hot': true,
|
|
416
|
+
description: '进服后把摄像机切 spectator 并附身到 bot。经服务器控制台下指令;外部服务器则借 bot 的 op 权限。',
|
|
417
|
+
},
|
|
418
|
+
'worlds.minecraft.client.resyncSec': {
|
|
419
|
+
type: 'integer', title: '附身重下间隔', minimum: 0, maximum: 600, 'x-suffix': 's', 'x-hot': true,
|
|
420
|
+
description: 'bot 死亡/重连会掉附身,周期性重下;0=只在进服与重生这些事件点下。',
|
|
421
|
+
},
|
|
422
|
+
'worlds.minecraft.client.restartMax': {
|
|
423
|
+
type: 'integer', title: '崩溃自动重启上限', minimum: 0, maximum: 10, 'x-suffix': '次', 'x-hot': true,
|
|
424
|
+
description: '异常退出后自动重启,等待时间从 30 秒起逐次加倍;超过重启上限后停止重试并报警。'
|
|
425
|
+
+ '相邻两次异常退出间隔超过 10 分钟时重置计数。0 表示禁用自动重启。',
|
|
426
|
+
},
|
|
427
|
+
'worlds.minecraft.client.noPauseOnLostFocus': {
|
|
428
|
+
type: 'boolean', title: '调整启动选项', 'x-hot': true,
|
|
429
|
+
description: '启动前改该游戏目录的设置。options.txt:关 pauseOnLostFocus(alt+tab 切走不弹暂停菜单)、'
|
|
430
|
+
+ '跳过首启引导屏、主音量拉满(为 0 时游戏整个没声)。'
|
|
431
|
+
+ 'SpectatorPlus:同步屏幕按「GUI 演出」开关写。'
|
|
432
|
+
+ '指向你自己常玩的 .minecraft 时记得关掉这个开关。',
|
|
433
|
+
},
|
|
434
|
+
'worlds.minecraft.client.syncGui': {
|
|
435
|
+
type: 'boolean', title: 'GUI 演出', 'x-hot': false,
|
|
436
|
+
description: 'bot 开箱子/合成/熔炉时,把那张界面同步到摄像机画面上'
|
|
437
|
+
+ '(SpectatorPlus 的 Open Synced Screens),配合「节奏与反射」里的演出节拍,'
|
|
438
|
+
+ '观众能看到逐格摆料、产物出现、收回的全过程。徒手 2x2 合成协议上没有窗口,'
|
|
439
|
+
+ '演不了。客户端重启生效。',
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
/** 人自己进服那一份客户端。 */
|
|
446
|
+
export const MINECRAFT_PLAYER_CONFIG_GROUP: ConfigGroup = {
|
|
447
|
+
id: 'world:minecraft:player',
|
|
448
|
+
owner: 'world:minecraft',
|
|
449
|
+
schema: {
|
|
450
|
+
type: 'object',
|
|
451
|
+
title: 'Minecraft · 玩家客户端',
|
|
452
|
+
description:
|
|
453
|
+
'以普通玩家身份再开一份客户端进同一个服务器,跟她一起玩。与观察者摄像机是两份进程、'
|
|
454
|
+
+ '两个账号名。默认用摄像机那份 .minecraft;要装不同的 World 就另指一个目录。'
|
|
455
|
+
+ '进服的时刻由 bot 的玩家列表看到,那一刻把人传送到她旁边。',
|
|
456
|
+
properties: {
|
|
457
|
+
'worlds.minecraft.player.enabled': {
|
|
458
|
+
type: 'boolean', title: '玩家客户端', 'x-hot': false,
|
|
459
|
+
description: '开启后 World 启动时一并拉起;也可以在挂载面板里单独启停。',
|
|
460
|
+
},
|
|
461
|
+
'worlds.minecraft.player.username': {
|
|
462
|
+
type: 'string', title: '玩家名', 'x-hot': true,
|
|
463
|
+
description: '离线账号,必须与 bot 和摄像机的名字都不同。传送认的就是这个名字。',
|
|
464
|
+
},
|
|
465
|
+
'worlds.minecraft.player.gameDir': {
|
|
466
|
+
type: 'string', title: '.minecraft 目录', 'x-hot': false,
|
|
467
|
+
description: '空 = 用观察者客户端那一份。两份客户端共用一个目录时设置文件是共享的:'
|
|
468
|
+
+ '谁最后启动谁说了算,要各自成套只能各给一个目录。natives 仍按账号分开,不会抢同一组 DLL。'
|
|
469
|
+
+ '共用时启动前会把聊天可见性掰回 FULL——摄像机为画面干净关掉的聊天连命令行一起关,'
|
|
470
|
+
+ '人进了服 T 和 / 都按不动。',
|
|
471
|
+
'x-path': { kind: 'directory', recommendedDir: '../Cortico-Resources/minecraft/client-player' },
|
|
472
|
+
},
|
|
473
|
+
'worlds.minecraft.player.versionId': {
|
|
474
|
+
type: 'string', title: '版本 id', 'x-hot': true,
|
|
475
|
+
description: '空 = versions/ 下唯一那个。要与服务器同版本。',
|
|
476
|
+
},
|
|
477
|
+
'worlds.minecraft.player.javaPath': {
|
|
478
|
+
type: 'string', title: 'java 路径', 'x-hot': true,
|
|
479
|
+
description: '空 = 用观察者客户端那一份。',
|
|
480
|
+
'x-path': JAVA_PATH_PICKER,
|
|
481
|
+
},
|
|
482
|
+
'worlds.minecraft.player.jvmArgs': { type: 'string', title: 'JVM 参数', 'x-hot': true },
|
|
483
|
+
'worlds.minecraft.player.width': {
|
|
484
|
+
type: 'integer', title: '窗口宽', minimum: 320, maximum: 3840, 'x-suffix': 'px', 'x-hot': true,
|
|
485
|
+
},
|
|
486
|
+
'worlds.minecraft.player.height': {
|
|
487
|
+
type: 'integer', title: '窗口高', minimum: 240, maximum: 2160, 'x-suffix': 'px', 'x-hot': true,
|
|
488
|
+
},
|
|
489
|
+
'worlds.minecraft.player.autoJoin': {
|
|
490
|
+
type: 'boolean', title: '启动即进服', 'x-hot': true,
|
|
491
|
+
description: '关掉就停在主菜单,自己从多人游戏里进。',
|
|
492
|
+
},
|
|
493
|
+
'worlds.minecraft.player.teleportToBot': {
|
|
494
|
+
type: 'boolean', title: '进服传送到她旁边', 'x-hot': true,
|
|
495
|
+
description: '经服务器控制台下 tp;外部服务器则借 bot 的 op 权限。挂载面板里也能随时手动传一次。',
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
};
|