Footprint
Footprint 是一款服务端 Fabric 模组,旨在当玩家快速探索大量地形(尤其是使用鞘翅飞行)时,帮助保持你的世界文件大小可控。
服务器管理员经常使用诸如 MCA Selector (非常棒的工具)来修剪那些仅加载过极短时间区块。Footprint 则通过根本不保存这些区块,使这一过程自动化。
有时你可能希望即使某个区块加载时间不够长也要将其保存,为此该模组也提供了一些配置选项。
Footprint 不会删除已经保存的区块,因此它永远不会减少你的世界文件大小。你仍然可以手动修剪旧区块。
感谢 Magistermark 提供的易于使用的配置库。
已知问题
在当前版本中,存在一个问题:当区块被多次生成时会导致重复实体生成。此问题正在修复中。
功能特性
- 安装模组后首次启动服务器以生成配置文件(位于服务器
config 文件夹中的 footprint_config.properties)。该配置文件允许你设置何时应保存区块的条件。
- 每个选项在文件内部都有详细解释。
- 重启服务器以应用更改。
- 选项包括:
- 区块仅在玩家加载达到指定刻数后才被保存(默认值:1200 刻,即 60 秒)。这使用了原版游戏用于本地难度追踪的
inhabitedTime 值。
- 你可以开启或关闭多种操作,无论
inhabitedTime 如何,这些操作都会导致区块被保存。其中每一项还可以额外指定一个围绕该事件的区块范围以强制保存。
- 玩家放置方块(默认:开启,范围 0)
- 玩家破坏方块(默认:开启,范围 0)。示例:防止玩家多次快速获取同一区块的资源。
- 实体受伤(默认:关闭,因为实体自然受伤的情况相当频繁)
- 玩家拾取物品(默认:开启,范围 1)
- 玩家掉落物品(默认:开启,范围 1)。示例:避免在飞越新地形时掉落物品的丢失。
免责声明
我是一名新手模组开发者。我为自己正在运营的服务器制作了这款模组,并将其作为学习机会。因此,代码可能略显杂乱——请谨慎使用。务必定期备份!!(此模组甚至可能让备份变得更轻松。)
这里存在一定的权衡:区块生成会对服务器造成较大压力,而未保存的区块稍后可能需要重新生成。因此,如果你的主要问题是世界文件大小,那么这款模组会有所帮助;但如果你正面临卡顿问题,则不建议使用!
欢迎随意使用本代码,也欢迎提出改进建议! (-:
Footprint
Footprint is a server-side Fabric mod to help keep your world file size manageable when players explore lots of terrain quickly, especially using Elytra.
Server admins often use (great) tools like MCA Selector to prune chunks that have only been loaded for a very short time. Footprint simply makes this process automatic by not saving those chunks in the first place.
There may be reasons you want a chunk to be saved even though it wasn't loaded for long enough, the mod also has a few config options for that.
Footprint does NOT delete chunks that have already been saved, so it will never decrease your world size. You can still prune old chunks manually.
Thanks Magistermark for a very easy to use config library.
Known Issue
In the current version, there is an issue causing duplicate entities to spawn when chunks are generated multiple times. This is being worked on.
Features
- Load the server once with the mod installed to generate the config file (
footprint_config.properties in your server's config folder). This config allows you to set conditions for when a chunk should be saved.
- Every option is explained within the file itself.
- Restart the server to apply changes.
- Options are:
- Chunks are only saved after they've been loaded by players for a specified amount of ticks (default: 1200, which is 60 seconds). This uses the
inhabitedTime value tracked by the vanilla game for local difficulty.
- There are a bunch of actions you can turn on/off that will cause a chunk to be saved regardless of the
inhabitedTime. Each of these can additionally specify a range of chunks around the event to also force save.
- Block placed by player (default: on, range 0)
- Block broken by player (default: on, range 0). Example: to prevent players from quickly grabbing a resource from the same chunk multiple times.
- Entity hurt (default: off, because entities get hurt naturally quite often)
- Item picked up by player (default: on, range 1)
- Item dropped by player (default: on, range 1). Example: to avoid loss of items dropped while flying over new terrain.
Disclaimer
I'm a new modder. I needed this for a server I'm working on and made it as a learning opportunity. Therefore, it could be a little messy - use with caution. Make regular backups!! (This mod may even make that easier.)
There is a bit of a tradeoff here: chunk generation causes a lot of strain on the server, and chunks that aren't saved may need to be generated again later. So this mod is helpful if world size is your main issue, and not if you're having trouble with lag!
Feel free to use the code as you please, and improvement suggestions are welcome! (-:
评论 0
登录后参与评分
还没有评论,来抢沙发吧