

将 Minecraft 游戏内时间与所选时区的现实世界时间同步。兼容 Bukkit、Spigot、Paper、Forge 和 Fabric,支持服务器端与单人模式。
时间计算方式
Minecraft 以“刻(ticks)”来计量时间:24,000 刻 = 1 天,但第 0 刻对应的是上午 6:00(而非午夜)。RealTimeConverter 会获取配置时区中的现实世界时间,将其转换为一天中的百分比,然后应用 18,000 刻的偏移量,使得现实世界的午夜与游戏内的午夜对齐:
ticks = ((seconds_since_midnight / 86,400) * 24,000 + 18,000) % 24,000
得益于 alignFullTime 选项,游戏内的天数计数器(用于月相变化)得以保留;仅重写一天中的具体时间。
配置说明
每个平台在首次启动时都会生成一个 rtw.properties 文件:
# 时区(tz 数据库格式),例如 Europe/Paris、America/New_York、UTC
timezone=Europe/Paris
# 同步频率,单位为刻(20 刻 = 1 秒)
update-interval-ticks=20
# 禁用原生的昼夜循环,使时间完全由 RTW 控制
freeze-day-night-cycle=true
# ‘*’ 表示所有世界,或为逗号分隔的世界列表
# (Bukkit 名称,例如 ‘world,world_nether’ —— 或 Forge/Fabric ID,例如 ‘minecraft:overworld’)
worlds=*
根据平台不同,配置文件位置如下:
- Bukkit/Spigot/Paper:
plugins/RealTimeWorld/rtw.properties
- Forge:
config/rtw.properties(服务端/单人世界)
- Fabric:
config/rtw.properties
未来开发构想
- 更高级的
/rtw 命令(实时更改时区、强制设定特定时间)
- 支持每个世界使用多个时区(一个世界对应一个国家)
- 两次同步之间进行平滑插值,避免太阳/月亮位置出现明显的“跳跃”
- 提供
rtw-neoforge 模块,以便同时跟踪 NeoForge 分支


Synchronises Minecraft’s in-game time with real-world time, in the time zone of your choice. Compatible with Bukkit, Spigot, Paper, Forge and Fabric, for both server and single-player modes.
How it calculates the time
Minecraft measures time in “ticks”: 24,000 ticks = 1 day, but
tick 0 corresponds to 6.00 am (not midnight). RealTimeConverter
takes the real-world time in the configured time zone, converts it to a
percentage of the day, then applies an offset of 18,000 ticks so that
real-world midnight aligns with in-game midnight:
ticks = ((seconds_since_midnight / 86,400) * 24,000 + 18,000) % 24,000
The in-game day counter (used for moon phases) is
preserved thanks to alignFullTime; only the time of day is rewritten.
Configuration
Each platform generates an rtw.properties file on first launch:
# Time zone (tz database), e.g. Europe/Paris, America/New_York, UTC
timezone=Europe/Paris
# Synchronisation frequency, in ticks (20 ticks = 1 second)
update-interval-ticks=20
# Disables the native day/night cycle so that only RTW controls the time
freeze-day-night-cycle=true
# ‘*’ for all worlds, or a comma-separated list
# (Bukkit name, e.g. ‘world,world_nether’ — or Forge/Fabric ID, e.g. ‘minecraft:overworld’)
worlds=*
File location depending on the platform:
- Bukkit/Spigot/Paper:
plugins/RealTimeWorld/rtw.properties
- Forge:
config/rtw.properties (server-side/single-player world)
- Fabric:
config/rtw.properties
Ideas for future developments
- More advanced
/rtw command (change time zone on the fly, force a specific time)
- Support for multiple time zones per world (one world = one country)
- Smooth interpolation between two synchronisations to avoid visible ‘jumps’
in the sun/moon positions
rtw-neoforge module if you want to track the NeoForge fork as well as Forge
评论 0
登录后参与评分
还没有评论,来抢沙发吧