Get SysTime
A simple data pack that allows you to get your system time in Minecraft.
截图
介绍
GetSysTime
Bring the real-world clock into Minecraft commands.
GetSysTime is a server-side data pack that reads the local time from the machine running your world and exposes the hour, minute, and second through a scoreboard and command storage. Use it to build clocks, scheduled events, daily rewards, time-based mechanics, or anything else that needs the real time of day.
No mod or resource pack is required.
Features
- Retrieves the current system time on demand
- Provides the hour, minute, and second as easy-to-use scoreboard values
- Also exposes the time through command storage on supported versions
- Works in single-player and on dedicated servers
- Includes setup checks and a complete uninstall function
- Supports Minecraft Java Edition snapshots from 23w03a onward
On a dedicated server, GetSysTime reads the server host’s clock and time zone, not each player’s local time.
Installation
- Download the version of GetSysTime that matches your Minecraft version.
- Place the downloaded
.zipfile in your world’sdatapacksfolder. - Join the world or run
/reloadif it is already open. - Stand in a safe location inside an always-loaded chunk, preferably near the world spawn, then run:
/function getsystime:set
The setup function places a repeating command block at your position and a marker inside it. The block at that position will be replaced. Running the setup function again safely replaces the previous GetSysTime installation.
Dedicated servers must have command blocks enabled in server.properties:
enable-command-block=true
Usage
Whenever you need the current time, run:
/function getsystime:get
The following fake players in the GetSysTime objective are updated with numeric values:
| Score holder | Value |
| — | — |
| $Hour | Current hour |
| $Minute | Current minute |
| $Second | Current second |
For example, you can read them directly with:
/scoreboard players get $Hour GetSysTime
/scoreboard players get $Minute GetSysTime
/scoreboard players get $Second GetSysTime
Or display the objective while testing:
/scoreboard objectives setdisplay sidebar GetSysTime
The raw time is also available at getsystime:values input. On snapshot 23w31a and newer, the individual time fields are stored under getsystime:values time as well.
GetSysTime updates these values only when getsystime:get is called, so other data packs can decide how often they need to refresh the time.
Uninstallation
Before deleting the data pack, run:
/function getsystime:uninstall
This removes the command block, marker, scoreboard objective, and storage data created by GetSysTime. You can then remove the .zip file from the world’s datapacks folder.
Important notes
- GetSysTime uses a command block’s timestamp to read the host system time, so the setup chunk must remain loaded.
- The setup function enables the
sendCommandFeedbackgame rule, which is required for the system to work. - Commands require cheats in single-player or a sufficient permission level on a server.
- For Minecraft versions older than 23w03a, see the legacy version on Planet Minecraft.
Credits and license
Created by EclairDeFeu360.
GetSysTime is licensed under CC BY-SA 4.0. By downloading the data pack, you agree to its license.
Support the creator
- EclairDeFeu360: Buy Me a Coffee
常见问题
Get SysTime 支持哪些 Minecraft 版本?
Get SysTime 支持 Minecraft Java 版 1.19–26.1.2,共 27 个版本。下载时注意选择和你游戏版本一致的文件。
Get SysTime 怎么安装?
新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。
EclairDeFeu360 的其他作品
查看全部 →
All Tropical Fish Collection
此资源包需搭配 All TropicalFish 数据包使用,可让你收集所有种类的热带鱼。
All Tropical Fish Datapack
This datapack allows you to collect all 3072 tropical fish variants in Minecraft with a "fishdex" on advancements gui.
Colourful Tropical Fish
See tropical fish real texture in your inventory
Vanilla Advancement Precisions
This data pack stores all the information about your progress!
评论
登录后评论和评分