RpImmersion
RpImmersion 是 RpEssentials 的服务端配套模组,专为在 NeoForge 上运行 Minecraft 1.21.1 的沉浸式角色扮演服务器设计。它为服务器管理员提供了对玩家体验的大气氛围(雾气、镜头效果、天气沉浸感以及完全自定义的角色扮演日历)进行精细控制的权限——所有配置均可实时调整,无需重启服务器。
当前版本:1.1.1
依赖项
| 依赖项 |
版本 |
端 |
必需 |
| Minecraft |
1.21.1 |
双方 |
✅ |
| NeoForge |
21.1.219+ |
双方 |
✅ |
| RpEssentials |
4.0.0+ |
双方 |
✅ |
| ImmersiveMessages |
neoforge-1.21.1:1.0.18 |
客户端 |
⬜ 可选 |
| TxniLib |
neoforge-1.21.1-1.0.24 |
客户端 |
⬜ 可选 |
仅当使用 weatherMessageMode = IMMERSIVE 或 scheduleDeathHoursNotifyMode = IMMERSIVE 时,客户端才需要安装 ImmersiveMessages 和 TxniLib。服务端无需它们即可正常运行;未安装它们的客户端将优雅地回退到动作栏显示模式。
功能特性
雾气系统
由服务端控制的雾气在激活时会完全替换原版雾气。所有配置均在 rpimmersion-fog.toml 中完成。
- 命名预设 — 定义雾气颜色(RGB)、起始/结束距离以及淡入淡出过渡持续时间。可在任意位置应用这些预设。
- 圆形区域 — 为通过中心坐标和半径定义的区域分配预设。当区域重叠时,高优先级的区域生效。
- 基于生物群系的雾气 — 当玩家进入特定生物群系时自动应用预设。支持通配符(
minecraft:*, *:dark_*)。
- RpEssentials 区域覆盖 — 复用 RpEssentials 已定义的命名区域系统中的区域。无需重新定义坐标。
- 日夜变体 — 每个区域、生物群系和全局预设均支持独立的
dayPreset 和 nightPreset。过渡过程经过动画处理。
- 全局雾气 — 当没有区域或生物群系匹配时,应用于所有玩家的回退预设。
- 世界边界雾气 — 当玩家踏出世界边界时,一个专用的高优先级预设会自动激活。适用于营造戏剧性的边界效果。
- 单人覆盖 — 工作人员可通过命令即时为单个玩家设置特定的雾气,覆盖所有其他规则。
- 平滑过渡 — 所有雾气变化均以可配置的持续时间进行缓入和缓出。无突兀跳跃。
- 优化同步 — 服务端仅在玩家的雾气状态实际发生变化时发送数据包(每 N 个刻检查一次,可配置)。避免网络垃圾数据。
- 维度雾气:为整个维度(下界、末地、自定义维度)分配预设。
- 生物群系标签:除了通配符外,生物群系雾气还接受诸如
#minecraft:is_forest 这样的标签。
- 区域维度:圆形区域可限制在单一维度内。
- 配置警告:每次重载时,未知的预设名称会在日志中报告。
天气沉浸感
增强 Minecraft 的天气系统,提供氛围与控制。配置位于 rpimmersion-weather.toml。
- 天气雾气集成 — CLEAR(晴朗)、RAIN(下雨)和 THUNDER(雷雨)分别映射到一个雾气预设。当没有区域或生物群系雾气激活时,作为低优先级回退应用,营造出自然的天气氛围。
- 闪电频率控制 — 在雷暴期间增加或减少闪电击中的速率。额外的闪电会随机生成在可配置半径内在线玩家附近。
- 闪电时的镜头震动 — 当闪电击中时,附近的玩家会根据其距离闪电的距离感受到镜头震动。近距离命中 = 强烈震动,远距离命中 = 微妙震动。该效果使用平滑衰减包络。
- 主流模组兼容性 — 震动以叠加方式应用于镜头角度(而非替换),因此它可以与 Sodium、Embeddium、Optifine、Oculus 以及其他任何修改镜头的模组干净地堆叠。绝不会引起冲突。
- 客户端震动覆盖 — 服务端允许客户端通过其自身的客户端配置(选项 → 模组)减弱或禁用镜头震动。服务端也可以锁定它,强制对所有玩家应用配置的强度。
- 自动天气循环 — 定义一系列天气步骤(CLEAR → RAIN → THUNDER → CLEAR…),持续时间以真实分钟为单位。服务端会自动循环执行。
- 叙事消息 — 当天气变化时,向所有玩家广播一条可配置的消息。支持 CHAT(聊天)、ACTION_BAR(动作栏)和 IMMERSIVE(配合 ImmersiveMessages)显示模式。
角色扮演日历
一个完全持久化、由服务端驱动的角色扮演日历。配置位于 rpimmersion-calendar.toml。
- 完全自定义的结构:定义你自己的月份名称、月份数量、每月天数(统一或按月度设置),以及可选的星期名称。
- 可配置的时间比例:控制 RP 时间相对于真实服务器时间的流逝速度。
ticksPerRpMinute × rpMinutesPerHour × rpHoursPerDay 让你拥有完全的控制权。
- 持久化保存:当前日期和暂停状态保存在
world/data/rpimmersion/calendar.json 中。服务器重启后日历数据依然存在。
- 可暂停:工作人员可以冻结日历。日期仍会显示(带有可配置的暂停指示器),但时间不再累积。
- 灵活的显示方式:可以将日期作为 HUD 覆盖层、在动作栏显示、两者都显示或不显示。格式字符串支持任意组合的
{day}、{dayName}、{month}、{monthName}、{year}、{hour}、{minute} 占位符。
- 实时命令:将日期设置为任意值、推进 N 分钟、暂停/恢复,或强制同步给所有玩家——无需重启服务器即可执行。
- 可配置的 HUD:位置(五种锚点)、缩放和背景均由服务器决定并发送给客户端。
- 日期事件:当日历到达特定日期时广播消息(如节假日、节日)。支持所有显示模式,包括
IMMERSIVE:presetName。
- Minecraft 时间同步:RP 小时跟随 Minecraft 一天中的时间变化,RP 天随每个 Minecraft 日推进。
/rpimmersion calendar set 和 advance 也会移动 Minecraft 的时间。
HUD 控制与摄像机
由服务器驱动的用户界面控制,配置在 rpimmersion-hud.toml 中,并在玩家登录或重载时同步到每个客户端。
- 隐藏 HUD 元素:隐藏准星、快捷栏、生命值、护甲值、饥饿值、空气值、经验值、跳跃条、载具生命值、物品名称、效果、Boss 血条、计分板、Tab 列表、字幕以及 F3 调试屏幕(不再通过坐标进行元游戏作弊)。
- 第一人称锁定:禁用 F5 视角切换,使所有玩家始终保持第一人称视角。
- 工作人员豁免:可选择让工作人员保留完整的 HUD 和摄像机控制权。
- 实时命令:
/rpimmersion hud hide|show <element> 会写入配置并即时同步。
- 工作人员摄像机震动:使用
/rpimmersion shake <targets> <intensity> <seconds> 实现地震、爆炸和其他叙事事件的摄像机震动效果。
命令
所有命令都需要工作人员权限(由 RpEssentials 定义)。
Fog (雾)
| Command |
Description |
/rpimmersion fog set global <preset|clear> |
应用雾预设给所有玩家,或清除全局覆盖。 |
/rpimmersion fog set player <player> <preset|clear> |
仅对指定玩家应用雾预设。 |
/rpimmersion fog clear global |
移除全局雾覆盖。 |
/rpimmersion fog clear player <player> |
移除针对单个玩家的雾覆盖。 |
/rpimmersion fog list |
列出所有已加载的雾预设及其参数。 |
/rpimmersion fog status |
显示当前雾状态(全局覆盖、世界边界、区域和生物群系计数)。 |
/rpimmersion fog reload |
从磁盘重新加载雾配置并重新同步所有玩家。 |
Weather (天气)
| Command |
Description |
/rpimmersion weather set <CLEAR|RAIN|THUNDER> |
强制设定服务器的特定天气状态。 |
/rpimmersion weather status |
显示当前天气和激活的雾预设。 |
/rpimmersion weather reload |
从磁盘重新加载天气配置。 |
Calendar (日历)
| Command |
Description |
/rpimmersion calendar status |
显示当前的 RP 日期、时间和暂停状态。 |
/rpimmersion calendar pause <true|false> |
暂停或恢复日历。 |
/rpimmersion calendar set <year> <month> <day> [hour] [minute] |
将日历设置为特定的日期和时间。 |
/rpimmersion calendar advance <minutes> |
推进(若为负数则倒推)日历 N 个 RP 分钟。 |
/rpimmersion calendar reload |
强制将当前日期同步给所有已连接的玩家。 |
General (常规)
| Command |
Description |
/rpimmersion reload |
重新加载雾、天气、日历和 HUD 设置,并重新同步所有玩家。 |
/rpimmersion shake <targets> <intensity> <seconds> |
触发摄像机震动。强度范围 0.0 到 1.0,持续时间 0.1 到 30 秒。 |
HUD
| 命令 |
描述 |
/rpimmersion hud hide <元素> |
隐藏所有玩家的 HUD 元素(如需可启用 HUD 控制)。 |
| /rpimmersion hud show <element> | 再次显示某个 HUD 元素。 |
| /rpimmersion hud status | 显示当前 HUD 控制状态。 |
| /rpimmersion hud reload | 向所有玩家重新发送 HUD 设置。 |
配置
首次启动时,会自动在 config/rpimmersion/ 下生成三个服务端配置文件。一个客户端配置文件则生成于标准的 NeoForge 客户端配置位置。
| 文件 |
内容 |
rpimmersion-fog.toml |
预设、区域、生物群系、RpEssentials 覆盖设置、世界边界雾效、昼夜设置、优化选项 |
rpimmersion-weather.toml |
天气雾效映射、闪电频率与震动效果、自动循环、叙事消息 |
rpimmersion-calendar.toml |
月份/日期结构、时间比例、起始日期、显示格式 |
rpimmersion-client.toml |
客户端震动强度覆盖、雾效禁用开关 |
rpimmersion-hud.toml |
隐藏 HUD 元素、工作人员豁免、第一人称锁定 |
当磁盘上的文件发生变化时,所有服务器配置会自动重新加载,或者通过 /rpimmersion reload(或各模块的独立重载命令)手动重载。无需重启服务器。
雾效预设格式
# name;red;green;blue;start;end;transitionSeconds
presets = [
"night_fog;0.05;0.05;0.1;5.0;30.0;3.0",
"morning_mist;0.7;0.75;0.8;2.0;20.0;5.0",
"border_void;0.0;0.0;0.0;1.0;8.0;2.0"
]
雾区格式
# zoneName;centerX;centerZ;radius;preset;priority[;dayPreset;nightPreset]
zones = [
"dark_woods;100;-200;80;cursed_forest;10;morning_mist;night_fog"
]
天气雾效格式
# weatherType;fogPreset
weatherFogPresets = [
"RAIN;morning_mist",
"THUNDER;purge"
]
日历结构示例
monthNames = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
"Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"]
daysPerMonth = [30] # 单一值适用于所有月份
dayNames = ["Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"]
dateFormat = "§7{dayName} {day} {monthName}, An {year} — {hour}h{minute}"
数据存储
| 文件 |
内容 |
world/data/rpimmersion/calendar.json |
当前 RP 日期及暂停状态 |
技术说明
- 雾效过渡 使用固定的起始/目标插值模型。在设置新雾效时捕获“from”值,确保无论有多少个过渡重叠,都能实现干净的线性缓入/缓出效果。
- 镜头抖动 将增量值添加到现有相机角度上,而不是替换它们,使其具有累加性,并完全兼容 Sodium、Embeddium、Optifine、Oculus 及其他任何渲染模组。
- 无持续数据包泛滥 — 每个玩家每 N 个刻(可配置,默认为 3 秒)重新计算一次雾效状态,仅当解析出的状态与上次发送的状态不同时才发送数据包。
- RpEssentials 集成 通过缓存反射读取命名区域,并直接使用
RpEssentialsPermissions、RpEssentialsScheduleManager 和 ImmersivePresetHelper。缺少或不兼容的方法绝不会导致刻崩溃:所有调用均受到保护。
- 客户端同步:HUD、相机锁定及覆盖权限通过单个
ClientSettingsPacket 传输。日历数据包自带其显示模式和 HUD 选项,客户端从不读取服务器配置文件。
RpImmersion
RpImmersion is a server-side companion mod for RpEssentials, designed for immersive Roleplay servers running Minecraft 1.21.1 on NeoForge. It gives server administrators fine-grained control over the atmosphere experienced by players — fog, camera effects, weather immersion, and a fully custom RP calendar — all configurable in real-time without restarts.
Current version: 1.1.1
Requirements
| Dependency |
Version |
Side |
Required |
| Minecraft |
1.21.1 |
Both |
✅ |
| NeoForge |
21.1.219+ |
Both |
✅ |
| RpEssentials |
4.0.0+ |
Both |
✅ |
| ImmersiveMessages |
neoforge-1.21.1:1.0.18 |
Client |
⬜ Optional |
| TxniLib |
neoforge-1.21.1-1.0.24 |
Client |
⬜ Optional |
ImmersiveMessages and TxniLib are only required on the client if you use weatherMessageMode = IMMERSIVE or scheduleDeathHoursNotifyMode = IMMERSIVE. The server runs fine without them, and clients without them will gracefully fall back to action bar display.
Features
Fog System
Server-controlled fog fully replaces vanilla fog for players when active. Everything is configured in rpimmersion-fog.toml.
- Named presets — define fog colors (RGB), start/end distances, and fade transition duration. Apply them anywhere.
- Circular zones — assign a preset to a zone defined by center coordinates and radius. Higher-priority zones win when overlapping.
- Biome-based fog — automatically apply a preset when a player enters a specific biome. Wildcard support (
minecraft:*, *:dark_*).
- RpEssentials zone overrides — piggyback on zones already defined in RpEssentials's named zone system. No need to redefine coordinates.
- Day/Night variants — every zone, biome, and global preset supports separate
dayPreset and nightPreset. Transitions are animated.
- Global fog — a fallback preset applied to all players when no zone or biome matches.
- World border fog — a dedicated high-priority preset activates automatically when a player steps outside the world border. Useful for dramatic boundary effects.
- Per-player override — staff can instantly set a specific fog for one player via command, overriding all other rules.
- Smooth transitions — all fog changes ease in and out with a configurable duration. No abrupt jumps.
- Optimized sync — the server only sends a packet when the fog state actually changes for a player (checked every N ticks, configurable). No network spam.
- Dimension fog: assign a preset to a whole dimension (Nether, End, custom dimensions).
- Biome tags: biome fog accepts tags such as
#minecraft:is_forest in addition to wildcards.
- Zone dimension: a circular zone can be restricted to one dimension.
- Config warnings: unknown preset names are reported in the log at every reload.
Weather Immersion
Enhances Minecraft's weather system with atmosphere and control. Configured in rpimmersion-weather.toml.
- Weather fog integration — CLEAR, RAIN, and THUNDER each map to a fog preset. Applied as a low-priority fallback when no zone or biome fog is active, creating a natural weather atmosphere.
- Lightning frequency control — multiply or reduce the rate of lightning strikes during thunderstorms. Extra bolts are placed randomly near online players within a configurable radius.
- Camera shake on lightning — when lightning strikes, nearby players feel a camera shake proportional to their distance from the bolt. Close strike = strong shake, distant strike = subtle shake. The effect uses a smooth decay envelope.
- Mainstream mod compatibility — shake is applied additively to camera angles (not a replacement), so it stacks cleanly with Sodium, Embeddium, Optifine, Oculus, and any other mod that touches the camera. Never causes conflicts.
- Client shake override — the server can allow clients to reduce or disable camera shake via their own client config (Options → Mods). The server can also lock it, enforcing the configured intensity for all players.
- Automatic weather cycle — define a sequence of weather steps (CLEAR → RAIN → THUNDER → CLEAR…) with durations in real-time minutes. The server cycles through them automatically.
- Narrative messages — when weather changes, a configurable message is broadcast to all players. Supports CHAT, ACTION_BAR, and IMMERSIVE (with ImmersiveMessages) display modes.
RP Calendar
A fully persistent, server-driven roleplay calendar. Configured in rpimmersion-calendar.toml.
- Completely custom structure — define your own month names, number of months, days per month (uniform or per-month), and optionally day-of-week names.
- Configurable time ratio — control how fast RP time passes relative to real server time.
ticksPerRpMinute × rpMinutesPerHour × rpHoursPerDay gives you full control.
- Persistent — the current date and pause state are saved in
world/data/rpimmersion/calendar.json. The calendar survives server restarts.
- Pauseable — staff can freeze the calendar in place. The date is still displayed (with a configurable pause indicator), but time stops accumulating.
- Flexible display — show the date as a HUD overlay, in the action bar, both, or nowhere. The format string accepts any combination of
{day}, {dayName}, {month}, {monthName}, {year}, {hour}, {minute} placeholders.
- Live commands — set the date to any value, advance it by N minutes, pause/resume, or force a sync to all players — all without restarting.
- Configurable HUD: position (five anchors), scale and background, all decided by the server and sent to the clients.
- Date events: broadcast a message when the calendar reaches a given date (holidays, festivals). Every display mode is supported, including
IMMERSIVE:presetName.
- Minecraft day sync: the RP hour follows the Minecraft time of day, the RP day advances with each Minecraft day.
/rpimmersion calendar set and advance move the Minecraft time too.
HUD Control and Camera
Server-driven interface control, configured in rpimmersion-hud.toml and synced to every client at login and on reload.
- Hidden HUD elements: hide the crosshair, hotbar, health, armor, food, air, experience, jump bar, vehicle health, item name, effects, boss bars, scoreboard, tab list, subtitles and the F3 debug screen (no more coordinates metagaming).
- First person lock: disable the F5 camera so every player keeps a first person view.
- Staff exemption: optionally let staff members keep the full HUD and camera.
- Live commands:
/rpimmersion hud hide|show <element> writes to the config and syncs instantly.
- Staff camera shake:
/rpimmersion shake <targets> <intensity> <seconds> for earthquakes, explosions and other narrative events.
Commands
All commands require staff permission (as defined by RpEssentials).
Fog
| Command |
Description |
/rpimmersion fog set global <preset|clear> |
Apply a fog preset to all players, or clear the global override. |
/rpimmersion fog set player <player> <preset|clear> |
Apply a fog preset to one player specifically. |
/rpimmersion fog clear global |
Remove the global fog override. |
/rpimmersion fog clear player <player> |
Remove the per-player fog override. |
/rpimmersion fog list |
List all loaded fog presets with their parameters. |
/rpimmersion fog status |
Display the current fog state (global override, world border, zone and biome counts). |
/rpimmersion fog reload |
Reload fog config from disk and re-sync all players. |
Weather
| Command |
Description |
/rpimmersion weather set <CLEAR|RAIN|THUNDER> |
Force a specific weather state on the server. |
/rpimmersion weather status |
Show the current weather and active fog preset. |
/rpimmersion weather reload |
Reload weather config from disk. |
Calendar
| Command |
Description |
/rpimmersion calendar status |
Display the current RP date, time, and pause state. |
/rpimmersion calendar pause <true|false> |
Pause or resume the calendar. |
/rpimmersion calendar set <year> <month> <day> [hour] [minute] |
Set the calendar to a specific date and time. |
/rpimmersion calendar advance <minutes> |
Advance (or rewind if negative) the calendar by N RP minutes. |
/rpimmersion calendar reload |
Force a sync of the current date to all connected players. |
General
| Command |
Description |
/rpimmersion reload |
Reload fog, weather, calendar and HUD settings and re-sync every player. |
/rpimmersion shake <targets> <intensity> <seconds> |
Trigger a camera shake. Intensity 0.0 to 1.0, duration 0.1 to 30 seconds. |
HUD
| Command |
Description |
/rpimmersion hud hide <element> |
Hide a HUD element for every player (enables HUD control if needed). |
/rpimmersion hud show <element> |
Show a HUD element again. |
/rpimmersion hud status |
Display the current HUD control state. |
/rpimmersion hud reload |
Re-send the HUD settings to every player. |
Configuration
Three server-side config files are generated automatically under config/rpimmersion/ on first launch. One client-side config is generated in the standard NeoForge client config location.
| File |
Contents |
rpimmersion-fog.toml |
Presets, zones, biomes, RpEssentials overrides, world border fog, day/night settings, optimization |
rpimmersion-weather.toml |
Weather fog mapping, lightning frequency & shake, auto cycle, narrative messages |
rpimmersion-calendar.toml |
Month/day structure, time ratio, start date, display format |
rpimmersion-client.toml |
Client-side shake intensity override, fog disable toggle |
rpimmersion-hud.toml |
Hidden HUD elements, staff exemption, first person lock |
All server configs are reloaded automatically when the file changes on disk, or manually with /rpimmersion reload (or the per-module reload commands). No server restart required.
Fog Preset Format
# name;red;green;blue;start;end;transitionSeconds
presets = [
"night_fog;0.05;0.05;0.1;5.0;30.0;3.0",
"morning_mist;0.7;0.75;0.8;2.0;20.0;5.0",
"border_void;0.0;0.0;0.0;1.0;8.0;2.0"
]
Fog Zone Format
# zoneName;centerX;centerZ;radius;preset;priority[;dayPreset;nightPreset]
zones = [
"dark_woods;100;-200;80;cursed_forest;10;morning_mist;night_fog"
]
Weather Fog Format
# weatherType;fogPreset
weatherFogPresets = [
"RAIN;morning_mist",
"THUNDER;purge"
]
Calendar Structure Example
monthNames = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
"Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"]
daysPerMonth = [30] # A single value applies to all months
dayNames = ["Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"]
dateFormat = "§7{dayName} {day} {monthName}, An {year} — {hour}h{minute}"
Data Storage
| File |
Contents |
world/data/rpimmersion/calendar.json |
Current RP date and pause state |
Technical Notes
- Fog transitions use a fixed start/target interpolation model. The "from" value is captured at the moment a new fog is set, ensuring a clean linear ease-in/out regardless of how many transitions overlap.
- Camera shake adds delta values to the existing camera angles rather than replacing them, making it additive and fully compatible with Sodium, Embeddium, Optifine, Oculus, and any other rendering mod.
- No continuous packet spam — fog state is recalculated every N ticks (configurable, default 3 seconds) per player, and a packet is only sent if the resolved state differs from what was last sent.
- RpEssentials integration reads named zones through cached reflection, and uses
RpEssentialsPermissions, RpEssentialsScheduleManager and ImmersivePresetHelper directly. A missing or incompatible method never crashes the tick: the calls are guarded.
- Client sync: HUD, camera lock and override permissions travel in a single
ClientSettingsPacket. The calendar packet carries its own display mode and HUD options, the client never reads server config files.
评论 0
登录后参与评分
还没有评论,来抢沙发吧