TimeLens
探索你的 Minecraft 世界的过去。
TimeLens 利用 CoreProtect 已经记录的方块历史,重构你世界中某个区域在较早时间点的外观,并将其展示给单个玩家。
现实世界不会被修改。TimeLens 读取 CoreProtect 的记录,计算出你所请求时刻每个受影响方块的状态,并将这些方块作为私有叠加层发送给一名玩家的客户端。服务器继续像往常一样持有、模拟和提供真实世界的数据,所有其他在线玩家看到的都是当前未改变的世界。
TimeLens 是一个可视化工具。它不是回滚工具。 它从不写入世界,也从不修改 CoreProtect 的数据。
/timelens 7d
/timelens 2026-08-20 14:30
/timelens exit
安装前请阅读
这是一个 Alpha 版本。
TimeLens 的核心承诺——即历史视图仅对请求它的玩家可见——已通过设计和代码审查得到验证,但尚未在两个客户端连接至实时服务器的情况下得到确认。请勿在生产服务器上运行此插件。
如果你想帮助测试,验证清单位于仓库中,非常欢迎报告任何错误之处。
要求
|
|
| 服务器 |
Paper 1.21.11 或其分支 |
| Java |
21 或更高版本 |
| 必需依赖 |
CoreProtect 24.0 或更高版本 |
CoreProtect 是必需的依赖项。 它是本版本中唯一的来源历史记录的方式,如果没有它,TimeLens 将拒绝启用。CoreProtect 的 API 也必须启用,这意味着 plugins/CoreProtect/config.yml 中的 api-enabled: true。
TimeLens 使用仅限 Paper 的 API,不会在 Spigot 或 CraftBukkit 上加载。不支持 Folia,也从未进行过测试。
TimeLens 只能显示 CoreProtect 已经记录的历史。在一个最近才安装 CoreProtect 的服务器上,目前还没有可显示的历史。
使用方法
站在你想查看的位置,然后指定一个时间点。这可以是从现在倒推的时长,也可以是一个日历日期。
/timelens 30m
/timelens 7d
/timelens 2026-08-20
/timelens 2026-08-20 14:30
TimeLens 在处理过程中会回复,然后报告其发现的内容。
TimeLens > Loading world history from 7 days ago...
TimeLens > Viewing the world from 7 days ago.
TimeLens > 1,284 blocks restored within 48 blocks of you.
TimeLens > Use /timelens exit to return to the present.
如果建筑的部分缺失,说明视图范围小于建筑范围。传递半径参数以扩大范围。
/timelens 7d 96
当视图打开时,你会被固定在原地,无法破坏、放置或与方块交互。环顾四周不受限制,退出后恢复正常移动。
接受的时间格式
时长(从当前时间倒推):
| 后缀 |
单位 |
示例 |
s |
秒 |
45s |
m |
分钟 |
30m |
h |
小时 |
2h |
d |
天 |
7d |
w |
周 |
2w |
不接受月和年作为时长,因为它们的长度不明确。请使用日期代替。
日历时刻(按服务器所在时区读取):
| 格式 |
含义 |
2026-08-20 |
当天的开始 |
2026-08-20 14:30 |
当天的 14:30 |
2026-08-20 14:30:45 |
精确到秒 |
14:30 |
今天的早些时候 |
请注意,时间是按服务器的时区读取的,而不是玩家的时区。例如,主机运行在 UTC 而玩家在欧洲,那么 /timelens 14:30 将被解析为 UTC 时间的 14:30。
命令
| 命令 |
描述 |
/timelens <when> [radius] |
查看该时刻的区域外观 |
/timelens exit |
返回当前时间 |
/timelens status |
显示你当前打开的视图 |
/timelens help |
列出可用命令 |
所有子命令均不区分大小写并支持 Tab 补全。可选的 [radius] 覆盖为该次视图配置的半径。
权限
| 权限 |
默认值 |
授予 |
timelens.use |
op |
全部四个子命令 |
timelens.admin |
op |
保留用于未来的管理功能 |
在本版本中,timelens.admin 不授予任何权限。它的存在是为了让权限组可以在后续版本添加管理命令之前一次性设置好。
配置
view:
radius: 48
vertical-radius: 48
maximum-radius: 96
freeze-movement: true
block-interactions: true
history:
maximum-lookback: 30d
maximum-results: 25000
messages:
prefix: "<green>TimeLens <dark_gray>></dark_gray> "
view.radius 是最重要的设置。视图仅重构其中的方块,因此如果建筑延伸得更远,看起来只有一半被还原。TimeLens 会在每次视图中报告其使用的半径,从而使原因显而易见。
值在启动时进行验证。任何不可用的值都会在控制台中报告,并被替换为随附的默认值,因此文件中的错误不会导致插件无法启用。
已测量的内容
- 重构结果与来自真实 CoreProtect 数据库的 1,971 个位置中的独立 SQL 计算完全一致(1,971/1,971)。
- 在主线程上进行最多 2,400 个方块的渲染准备成本为 0.5 到 2.8 毫秒(在 Paper 1.21.11 上,一个服务器刻为 50 毫秒)。
- 历史查找在主服务器线程之外运行,因此数据库工作不会影响刻时间。
- 两个独立的限制约束了单次视图的成本。超过任一限制的请求将被拒绝并附带解释,而不是缓慢渲染。
- 83 个单元测试,以及从全新签出进行的干净构建。
当前限制
请在报告行为问题时先阅读此部分。
- 视图是玩家专属的。 只有发起请求的玩家能看到过去。这是设计如此。
- 仅重建方块状态。 聊天、命令、容器交易和交互均被忽略。
- 实体未被重建。 生物、宠物、村民、船只、矿车、物品展示框、盔甲架和掉落物均以当前状态显示。这无法与 CoreProtect 抗衡,因为 CoreProtect 仅记录实体的死亡时间地点,从不记录其站立或移动的位置。
- 背包和容器内容未被重建。 历史中的箱子显示为一个箱子,打开它只会看到当前的内容。
- 方块实体和 NBT 数据可能不完整,包括告示牌文本、旗帜图案和头颅所有者,因为 CoreProtect 的方块历史记录并不包含所有这些信息。
- 自查看时刻之后添加的方块会直接消失,因为当时那里什么都没有。这也意味着一个空区域和一个 TimeLens 未覆盖的区域看起来可能是一样的。
- 视图不会跟随你移动。 它在你站立的位置渲染一次后便固定下来。
- 碰撞仍基于真实世界。 服务器并不知道你的历史视图,因此最近建造的方块对你来说虽然不可见,但仍然是实心的。出于这个原因,在查看期间移动会被阻止。
- 已回滚的历史记录会被跳过。 CoreProtect 标记为已回滚的更改不再反映在世界中,因此逆转它会偏离事实而非接近真相。
- 重建精度约为 1 秒,因为历史记录的时间戳精度为一秒。
本版本刻意未包含以下功能:时间线回放、图形界面、方块检查、贡献者可视化、对比模式、回滚、Folia 支持以及指标统计。基础功能应先证明其自身价值。
链接
根据 MIT 许可证发布。
TimeLens
Explore your Minecraft world's past.
TimeLens reconstructs how an area of your world looked at an earlier point in time and shows it to a single player, using the block history that CoreProtect has already recorded.
The real world is never modified. TimeLens reads CoreProtect's records, works out what each affected block was at the moment you asked for, and sends those blocks to one player's client as a private overlay. The server continues to hold, simulate and serve the real world exactly as before, and every other player online sees the present, unchanged.
TimeLens is a visualisation tool. It is not a rollback tool. It never writes to the world and never modifies CoreProtect's data.
/timelens 7d
/timelens 2026-08-20 14:30
/timelens exit
Please read before installing
This is an alpha release.
The central promise of TimeLens, that a historical view is visible only to the player who requested it, has been verified by design and by code review, but it has not yet been confirmed with two clients on a live server. Please do not run this on a production server.
If you would like to help test it, the validation checklist is in the repository, and reports of anything it gets wrong are very welcome.
Requirements
|
|
| Server |
Paper 1.21.11, or a fork of it |
| Java |
21 or newer |
| Required dependency |
CoreProtect 24.0 or newer |
CoreProtect is a required dependency. It is the only source of history in this release, and TimeLens will refuse to enable without it. CoreProtect's API must also be enabled, which means api-enabled: true in plugins/CoreProtect/config.yml.
TimeLens uses Paper-only APIs and will not load on Spigot or CraftBukkit. Folia is not supported and has never been tested.
TimeLens can only show history that CoreProtect has already recorded. On a server where CoreProtect was installed recently, there is no past to show yet.
How to use it
Stand where you want to look, then ask for a point in time. This can be an age counted back from now, or a calendar date.
/timelens 30m
/timelens 7d
/timelens 2026-08-20
/timelens 2026-08-20 14:30
TimeLens replies while it works, then reports what it found.
TimeLens > Loading world history from 7 days ago...
TimeLens > Viewing the world from 7 days ago.
TimeLens > 1,284 blocks restored within 48 blocks of you.
TimeLens > Use /timelens exit to return to the present.
If part of a build is missing, the view was smaller than the build. Pass a radius to widen it.
/timelens 7d 96
While a view is open you are held where you stood, and you cannot break, place or interact with blocks. Looking around is unrestricted, and normal movement returns as soon as you exit.
Accepted time formats
An age, counted back from now:
| Suffix |
Unit |
Example |
s |
seconds |
45s |
m |
minutes |
30m |
h |
hours |
2h |
d |
days |
7d |
w |
weeks |
2w |
Months and years are not accepted as ages, because their length is ambiguous. Use a date instead.
A calendar moment, read in the server's own time zone:
| Form |
Meaning |
2026-08-20 |
the start of that day |
2026-08-20 14:30 |
that day at 14:30 |
2026-08-20 14:30:45 |
to the second |
14:30 |
earlier today |
Note that times are read in the server's time zone, not the player's. A host running in UTC while its players are in Europe will resolve /timelens 14:30 to 14:30 UTC.
Commands
| Command |
Description |
/timelens <when> [radius] |
View the area as it looked at that moment |
/timelens exit |
Return to the present |
/timelens status |
Show the view you currently have open |
/timelens help |
List the available commands |
All subcommands are case-insensitive and tab-completed. The optional [radius] overrides the configured radius for that single view.
Permissions
| Permission |
Default |
Grants |
timelens.use |
op |
All four subcommands |
timelens.admin |
op |
Reserved for future administrative features |
timelens.admin grants nothing in this release. It exists so that permission groups can be set up once, before later versions add administrative commands.
Configuration
view:
radius: 48
vertical-radius: 48
maximum-radius: 96
freeze-movement: true
block-interactions: true
history:
maximum-lookback: 30d
maximum-results: 25000
messages:
prefix: "<green>TimeLens <dark_gray>></dark_gray> "
view.radius is the setting that matters most. A view only reconstructs blocks inside it, so a build extending further will look half restored. TimeLens reports the radius it used with every view, which makes the cause visible.
Values are validated at startup. Anything unusable is reported in the console and replaced with the shipped default, so a mistake in the file cannot stop the plugin from enabling.
What has been measured
- Reconstruction agrees with an independent SQL calculation on 1,971 of 1,971 positions taken from a real CoreProtect database.
- Main-thread render preparation costs 0.5 to 2.8 ms for up to 2,400 blocks on Paper 1.21.11, where one server tick is 50 ms.
- History lookups run off the main server thread, so the database work does not affect tick time.
- Two independent limits bound the cost of a single view. A request exceeding either one is refused with an explanation rather than rendered slowly.
- 83 unit tests, and a clean build from a fresh checkout.
Current limitations
Please read this before reporting behaviour as a problem.
- Views are player-specific. Only the requesting player sees the past. This is intended.
- Only block state is reconstructed. Chat, commands, container transactions and interactions are ignored.
- Entities are not reconstructed. Mobs, pets, villagers, boats, minecarts, item frames, armour stands and dropped items all appear as they are now. This cannot be closed against CoreProtect, which records only that an entity died, with a time and a place, and never where anything stood or moved.
- Inventories and container contents are not reconstructed. A historical chest is shown as a chest, and opening it shows its present contents.
- Block entity and NBT data may be incomplete, including sign text, banner patterns and skull owners, because CoreProtect's block history does not carry all of it.
- A block added since the viewed moment simply disappears, because nothing was there. This does mean an empty area and an area TimeLens did not reach can look the same.
- The view does not follow you. It is rendered once, around where you stood.
- Collision still uses the real world. The server does not know about your historical view, so a recently built block is invisible to you but still solid. Movement is held still while viewing for exactly this reason.
- Rolled-back history is skipped. A change CoreProtect has marked as rolled back is no longer reflected in the world, so reversing it would move away from the truth rather than towards it.
- Reconstruction is accurate to about one second, because history timestamps have one-second resolution.
Deliberately not included in this release: timeline playback, graphical interfaces, block inspection, contributor visualisation, compare mode, rollback, Folia support and metrics. The foundation should prove itself first.
Links
Released under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧