? 天数计数器数据包
- 一个简单、轻量级的数据包,每天清晨在 Minecraft 中显示当前的天数!
✨ 功能特性
? 自动天数追踪
- 每天日出时显示天数。
- 以动效华丽的金色和黄色文字显示在操作栏(action bar)中
- 新的一天开始时播放悦耳的音效
? 智能且准确
- 直接读取 Minecraft 内置的天数计数器
- 无论当前处于第几天,都能完美兼容现有存档!
- 天数从第 1 天开始计数(不同于 Minecraft 内部从第 0 天开始)。如果你将其添加到已处于第 50 天的世界中,它会立即显示“第 51 天”
⚡ 零配置
- 安装即玩——无需命令
无需手动设置或初始化
极其轻量,对性能影响极小
服务器上的所有玩家均可自动使用
? 沉浸式体验
- 每天清晨令人满足的音效提示
非侵入式的操作栏显示(不会遮挡屏幕)
专业格式化的加粗彩色文本
? 安装方法
- 单人游戏:
下载数据包 .zip 文件
进入你的世界文件夹:.minecraft/saves/[YourWorldName]/datapacks/
将数据包文件放入 datapacks 文件夹
启动你的世界,或者在游戏内运行 /reload
- 多人游戏:
下载数据包 .zip 文件
将其放入服务器的 world/datapacks/ 文件夹
重启服务器,或以管理员身份运行 /reload
? 工作原理
- 每天清晨日出时(白天时间介于 0-100 之间),数据包会执行以下操作:
- 使用 Minecraft 内置的天数计数器检查世界的当前天数
- 加 1 使其更直观(从第 1 天开始而不是第 0 天)
- 以金色/黄色配色在操作栏中显示“Day X”
- 播放悦耳的经验球音效
- 防止在同一天内重复通知
- 数据包智能地记录已显示的天数,确保你
即使连续游玩数小时,也只在每个清晨看到一次通知!
?️ 技术细节
使用的命令:
- scoreboard - 用于追踪天数和显示状态
- execute store result - 读取 Minecraft 的天数和时间的值
- title actionbar - 在快捷栏上方显示天数
- playsound - 播放通知音效
- 无外部依赖:
- 纯原版 Minecraft 数据包
- 不需要模组或插件
- 支持单人和多人服务器
性能:
- 每刻(tick)高效运行,开销极小
- 仅在清晨执行一次显示函数
- 即使在低端设备上也不会造成卡顿或性能问题
? 自定义
想要自定义数据包吗?你可以修改以下内容:
- 音效:
- 编辑 show_day.mcfunction 并替换音效:
- minecraft:block.note_block.chime - 风铃音
- minecraft:entity.player.levelup - 升级音效
- minecraft:ui.toast.challenge_complete - 成就音效
- minecraft:block.note_block.bell - 钟声
- 颜色:
- 修改 show_day.mcfunction 中的 title 命令:
- 将 "color":"gold" 更改为任意 Minecraft 颜色
- 将 "color":"yellow" 更改以自定义数字颜色
- 时机:
- 通过在 tick.mcfunction 中更改 daytime matches 0..100 来调整通知出现的时间
❓ 常见问题
问:这能在已有存档中使用吗?
- 答:可以!它会读取你世界的实际天数,因此无论何时安装都能完美工作。
问:这会影响到我的世界性能吗?
问:我可以重置天数计数器吗?
- 答:计数器跟随世界的实际昼夜循环。你可以使用 /time set day 命令回到第 1 天。
问:这在多人游戏中能用吗?
问:我可以禁用音效吗?
- 答:可以,只需移除或注释掉 show_day.mcfunction 中的 playsound 行即可。
问:如果我通过睡觉跳过夜晚会发生什么?
- 答:数据包仍然有效!它在清晨时间段内每刻进行检查,所以即使你通过睡觉直接跳到清晨,你仍然会看到通知。
? 已知问题
目前暂无!如果遇到任何错误,请在 issue 部分报告。
? 兼容性
✅ 兼容版本:
- Minecraft Java Edition 1.21.x (已在 1.21.11 测试)
- Minecraft Java Edition 1.20.5 - 1.20.6
- 未来的 1.21.x 更新(预计兼容)
❌ 不兼容:
Minecraft Bedrock Edition
低于 1.20 的版本
? 许可证
- 此数据包可免费使用、修改和重新分发。署名是感谢但不是必须的!
? 支持
- 如果你喜欢这个数据包,请考虑:
- ⭐ 留下星级评价
- ? 分享反馈或建议
- ? 分享给可能喜欢它的朋友
? 更新日志
- v1.0.0 - 初始发布
- 每天清晨自动显示天数计数器
- 带音效的操作栏通知
- 智能天数追踪,兼容现有存档
- 支持多人游戏
- 享受追踪你的 Minecraft 冒险吧!?
? 版本历史
- v1.1.0 (最新版): * 实现了 min_format 和 max_format 以提供更广泛的 1.21.x 兼容性。
- 推荐 Minecraft 1.21.1 至 1.21.11 用户使用此版本。
- v1.0.0: * 初始发布。
自动天数追踪和操作栏通知。
查看我的另一个数据包 Uncraftable Item Recipes
如有任何问题,请通过 Discord 联系我
? Day Counter Datapack
- A simple, lightweight datapack that displays the current day count every morning in Minecraft!
✨ Features
? Automatic Day Tracking
- Displays the day count every morning at sunrise.
- Shows in the action bar with a beautiful gold and yellow text animation
- Plays a pleasant sound effect when a new day begins
? Smart & Accurate
- Reads directly from Minecraft's internal day counter
- Works perfectly with existing worlds no matter what day you're on!
- Day counting starts at Day 1 (not Day 0 like Minecraft's internal counter).If you add this to a world that's already on Day 50, it will show "Day 51" immediately
⚡ Zero Configuration
- Install and play - no commands needed
No manual setup or initialization required
Lightweight with minimal performance impact
Works automatically for all players on the server
? Immersive Experience
- Satisfying sound notification every morning
Non-intrusive action bar display (doesn't block your screen)
Professionally formatted with bold, colored text
? Installation
- Singleplayer:
Download the datapack .zip file
Navigate to your world's folder: .minecraft/saves/[YourWorldName]/datapacks/
Place the datapack file into the datapacks folder
Launch your world or run /reload if already in-game
- Multiplayer:
Download the datapack .zip file
Place it in your server's world/datapacks/ folder
Restart the server or run /reload as an operator
? How It Works
- Every morning at sunrise (when daytime is between 0-100), the datapack:
- Checks the world's current day using Minecraft's built-in day counter
- Adds 1 to make it more intuitive (Day 1 instead of Day 0)
- Displays "Day X" in the action bar with a gold/yellow color scheme
- Plays a pleasant experience orb sound effect
- Prevents duplicate notifications until the next day
- The datapack intelligently tracks which day has been displayed, ensuring
you only see the notification once per morning - even if you're playing for hours!
?️ Technical Details
Commands Used:
- scoreboard - For tracking day numbers and display states
- execute store result - Reading Minecraft's day and time values
- title actionbar - Displaying the day count above the hotbar
- playsound - Playing the notification sound
- No External Dependencies:
- Pure vanilla Minecraft datapack
- No mods or plugins required
- Works on both singleplayer and multiplayer servers
Performance:
- Runs efficiently every tick with minimal overhead
- Only executes the display function once per morning
- No lag or performance issues even on lower-end systems
? Customization
Want to customize the datapack? Here's what you can change:
- Sound Effect:
- Edit show_day.mcfunction and replace the sound:
- minecraft:block.note_block.chime - Bell chime
- minecraft:entity.player.levelup - Level up sound
- minecraft:ui.toast.challenge_complete - Achievement sound
- minecraft:block.note_block.bell - Bell tone
- Colors:
- Modify the title command in show_day.mcfunction:
- Change "color":"gold" to any Minecraft color
- Change "color":"yellow" to customize the number color
- Timing:
- Adjust when the notification appears by changing daytime matches 0..100 in tick.mcfunction
❓ FAQ
Q: Does this work on existing worlds?
- A: Yes! It reads your world's actual day count, so it works perfectly no matter when you install it.
Q: Will this affect my world's performance?
- A: No, the datapack is extremely lightweight and runs efficiently every tick.
Q: Can I reset the day counter?
- A: The counter follows your world's actual day cycle. You can reset it using /time set day to go back to Day 1.
Q: Does this work in multiplayer?
- A: Absolutely! All players will see the day notification at the same time.
Q: Can I disable the sound?
- A: Yes, simply remove or comment out the playsound line in show_day.mcfunction.
Q: What happens if I sleep through the night?
- A: The datapack still works! It checks every tick during the morning window, so even if you skip to morning by sleeping, you'll still see the notification.
? Known Issues
None currently! If you encounter any bugs, please report them in the issues section.
? Compatibility
✅ Compatible Versions:
- Minecraft Java Edition 1.21.x (Tested on 1.21.11)
- Minecraft Java Edition 1.20.5 - 1.20.6
- Future 1.21.x updates (likely)
❌ Not Compatible:
Minecraft Bedrock Edition
Versions below 1.20
? License
- This datapack is free to use, modify, and redistribute. Credit is appreciated but not required!
? Support
- If you enjoy this datapack, please consider:
- ⭐ Leaving a star rating
- ? Sharing feedback or suggestions
- ? Sharing with friends who might enjoy it
? Changelog
- v1.0.0 - Initial Release
- Automatic day counter display every morning
- Action bar notifications with sound effects
- Smart day tracking that works with existing worlds
- Multiplayer support
- Enjoy tracking your Minecraft adventures! ?
? Version History
- v1.1.0 (Latest): * Implemented min_format and max_format for broader 1.21.x compatibility.
- Recommended version for users on Minecraft 1.21.1 through 1.21.11.
- v1.0.0: * Initial Release.
Automatic day tracking and action bar notifications.
Check my another Datapack Uncraftable Item Recipes
If having any issues contact me with Discord
评论 0
登录后参与评分
还没有评论,来抢沙发吧