Season Cache
Minecraft 1.21 - 1.21.? (未经测试 1.21.1 之后的版本) | Fabric | 需要 Serene Seasons
Season Cache 使雪和冰方块与你的 Serene Seasons 配置保持同步。当冬季来临时,地形上会出现雪和冰;当春季到来时,它们会消失。它还构建并维护一个服务器权威的逐区块积雪覆盖地图,供 Nova Reimagined Snow 等配套模组使用,以在 Distant Horizons LOD 地形中驱动准确的光影积雪效果。
功能介绍
如果没有这个模组,Serene Seasons 虽然会改变季节,但世界中的积雪增减仅通过 Minecraft 缓慢的随机刻系统实现。这个过程需要游戏内的天数才能在广大区域产生可见的变化。Season Cache 会在季节转换发生时立即对整个已加载的世界进行同步。
它还解决了 LOD(细节层次)积雪问题。Distant Horizons 使用其自身的几何体渲染超出原版视距范围的地形。如果没有准确的逐区块积雪数据,光影就无从知道哪些远处的区块应该显示积雪。Season Cache 构建了整个探索世界的完整覆盖地图,并将其流式传输给连接的客户机,以便光影包能够使用它。
前置要求
- Minecraft 1.21 - 1.21.? (Java Edition)
- Fabric Loader 0.16.0 或更高版本
- Fabric API
- Serene Seasons 10.x for 1.21.x
可选但推荐:
- Serene Seasons X Distant Horizons 以实现完整的季节性 LOD 覆盖
- Nova Reimagined Shader Pack
- Nova Reimagined Snow(用于光影积雪覆盖的配套模组)
- Distant Horizons(LOD 渲染)
安装指南
- 安装 Fabric Loader 和 Fabric API
- 安装 Serene Seasons
- 将
seasoncache-<version>.jar 放入你的 mods 文件夹
- 启动服务器或单人游戏世界
Season Cache 既适用于专用服务器,也适用于单人游戏。在专用服务器上,只需在服务端安装即可。客户端组件负责处理光影集成,前提是客户端也安装了 Nova Reimagined Snow。
配置
首次启动时,会在 config/seasoncache.json 创建配置文件。
清理模式 (Cleanup mode)
控制同步器是仅移除雪和冰,还是也会放置它们。
AGGRESSIVE(默认):在温暖季节移除雪,在冬季放置雪。世界在两个方向上都与季节保持一致。
CONSERVATIVE:当季节不再支持雪和冰时将其移除,但从不放置新雪。如果你只想进行单向清理,请使用此选项。
预算 (Budget)
控制每个服务器刻同步多少个区块。更高的值可以更快地清理地形,但会增加每刻的时间消耗。
HIGH(默认):每刻 8 个区块,每刻最多 10 毫秒
MEDIUM:每刻 3 个区块,每刻最多 3 毫秒
LOW:每刻 1 个区块,每刻最多 1 毫秒
其他设置
trackSnow: 启用或禁用雪块同步(默认:true)
trackIce: 启用或禁用冰块同步(默认:true)
neverTouchPerennialColumns: 跳过永久寒冷的生物群系,如冻结高峰和冰锥(默认:true)
hysteresisBandWidth: 软化生物群系边界的温度阈值,以避免出现生硬的积雪分界线(默认:0.06)
proximityGateChunks: 同步首先集中在玩家附近的区块(默认:8)
maxChunkDeferMs: 区块被邻近门控延迟的最大时间,之后将无条件处理,以防止在没有附近玩家的区域出现饥饿现象(默认:30000 毫秒)
命令
所有命令都需要至少 2 级操作员权限。
/seasoncache status - 显示当前季节、清理模式、待处理的派生操作、覆盖构建进度、缓存统计信息以及相关的失效进度。
/seasoncache mode aggressive - 在运行时切换到激进模式。
/seasoncache mode conservative - 在运行时切换到保守模式。
/seasoncache build low|high - 以指定的预算开始覆盖构建,不清除现有数据。当构建器提前停止或探索了新区域时使用。
/seasoncache rebuild low|high - 清除所有存储的数据,然后以指定的预算开始全新构建。在地形发生显著变化后或如果覆盖数据看起来不正确时使用。
/seasoncache invalidate all - 立即清除所有内存状态。磁盘上的 epoch 清零将在后台以低优先级运行。使用 /seasoncache status 监控进度。如果需要完全的一致性,请在重启服务器前等待 invalidation=complete。
/seasoncache debug - 显示以你位置为中心的 3×3 区块网格的温度数据。对于每个区块,报告经 SS(Serene Seasons)调整的最小/最大/平均温度以及寒冷区、滞后带和温暖区的列数。有助于诊断意外的积雪或裸露区域。
/seasoncache debugstate - 显示以你位置为中心的 3×3 区块网格的缓存存储状态。对于每个区块,显示静态气候样本(生物群系 ID + 表面 Y)、12 位季节规则掩码、永久标志、该区块在当前 epoch 是否标记为清洁,以及权威积雪状态。
/seasoncache sweep - 强制重新同步所有当前已加载的区块,无论其清洁/扫描状态如何。在可能导致错误同步结果的漏洞修复后使用。
覆盖地图工作原理
服务器启动时,Season Cache 从 Anvil 区域文件中读取整个探索世界的高度图数据,而不会调用区块生成器。它在每个区块的表面采样生物群系和 Serene Seasons 温度,并根据当前季节将其分类为有雪或无雪。这会生成一个完整的逐区块覆盖地图,存储在侧边车文件(sidecar files)中,与你的世界数据并列存放。
当玩家连接时,服务器会将按距离玩家排序的完整覆盖地图作为快照发送。当地图发生变化(季节转换、区块加载)时,增量更新会被流式传输给客户机。Nova Reimagined Snow 接收这些更新并将它们写入 GPU 纹理,光影在渲染原版和 LOD 地形时会采样该纹理。
侧边文件意味着后续服务器启动速度很快。无需从头重新计算覆盖率,Season Cache 会在数秒内从现有文件预热,仅对季节发生变化的区块重新计算。
方块标签:snow_placement_blacklist
在激进模式下,只要天空可见且生物群系足够寒冷,雪就会放置在任意完整立方体方块上。seasoncache:snow_placement_blacklist 标签用于排除那些虽然是完整立方体但不应堆积季节性雪的方块——例如工作台、储物箱及其他类似玩家制作的物品。
默认条目包括:潜影盒、工作台、箱子变体、熔炉变体、附魔台、铁砧变体、书架变体、制图台/箭矢制作台/锻造台、织布机、砂轮、唱片机、音符盒、发射器、投掷器、侦测器、信标以及命令方块。
要通过数据包添加条目,请创建 data/seasoncache/tags/blocks/snow_placement_blacklist.json:
{ "replace": false, "values": ["yourmod:your_block"] }
性能说明
全新安装或清除缓存后的初始覆盖率构建会从磁盘读取区域文件,而非运行世界生成器,因此对于已完全探索的世界,通常在两分钟内即可完成。在此过程中,服务器主线程不会被阻塞。
季节转换期间的积雪与冰块调和使用了缓存的每区块季节规则(每个冷缓存区块仅推导一次),因此在正常游戏过程中不会触发每列 SS 温度查询。移除操作仅限于表面,并跳过不包含任何雪或冰块的区块段。
当前限制
超出玩家原版渲染距离批量添加和移除雪层……比较棘手。棘手之处在于,竞态条件很容易在区块实际被清理或积雪之前将其标记为已清除或已积雪,导致其处于错误状态。我花费了大量时间才使其达到当前的命中率,目前的结果让我满意到足以发布此模组。话虽如此,如果未来我能找到进一步改进的方法,我一定会去做!
兼容性
| 环境 |
状态 |
| 单人游戏 |
是 |
| 专用服务器 |
是 |
| Distant Horizons |
是,通过 Nova Reimagined Snow |
| Nova Reimagined 光影 |
是,通过 Nova Reimagined Snow |
| 其他 Fabric 模组 |
通常为是 |
| Forge / NeoForge |
否 |
许可证
MIT。请参阅 LICENSE 获取完整条款。
致谢
ItsThatNova - 模组作者
GitHub:
Season Cache
Minecraft 1.21 - 1.21.? (untested past 1.21.1) | Fabric | Requires Serene Seasons
Season Cache keeps snow and ice blocks in sync with your Serene Seasons configuration. When winter arrives, snow and ice appear on terrain. When spring comes, they clear. It also builds and maintains a server-authoritative per-chunk snow coverage map that companion mods such as Nova Reimagined Snow can use to drive accurate shader snow in Distant Horizons LOD terrain.
What it does
Without this mod, Serene Seasons changes the season but the world only gains or loses snow through Minecraft's slow random tick system. That process takes in-game days to visibly change large areas. Season Cache reconciles the entire loaded world immediately when a season transition occurs.
It also solves the LOD snow problem. Distant Horizons renders terrain far beyond vanilla render distance using its own geometry. Without accurate per-chunk snow data, shaders have no way to know which distant chunks should show snow. Season Cache builds a complete coverage map of the entire explored world and streams it to connected clients so shader packs can use it.
Requirements
- Minecraft 1.21 - 1.21.? (untested past 1.21.1) (Java Edition)
- Fabric Loader 0.16.0 or later
- Fabric API
- Serene Seasons 10.x for 1.21.x
Optional but recommended:
- Serene Seasons X Distant Horizons for full seasonal LOD coverage
- Nova Reimagined Shader Pack
- Nova Reimagined Snow (companion mod for shader snow coverage)
- Distant Horizons (LOD rendering)
Installation
- Install Fabric Loader and Fabric API
- Install Serene Seasons
- Place
seasoncache-<version>.jar in your mods folder
- Start the server or singleplayer world
Season Cache works on both dedicated servers and singleplayer. On a dedicated server, install it server-side only. The client-side component handles shader integration when Nova Reimagined Snow is also installed on the client.
Configuration
A config file is created at config/seasoncache.json on first launch.
Cleanup mode
Controls whether the reconciler only removes snow and ice, or also places it.
AGGRESSIVE (default): removes snow in warm seasons and places it in winter. The world matches the season in both directions.
CONSERVATIVE: removes snow and ice when the season no longer supports them but never places new snow. Use this if you want one-way cleanup only.
Budget
Controls how many chunks are reconciled per server tick. Higher values clear terrain faster at the cost of more tick time.
HIGH (default): 8 chunks per tick, up to 10 ms per tick
MEDIUM: 3 chunks per tick, up to 3 ms per tick
LOW: 1 chunk per tick, up to 1 ms per tick
Other settings
trackSnow: enable or disable snow block reconciliation (default: true)
trackIce: enable or disable ice block reconciliation (default: true)
neverTouchPerennialColumns: skip permanently cold biomes such as frozen peaks and ice spikes (default: true)
hysteresisBandWidth: softens the temperature threshold at biome boundaries to avoid sharp snow lines (default: 0.06)
proximityGateChunks: reconciliation focuses on chunks near players first (default: 8)
maxChunkDeferMs: maximum time a chunk can be deferred by the proximity gate before being processed unconditionally, preventing starvation in areas with no nearby players (default: 30000 ms)
Commands
All commands require operator level 2.
/seasoncache status - shows current season, cleanup mode, pending derivations, coverage build progress, cache statistics, and invalidation progress when relevant.
/seasoncache mode aggressive - switch to aggressive mode at runtime.
/seasoncache mode conservative -” switch to conservative mode at runtime.
/seasoncache build low|high - starts a coverage build at the specified budget without clearing existing data. Use when the builder stopped early or a new area was explored.
/seasoncache rebuild low|high - clears all stored data, then starts a fresh build at the specified budget. Use after significant terrain changes or if coverage data looks wrong.
/seasoncache invalidate all - clears all in-memory state immediately. On-disk epoch zeroing runs in the background at low priority. Use /seasoncache status to monitor progress. Wait for invalidation=complete before restarting the server if full consistency is required.
/seasoncache debug - shows temperature data for the 3×3 chunk grid centred on your position. For each chunk reports min/max/mean SS-adjusted temperature and the column count in the cold zone, hysteresis band, and warm zone. Useful for diagnosing unexpected snow or bare patches.
/seasoncache debugstate - shows cached store state for the 3×3 chunk grid centred on your position. For each chunk shows the static climate sample (biome ID + surface Y), the 12-bit season rule mask, the perennial flag, whether the chunk is marked clean for the current epoch, and the authoritative snow state.
/seasoncache sweep - force re-reconciles all currently loaded chunks regardless of their clean/swept status. Use after a bug fix that may have caused incorrect reconciliation results.
How the coverage map works
On server start, Season Cache reads heightmap data from Anvil region files for the entire explored world without invoking the chunk generator. It samples the biome and Serene Seasons temperature at the surface of each chunk and classifies it as snowy or not for the current season. This produces a complete per-chunk coverage map stored in sidecar files alongside your world data.
When a player connects, the server sends the full coverage map as a snapshot sorted by distance from the player. As the world changes (season transitions, chunk loads), incremental updates are streamed to clients. Nova Reimagined Snow receives these updates and writes them to a GPU texture that the shader samples when rendering both vanilla and LOD terrain.
The sidecar files mean subsequent server starts are fast. Rather than re-deriving coverage from scratch, Season Cache pre-warms from the existing files in seconds and only re-derives chunks where the season has changed.
Block tag: snow_placement_blacklist
In aggressive mode, snow is placed on any full-cube block where sky is visible and the biome is cold enough. The seasoncache:snow_placement_blacklist tag excludes blocks that are full-cube but should not accumulate seasonal snow - workstations, storage, and similar player-crafted items.
Default entries include: shulker boxes, crafting table, chest variants, furnace variants, enchanting table, anvil variants, bookshelf variants, cartography/fletching/smithing tables, loom, grindstone, jukebox, note block, dispenser, dropper, observer, beacon, and command blocks.
To add entries via datapack, create data/seasoncache/tags/blocks/snow_placement_blacklist.json:
{ "replace": false, "values": ["yourmod:your_block"] }
Performance notes
The initial coverage build after a fresh install or cache wipe reads region files from disk rather than running the world generator, so it typically completes in under two minutes for a fully explored world. The server tick thread is not blocked during this process.
Snow and ice reconciliation during season transitions uses the cached per-chunk season rule (derived once per cold-cache chunk) so no per-column SS temperature queries fire during normal gameplay. Removal is surface-only and skips chunk sections that contain no snow or ice blocks.
Current Limitations
The addition and removal of snow layers in bulk beyond the vanilla render distance of a player is...finicky. Finicky in the sense that it's very easy for race conditions to mark chunks as being cleared or snowed in before they actually have been, leaving them in an incorrect state. I've spent a lot of time getting it to have the hit rate it does currently, and I'm happy with it enough to release the mod. That said, if I eventually figure out how to improve it further I will!
Compatibility
| Environment |
Status |
| Singleplayer |
Yes |
| Dedicated server |
Yes |
| Distant Horizons |
Yes, via Nova Reimagined Snow |
| Nova Reimagined shader |
Yes, via Nova Reimagined Snow |
| Other Fabric mods |
Generally yes |
| Forge / NeoForge |
No |
License
MIT. See LICENSE for full terms.
Credits
ItsThatNova - mod author
GitHub:
评论 0
登录后参与评分
还没有评论,来抢沙发吧