如果你希望本模组更新到更高/更低的 Minecraft 版本,请在 GitHub 上提交 Issue。如果没有收到相关请求,我将不会对其进行更新。
AFKAdvertiser
AFKAdvertiser 是一款 Minecraft 模组,它会按设定的时间间隔从列表中随机发送一条聊天消息。
依赖项
本模组依赖于 Fabric-Api。
配置
要配置本模组,请将模组放入你的 mods 文件夹并启动游戏。系统会在 .minecraft\config 目录下创建一个名为 afkadvertiser.txt 的文本文件。该文件的默认内容如下:
60
10
First Line
Second Line
第一行是消息之间的间隔秒数,第二行是随机偏移量(秒),其后所有行均为随机选中的消息。消息数量理论上可以是无限的(实际上最多为 2,147,483,647 条)。
在游戏内,使用 /afkadvertiser 命令切换开关。
计时机制
模组内部的运行原理是:在 interval(间隔)秒后执行一项任务,该项任务会额外增加一个介于零和 random_offset(随机偏移量,浮点数,因此不一定对齐到整数秒)之间的随机秒数。在此额外时间过去后,发送一条随机消息。
因此,两条消息之间的时间间隔为 interval + random(0, random_offset)。
问题反馈
如果你遇到问题或发现了 Bug,请在 GitHub 上提交 Issue。
贡献指南
如果你希望添加某项功能或想自行贡献代码,请先在 GitHub 上开启一个 Feature Request(功能请求)。
IF YOU WANT THE MOD UPDATED TO NEWER/OLDER MC VERSIONS PLEASE MAKE AN ISSUE ON THE GITHUB. IT WON'T BE UPDATED IF I GET NO REQUESTS FOR IT.
AFKAdvertiser
AFKAdvertiser is a Minecraft mod which sends a random chat message from a list on an interval.
Dependencies
The mod depends on Fabric-Api.
Configuration
To configure the mod, put the mod in your mods folder and launch the game. A txt file will be created in .minecraft\config named afkadvertiser.txt. This txt file will have the following contents by default:
60
10
First Line
Second Line
The first line is the interval in seconds between messages, the second is the random offest in seconds, all the following lines are the messages which are randomly selected, there can be an infinite number of messages (well, actually 2,147,483,647).
When in-game, toggle it with /afkadvertiser.
Timing
How the mod internally works is that a task is run after interval seconds, this task then adds an extra random amount of seconds between zero and random_offset (a float, so not alligned to the second), after that extra time has elapsed, it sends a random message.
So the time between messages is interval+random(0,random_offset).
Issues
If you have issues or found a bug, create an issue on github.
Contributing
If you want a feature to be added or want to add something yourself, please first open a feature request on github.
评论 0
登录后参与评分
还没有评论,来抢沙发吧