Config
# 配置
Feathered Friend 有两个配置层:
- 客户端配置 (
featheredfriend-client.toml):UI 和本地首选项行为。 - 服务器配置 (
featheredfriend-server.toml):同步到客户端的游戏权威值。
在典型的开发运行中:
neoforge/run/config/featheredfriend-client.tomlneoforge/run/config/featheredfriend-server.toml
服务器配置是游戏规则的真实来源。客户端接收同步值并应将它们视为只读,除非服务器允许编辑。
同步管道
- 客户端请求设置(
RequestServerSettingsPayload)。 - 服务器发送完整快照 (
ServerSettingsPayload)。 - 服务器还会在登录时推送设置。
- 服务器滴答观察器检查配置更改和重新广播。
因此,TOML 热重载和游戏内设置中的编辑都会传播到连接的客户端。
热重载行为
FFServerConfig 中的服务器配置值是运行时值。
FFConfigSyncEvents 监视值并在它们发生变化时重新广播,包括:
- 功能切换(
enableSuspiciousFeather、enableSuspiciousChest、enableRavenArmor、enableMailbox) - 限制/冷却时间
- 聊天切换
ravenLinkDurationSeconds 在活动会话期间会重新读取,因此当前链接可以在配置更改后立即缩短/延长。
DEEP DIVE: dirty-flag + save
FFServerConfig 中的设置器将设置标记为脏并尝试 SERVER_SPEC.save(),以便更改可以快速同步并保留到磁盘。
游戏内设置权限
自定义设置 GUI 通过 open_settings 键绑定(默认情况下未绑定)打开。
仅当两者都为 true 时才允许服务器端编辑:
allowServerSettingsScreenEditing = true- 玩家拥有4级操作员权限
否则,客户端可以查看同步值,但无法应用服务器设置编辑。
客户端配置(仅限本地)
客户端配置仅控制本地 UI/首选项,包括:
scrollUiFontMode(VANILLA、JACQUARD、ALAGARD)- 乌鸦状态徽章位置/锚点/视觉模式
- 最喜欢的印章钥匙
- raven日志视图设置(类别可见性/颜色)
这些不会改变服务器的游戏玩法。
服务器配置(游戏权限)
settings 部分
| Key | Default | Range | Purpose |
|---|---|---|---|
chatDisabledDefault | false | bool | Global player chat disable (commands unaffected). |
ravenChestsPerPlayer | 3 | 0..64 | Max placed Suspicious Chests per player. |
ravenLogRetentionMinutes | 10080 | 0..129600 | Raven log retention window (minutes). |
ravenLogMaxBytesPerPlayer | 262144 | 0..4194304 | Max Raven log size per player before clear. |
enderpackDepositCooldownSeconds | 600 | 0..86400 | Cooldown between Enderpack -> chest deposit workflows. |
scrollDeliveryCooldownSeconds | 600 | 0..86400 | Cooldown between scroll courier dispatches. |
courierTimeoutRetrySeconds | 60 | 0..86400 | Auto-retry interval for timeout-failed courier jobs. |
brushRavenCooldownSeconds | 30 | 0..86400 | Cooldown between brushing ravens. |
ravenLinkDurationSeconds | 30 | 5..600 | Raven Link session duration. |
allowServerSettingsScreenEditing | true | bool | Allows/disallows OP editing in settings screen. |
features.enableSuspiciousFeather | true | bool | Enables Suspicious Feather logic. |
features.enableSuspiciousChest | true | bool | Enables Suspicious Chest special logic. |
features.enableRavenArmor | true | bool | Enables Raven Armor equip/stat logic. |
features.enableMailbox | true | bool | Enables mailbox spotting + courier mailbox routing. |
spawning 部分
| Key | Default | Range | Purpose |
|---|---|---|---|
wildRavensPerPlayer | 1 | 0..16 | Wild raven cap per online non-spectator player. |
如果功能切换关闭
功能切换禁用逻辑,而不是项目/块存在:
- 现有的物品/方块仍然存在
- 库存仍可访问
- 跳过特定功能的运行时系统
示例:
enableMailbox=false:邮箱存储仍然打开,但发现/路由被禁用。enableSuspiciousChest=false:箱子存储仍然有效,但栖息/存款逻辑被禁用。enableSuspiciousFeather=false:Raven Link 启动/恢复路径已禁用。
禁用功能只是一种行为切换。它不会删除该功能的现有世界数据。
服务器快照示例
{
"settings": {
"ravenChestsPerPlayer": 3,
"enderpackDepositCooldownSeconds": 600,
"scrollDeliveryCooldownSeconds": 600,
"ravenLinkDurationSeconds": 30,
"allowServerSettingsScreenEditing": true,
"features": {
"enableSuspiciousFeather": true,
"enableSuspiciousChest": true,
"enableRavenArmor": true,
"enableMailbox": true
}
},
"spawning": {
"wildRavensPerPlayer": 1
}
}支持这个项目
喜欢这个 Wiki 和这些模组吗?
你的每一份支持都能帮助我持续开发新功能、完善文档并发布更新。