Hourglass 是一款 Minecraft Forge 模组,让你掌控时间的流逝。它允许你自定义昼夜循环的长度,并通过加速时间流逝来改变 Minecraft 的睡眠机制。
功能特性
该模组(可选地)用平滑自然的清晨过渡替代原版睡眠功能:当你躺在床上时,它会加速时间流逝。在多人游戏中,当前正在睡觉的玩家比例越高,时间流逝得越快。这消除了对任何睡眠投票系统或玩家数量阈值的需求,因为无论多少名玩家参与,都会影响夜晚的持续时长。
Hourglass 允许自定义昼夜循环的持续时间,并可以独立控制白天和黑夜的速度。不同于原版的 20 分钟时长,你可以放慢时间,使 Minecraft 中的一整天与现实生活中的一天一样长;或者加快夜晚的流逝速度,以获得更宽容的游戏体验。
Hourglass 还提供了一系列时间效果,这些效果可能会加速 Minecraft 中各种元素的进程,以匹配当前的时间流速。示例包括作物生长、草的生长、天气变化、药水效果、熔炉、漏斗等。大多数时间效果默认处于禁用状态,但可以通过设置相应的 配置选项 来启用它们。
兼容性
Hourglass 与以下模组兼容:
睡眠投票模组
Hourglass 兼容那些启用睡眠投票或拥有睡眠百分比系统的模组(如 Quark 和 Morpheus),但它们与此模组的睡眠功能存在冲突。应在相应模组中禁用这些功能,或者禁用 Hourglass 中的睡眠功能。可通过命令或配置文件修改 enableSleepFeature 选项来禁用睡眠功能。
其他兼容性说明
目前仅支持主世界(Overworld)。然而,Minecraft 中的大多数维度(包括自定义维度)的时间信息都源自主世界,因此将以相同的速率流逝时间。
命令
/hourglass config <config-key> [<value>]
修改或显示指定配置选项的当前值。
如果省略 <value> 参数,此命令将显示配置选项的当前值。
部分配置无法通过此命令访问,需要通过配置文件进行修改。
/hourglass query timeSpeed
显示当前时间流逝的速度。
/hourglass query sleeperCount
显示当前维度中正在睡觉的玩家比例。
配置
所有配置值都可以在运行时更改,无需重新加载游戏。
虽然许多配置选项可以通过 配置命令 访问,但有些只能通过查看模组的配置文件来访问。大部分选项位于模组的 服务器配置文件 中,适用于单人世界和多人服务器。少数客户端专用选项则存在于 客户端配置文件 中。
整合包开发者可以在测试世界中调整服务器设置,然后将文件移动到整合包的 ./defaultconfigs 文件夹中,从而自定义 Hourglass 的服务器设置。Forge 会将 defaultconfigs 文件夹中的所有文件复制到所有新建世界的 serverconfig 文件夹中。
在自定义 Hourglass 时,时间速度是通过乘数控制的。值为 1 等同于原版速度(完整的昼夜循环为 20 分钟)。将 daySpeed 和 nightSpeed 设置为 0.5 会使时间速度减半,将完整一天的时长延长至 40 分钟。同样,将配置速度加倍至 2.0 会使一天缩短为从早晨到次日早晨仅 10 分钟。
警告: 将 daySpeed 和 nightSpeed 设置为高于 3600 的值可能对光敏性癫痫患者不安全。
默认服务器配置
相对于 Minecraft 文件夹的位置:
- 单人世界:
./saves/<save>/serverconfig/hourglass-server.toml
- 多人服务器:
./world/serverconfig/hourglass-server.toml
[time]
#白天时间流逝的速度。
#白天定义为从次日 12500(黄昏中点)到 23500(黎明中点)之间的任何时间。
#原版速度:1.0
#范围:0.0 ~ 24000.0
daySpeed = 1.0
#夜晚时间流逝的速度。
#夜晚定义为从 12500(黄昏中点)到 23500(黎明中点)之间的任何时间。
#原版速度:1.0
#范围:0.0 ~ 24000.0
nightSpeed = 1.0
[time.effects]
#启用后,此效果会将天气变化速度与当前时间速度同步。
#即:时间流逝越快,降雨停止得也越快。晴天不受影响。
#设置为 SLEEPING 时,仅当至少有一名玩家在某维度睡觉时生效。
#注意:如果游戏规则 doWeatherCycle 为 false,则此设置不适用。
#允许值:NEVER, ALWAYS, SLEEPING
weatherEffect = "SLEEPING"
#启用后,此效果会将随机刻速度与当前时间速度同步,强制作物、树木和草的生长速度等于 baseRandomTickSpeed 乘以当前时间速度。
#设置为 SLEEPING 时,除非至少有一名玩家在某维度睡觉,否则 randomTickSpeed 将设为 baseRandomTickSpeed。
#有关随机刻速度影响的更多信息,请参阅:https://minecraft.fandom.com/wiki/Tick#Random_tick
#警告:此设置会覆盖 randomTickSpeed 游戏规则。若要修改基础随机刻速度,
#请使用 baseRandomTickSpeed 设置,而不是直接更改游戏规则。
#允许值:NEVER, ALWAYS, SLEEPING
randomTickEffect = "NEVER"
#randomTickEffect 时间效果使用的基础随机刻速度。
#范围:> 0
baseRandomTickSpeed = 3
#启用后,此效果会使药水效果进度与当前时间速度相匹配。
#如果时间速度小于或等于 1.0,则此效果不生效。
#这可能会对拥有大量玩家的服务器性能产生负面影响。
#设置为 ALWAYS 时,此效果适用于该维度内的所有玩家,无论白天还是夜晚。
#设置为 SLEEPING 时,此效果仅适用于正在睡觉的玩家。
#允许值:NEVER, ALWAYS, SLEEPING
potionEffect = "NEVER"
#启用后,此效果会使玩家饥饿效果进度与当前时间速度相匹配。
#这将导致在食物等级满时恢复更快,在食物等级过低时受到伤害更快。
#如果时间速度小于或等于 1.0,则此效果不生效。
#设置为 ALWAYS 时,此效果适用于该维度内的所有玩家,无论白天还是夜晚。不建议在高难度设置下使用。
#设置为 SLEEPING 时,此效果仅适用于正在睡觉的玩家。
#允许值:NEVER, ALWAYS, SLEEPING
hungerEffect = "NEVER"
#启用后,此效果会使方块实体(如熔炉、漏斗和刷怪笼)的进度与当前时间速度相匹配。
#警告:此时间效果对性能有显著影响。
#如果时间速度小于或等于 1.0,则此效果不生效。
#设置为 SLEEPING 时,仅当至少有一名玩家在某维度睡觉时生效。
#允许值:NEVER, ALWAYS, SLEEPING
blockEntityEffect = "NEVER"
[sleep]
#启用或禁用本模组的睡眠功能。启用此设置将修改原版的睡眠机制,并可能与其他睡眠模组冲突。如果禁用,睡眠部分的所有设置均不生效。
enableSleepFeature = true
### 此设置定义单人游戏中的睡眠时间速度 ###
#当所有玩家都在睡觉时,时间流逝的最大速度。
#数值 110 几乎等同于原版中睡觉所需的时间。
#范围:0.0 ~ 24000.0
sleepSpeedMax = 120.0
#当只有 1 名玩家在满员服务器中睡觉时,时间流逝的最小速度。
#范围:0.0 ~ 24000.0
sleepSpeedMin = 1.0
#当所有玩家都在睡觉时,时间流逝的速度。
#设置为 -1 以禁用此功能(当所有玩家都在睡觉时将使用 sleepSpeedMax)。
#范围:-1.0 ~ 24000.0
sleepSpeedAll = -1.0
#此参数定义了插值函数的曲率,用于将睡觉玩家的比例转换为时间速度。
#使用的函数是归一化可调 sigmoid 函数。
#数值 0.5 表示线性关系。
#较小的值使曲线向 X 轴弯曲,较大的值使曲线向 Y 轴弯曲。
#可使用以下图表作为调整曲线的参考:https://www.desmos.com/calculator/w8gntxzfow
#函数作者:Dino Dini:https://dinodini.wordpress.com/2010/04/05/normalized-tunable-sigmoid-functions/
#创意来源:SmoothSleep:https://www.spigotmc.org/resources/smoothsleep.32043/
#范围:0.0 ~ 1.0
sleepSpeedCurve = 0.3
#设置为 'true' 可在玩家早晨醒来时像原版一样清除天气。
#设置为 'false' 可强制天气自然过渡。在启用 accelerateWeather 时增加真实感。
#注意:如果游戏规则 doWeatherCycle 为 false,则忽略此设置。
clearWeatherOnWake = true
#当为 true 时,床界面中将显示时钟。
#玩家可以通过 hideBedClock 配置设置禁用此时钟。
allowBedClock = true
本节定义通知消息的设置。
#所有消息均支持 Minecraft 格式化代码(https://minecraft.fandom.com/wiki/Formatting_codes)。
#所有消息都包含可使用以下格式插入的变量:${variableName}
#type 选项控制消息出现的位置:
# SYSTEM:作为聊天中的消息显示。(例如,“重生点已设置”)
# GAME_INFO:显示在快捷栏上方的游戏信息。(例如,“你现在无法休息,床离得太远了”)
#target 选项控制消息发送给谁:
# ALL:将消息发送给服务器上的所有玩家。
# DIMENSION:将消息发送给当前维度中的所有玩家。
# SLEEPING:将消息发送给当前维度中所有正在睡觉的玩家。
# AWAKE:将消息发送给当前维度中所有清醒的玩家。
[sleep.messages]
#此消息在睡眠周期完成后发送。
[sleep.messages.morning]
#可用变量:
#sleepingPlayers -> 当前维度中正在睡觉的玩家数量。
#totalPlayers -> 当前维度中的玩家总数(不包括旁观者)。
#sleepingPercentage -> 当前维度中正在睡觉的玩家百分比(不包含 % 符号)。
message = "§e§o时光飞逝!"
#设置此消息出现的位置。
#允许的值:SYSTEM, GAME_INFO
type = "GAME_INFO"
#设置消息接收对象。
#目标为 'SLEEPING' 时,会将消息发送给所有刚刚醒来的玩家。
#允许的值:ALL, DIMENSION, SLEEPING, AWAKE
target = "DIMENSION"
#此消息在玩家进入床铺时发送。
[sleep.messages.enterBed]
#可用变量:
#player -> 开始睡觉的玩家。
#sleepingPlayers -> 当前维度中正在睡觉的玩家数量。
#totalPlayers -> 当前维度中的玩家总数(不包括旁观者)。
#sleepingPercentage -> 当前维度中正在睡觉的玩家百分比(不包含 % 符号)。
message = "${player} 现在开始睡觉了。 [${sleepingPlayers}/${totalPlayers}]"
#设置此消息出现的位置。
#允许的值:SYSTEM, GAME_INFO
type = "GAME_INFO"
#设置消息接收对象。
#允许的值:ALL, DIMENSION, SLEEPING, AWAKE
target = "DIMENSION"
#此消息在玩家离开床铺时发送(非因清晨自然唤醒)。
[sleep.messages.leaveBed]
#可用变量:
#player -> 离开床铺的玩家。
#sleepingPlayers -> 当前维度中正在睡觉的玩家数量。
#totalPlayers -> 当前维度中的玩家总数(不包括旁观者)。
#sleepingPercentage -> 当前维度中正在睡觉的玩家百分比(不包含 % 符号)。
message = "${player} 离开了床铺。 [${sleepingPlayers}/${totalPlayers}]"
#设置此消息出现的位置。
#允许的值:SYSTEM, GAME_INFO
type = "GAME_INFO"
#设置消息接收对象。
#允许的值:ALL, DIMENSION, SLEEPING, AWAKE
target = "DIMENSION"
### 默认客户端配置
相对于 Minecraft 文件夹的位置:`./config/hourglass-client.toml`
```toml
[gui]
#当此项为 false 时,如果服务器设置允许,床界面中将显示时钟。
#当此项为 true 时,时钟将被隐藏。
hideBedClock = false
#设置床时钟的对齐方式。
#允许的值:TOP_LEFT, TOP_CENTER, TOP_RIGHT, CENTER_LEFT, CENTER_CENTER, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT
clockAlignment = "TOP_RIGHT"
#此设置通过每 tick 更新时钟位置来防止上床时产生的时钟抖动现象。
#副作用是:与原版不同,首次查看时钟时不会出现抖动。如果 displayBedClock 为 false,则此设置无效。
preventClockWobble = true
#设置时钟与屏幕边缘之间的距离。
#如果 clockAlignment 为 CENTER_CENTER,则此设置无效。
#范围:> 0
clockMargin = 16
#设置床时钟的缩放比例。
#范围:> 1
clockScale = 64
Hourglass is a Minecraft Forge mod that gives you control over the passage of time. It allows you to
customize the length of the day-night cycle and alters the Minecraft sleep mechanic by accelerating
the speed of time.
Features
This mod (optionally) replaces the vanilla sleep functionality with a smooth and natural transition
to morning by accelerating the passage of time while you're in bed. In multiplayer, time will pass
faster depending on the percentage of players who are currently sleeping. This removes the need for
any sleep voting system or player threshold, as any number of players can have an impact on the
duration of the night.
Hourglass allows for customization of the day-night cycle duration, and can control day and night
speed independently. Rather than the vanilla duration of 20 minutes, you can slow down time to make
a day in Minecraft last as long as a day in real life, or speed up the passage of nights for a more
forgiving experience.
Hourglass also provides a number of time effects that may speed up the progression of various
elements in Minecraft to match the current speed of time. Some examples include crop growth, grass
growth, weather, potion effects, furnaces, hoppers, etc. Most of these time effects are disabled by
default but can be enabled by setting their associated config options.
Compatibility
Hourglass is compatible with the following mods:
Sleep Vote Mods
Hourglass is compatible with mods that enable sleep voting or have sleep percentage systems like
Quark and Morpheus, but they conflict with the sleep feature of this mod. These features should
either be disabled in their corresponding mods, or the sleep feature in Hourglass should be disabled.
The sleep feature can be disabled via command or file by modifying the enableSleepFeature option.
Other Compatibility Notes
The Overworld is currently the only dimension supported. However, most dimensions in Minecraft
(including custom dimensions) derive their time information from the Overworld and will therefore
elapse time at the same rate.
Commands
/hourglass config <config-key> [<value>]
Modifies or displays the current value of the specified config option.
If the <value> argument is omitted, this command will display the config option's current value.
Some configurations are not available through this command and need to be accessed via the config files.
/hourglass query timeSpeed
Displays the current speed at which time is elapsing.
/hourglass query sleeperCount
Displays the ratio of players sleeping in the current dimension.
Configuration
All configuration values can be changed at runtime without reloading the game.
While many of the configuration options are accessible through via the
config command, some can only be accessed by visiting the
mod's config files. Most of the options are located in the mod's
server config file in both single-player worlds and multiplayer servers.
A few client-specific options also exist in the client config file.
Modpack developers may customize the Hourglass server settings in their modpack by first tweaking
the server settings in a test world and then moving the file to the ./defaultconfigs folder of
their modpack. Forge will move all files in the defaultconfigs folder into the serverconfig
folder of all newly created worlds.
When customizing Hourglass, the speed of time is controlled using a multiplier. A value of 1 is equivalent
to vanilla speed (20 minutes for a full day-night cycle). Setting daySpeed and nightSpeed to 0.5
will cut the speed of time in half, doubling the duration of a full day to 40 minutes. Likewise,
doubling the configured speed to 2.0 will result in a shortened day lasting only 10 minutes from
one morning to the next.
Warning: Setting daySpeed and nightSpeed to values higher than 3600 may be unsafe for people with photosensitive epilepsy.
Default Server Config
Location relative to Minecraft folder:
- Single-player worlds:
./saves/<save>/serverconfig/hourglass-server.toml
- Multiplayer servers:
./world/serverconfig/hourglass-server.toml
[time]
#The speed at which time passes during the day.
#Day is defined as any time between 23500 (middle of dawn) and 12500 (middle of dusk) the next day.
#Vanilla speed: 1.0
#Range: 0.0 ~ 24000.0
daySpeed = 1.0
#The speed at which time passes during the night.
#Night is defined as any time between 12500 (middle of dusk) and 23500 (middle of dawn).
#Vanilla speed: 1.0
#Range: 0.0 ~ 24000.0
nightSpeed = 1.0
[time.effects]
#When applied, this effect syncs the passage of weather with the current speed of time.
#I.e., as time moves faster, rain stops faster. Clear weather is not affected.
#When set to SLEEPING, this effect only applies when at least one player is sleeping in a dimension.
#Note: This setting is not applicable if game rule doWeatherCycle is false.
#Allowed Values: NEVER, ALWAYS, SLEEPING
weatherEffect = "SLEEPING"
#When applied, this effect syncs the random tick speed with the current speed of time, forcing
#crop, tree, and grass growth to occur at baseRandomTickSpeed multiplied by the current time-speed.
#When set to SLEEPING, randomTickSpeed is set to baseRandomTickSpeed unless at least one player is sleeping in a dimension.
#More information on the effects of random tick speed can be found here: https://minecraft.fandom.com/wiki/Tick#Random_tick
#WARNING: This setting overwrites the randomTickSpeed game rule. To modify the base random tick speed,
#use the baseRandomTickSpeed setting instead of changing the game rule directly.
#Allowed Values: NEVER, ALWAYS, SLEEPING
randomTickEffect = "NEVER"
#The base random tick speed used by the randomTickEffect time effect.
#Range: > 0
baseRandomTickSpeed = 3
#When applied, this effect progresses potion effects to match the rate of the current time-speed.
#This effect does not apply if time-speed is 1.0 or less.
#THIS MAY HAVE A NEGATIVE IMPACT ON PERFORMANCE IN SERVERS WITH MANY PLAYERS.
#When set to ALWAYS, this effect applies to all players in the dimension, day or night.
#When set to SLEEPING, this effect only applies to players who are sleeping.
#Allowed Values: NEVER, ALWAYS, SLEEPING
potionEffect = "NEVER"
#When applied, this effect progresses player hunger effects to match the rate of the current time-speed.
#This results in faster healing when food level is full, and faster harm when food level is too low.
#This effect does not apply if time-speed is 1.0 or less.
#When set to ALWAYS, this effect applies to all players in the dimension, day or night. Not recommended on higher difficulty settings
#When set to SLEEPING, this effect only applies to players who are sleeping.
#Allowed Values: NEVER, ALWAYS, SLEEPING
hungerEffect = "NEVER"
#When applied, this effect progresses block entities like furnaces, hoppers, and spawners to match the rate of the current time-speed.
#WARNING: This time-effect has a significant impact on performance.
#This effect does not apply if time speed is 1.0 or less.
#When set to SLEEPING, this effect only applies when at least one player is sleeping in a dimension.
#Allowed Values: NEVER, ALWAYS, SLEEPING
blockEntityEffect = "NEVER"
[sleep]
#Enables or disables the sleep feature of this mod. Enabling this setting will modify the vanilla sleep functionality
#and may conflict with other sleep mods. If disabled, all settings in the sleep section will not apply.
enableSleepFeature = true
### THIS SETTING DEFINES THE SLEEP TIME-SPEED IN SINGLE-PLAYER GAMES ###
#The maximum speed at which time passes when all players are sleeping.
#A value of 110 is nearly equal to the time it takes to sleep in vanilla.
#Range: 0.0 ~ 24000.0
sleepSpeedMax = 120.0
#The minimum speed at which time passes when only 1 player is sleeping in a full server.
#Range: 0.0 ~ 24000.0
sleepSpeedMin = 1.0
#The speed at which time passes when all players are sleeping.
#Set to -1 to disable this feature (sleepSpeedMax will be used when all players are sleeping).
#Range: -1.0 ~ 24000.0
sleepSpeedAll = -1.0
#This parameter defines the curvature of the interpolation function that translates the sleeping player percentage into time-speed.
#The function used is a Normalized Tunable Sigmoid Function.
#A value of 0.5 represents a linear relationship.
#Smaller values bend the curve toward the X axis, while greater values bend it toward the Y axis.
#This graph may be used as a reference for tuning the curve: https://www.desmos.com/calculator/w8gntxzfow
#Credit to Dino Dini for the function: https://dinodini.wordpress.com/2010/04/05/normalized-tunable-sigmoid-functions/
#Credit to SmoothSleep for the idea: https://www.spigotmc.org/resources/smoothsleep.32043/
#Range: 0.0 ~ 1.0
sleepSpeedCurve = 0.3
#Set to 'true' for the weather to clear when players wake up in the morning as it does in vanilla.
#Set to 'false' to force weather to pass naturally. Adds realism when accelerateWeather is enabled.
#Note: This setting is ignored if game rule doWeatherCycle is false.
clearWeatherOnWake = true
#When true, a clock will appear in the bed interface.
#This clock may be disabled by players via hideBedClock config setting.
allowBedClock = true
#This section defines settings for notification messages.
#All messages support Minecraft formatting codes (https://minecraft.fandom.com/wiki/Formatting_codes).
#All messages have variables that can be inserted using the following format: ${variableName}
#The type option controls where the message appears:
# SYSTEM: Appears as a message in the chat. (e.g., "Respawn point set")
# GAME_INFO: Game information that appears above the hotbar (e.g., "You may not rest now, the bed is too far away").
#The target option controls to whom the message is sent:
# ALL: Sends the message to all players on the server.
# DIMENSION: Sends the message to all players in the current dimension.
# SLEEPING: Sends the message to all sleeping players in the current dimension.
# AWAKE: Sends the message to all awake players in the current dimension.
[sleep.messages]
#This message is sent after a sleep cycle has completed.
[sleep.messages.morning]
#Available variables:
#sleepingPlayers -> the number of players in the current dimension who were sleeping.
#totalPlayers -> the number of players in the current dimension (spectators are not counted).
#sleepingPercentage -> the percentage of players in the current dimension who were sleeping (does not include % symbol).
message = "§e§oTempus fugit!"
#Sets where this message appears.
#Allowed Values: SYSTEM, GAME_INFO
type = "GAME_INFO"
#Sets to whom this message is sent.
#A target of 'SLEEPING' will send the message to all players who just woke up.
#Allowed Values: ALL, DIMENSION, SLEEPING, AWAKE
target = "DIMENSION"
#This message is sent when a player enters their bed.
[sleep.messages.enterBed]
#Available variables:
#player -> the player who started sleeping.
#sleepingPlayers -> the number of players in the current dimension who are sleeping.
#totalPlayers -> the number of players in the current dimension (spectators are not counted).
#sleepingPercentage -> the percentage of players in the current dimension who are sleeping (does not include % symbol).
message = "${player} is now sleeping. [${sleepingPlayers}/${totalPlayers}]"
#Sets where this message appears.
#Allowed Values: SYSTEM, GAME_INFO
type = "GAME_INFO"
#Sets to whom this message is sent.
#Allowed Values: ALL, DIMENSION, SLEEPING, AWAKE
target = "DIMENSION"
#This message is sent when a player leaves their bed (without being woken up naturally by morning).
[sleep.messages.leaveBed]
#Available variables:
#player -> the player who left their bed.
#sleepingPlayers -> the number of players in the current dimension who are sleeping.
#totalPlayers -> the number of players in the current dimension (spectators are not counted).
#sleepingPercentage -> the percentage of players in the current dimension who are sleeping (does not include % symbol).
message = "${player} has left their bed. [${sleepingPlayers}/${totalPlayers}]"
#Sets where this message appears.
#Allowed Values: SYSTEM, GAME_INFO
type = "GAME_INFO"
#Sets to whom this message is sent.
#Allowed Values: ALL, DIMENSION, SLEEPING, AWAKE
target = "DIMENSION"
Default Client Config
Location relative to Minecraft folder: ./config/hourglass-client.toml
[gui]
#When false, a clock is displayed in the bed interface, if server settings allow it.
#When true, the clock is hidden.
hideBedClock = false
#Sets the screen alignment of the bed clock.
#Allowed Values: TOP_LEFT, TOP_CENTER, TOP_RIGHT, CENTER_LEFT, CENTER_CENTER, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT
clockAlignment = "TOP_RIGHT"
#This setting prevents clock wobble when getting in bed by updating the clock's position every tick.
#As a side-effect, the clock won't wobble when first viewed as it does in vanilla. This setting is
#unused if displayBedClock is false.
preventClockWobble = true
#Sets the distance between the clock and the edge of the screen.
#Unused if clockAlignment is CENTER_CENTER.
#Range: > 0
clockMargin = 16
#Sets the scale of the bed clock.
#Range: > 1
clockScale = 64
评论 0
登录后参与评分
还没有评论,来抢沙发吧