RSS Gutenberg
一个适用于 Minecraft 1.20.4 的 Fabric 模组,它从 RSS 或 Atom 源获取文章,并将它们以可书的形式在游戏中呈现,你可以向村民或流浪商人购买这些书。
此模组可以完全在服务器端运行,无需在客户端安装。如果安装在客户端,玩家将获得一个包含由本模组生成的所有书的创意菜单;否则,他们只能通过交易获得这些书。
此模组依赖 Fabric API 0.97.3+1.20.4 或更高版本。
配置
配置文件位于 config/rss-gutenberg.json,并在首次启动时自动生成,默认内容如下:
{
"feedUrl": "",
"dateFormat": "DMY",
"authorOverride": "",
"checkSchedule": "0 */12 * * *",
"tradeItem": "minecraft:emerald",
"tradeQuantity": 1
}
| 字段 |
类型 |
默认值 |
描述 |
feedUrl |
string |
"" |
要读取的 RSS 2.0 或 Atom 1.0 源的 URL。 |
dateFormat |
string |
"DMY" |
附加到书籍标题中的日期格式。"DMY" 显示为 DD/MM,"MDY" 显示为 MM/DD。 |
authorOverride |
string |
"" |
强制为每本书设置自定义作者名。留空则使用源中提供的名称(如果未提供,则使用源的域名)。 |
checkSchedule |
string |
"0 */12 * * *" |
检查源的频率,使用 cron 表达式表示。默认每 12 小时检查一次。crontab.guru 是一个很好的网站,可以帮助你了解如何编写这些表达式。 |
tradeItem |
string |
"minecraft:emerald" |
村民和流浪商人出售书籍时收取的物品。 |
tradeQuantity |
int |
1 |
每本书需要支付的数量。 |
持久化
书籍在重启之间保存在 config/rss-gutenberg-books.json 中,因此你的图书馆可以在重启后保留。已经获取的文章通过其 GUID 进行跟踪,不会重复生成。
服务器命令
/rssgutenberg check
触发立即检查源,超出正常计划。需要操作员等级 2。
更新?
我没有计划将此模组更新到游戏的更高版本,除非我个人需要在新版本上运行此模组。我为我运行的私人服务器制作了这个模组,该服务器恰好运行在 1.20.4 上。由于我活跃地在一个将安装此模组的服务器上玩,任何严重错误几乎肯定会得到修补,小改进可能会随着时间的推移而添加,如果我愿意的话,但我自己不会更新它以在更高版本的 Minecraft 上运行,除非我自己需要在更高版本上使用它。如果你这样做,请随意 fork。
Forge/Quilt/NeoForge/Paper/Spigot/Bukkit/破解莫jang并偷偷放入原版?
我没有个人进行任何这些移植的计划,因为我不需要它们,也不认为我会需要。如果你这样做,请随意 fork。
(它 可能 能在 Quilt 上工作,因为大多数 Fabric 模组都可以,但我没有测试过。)
许可证
GNU 通用公共许可证 v3。
RSS Gutenberg
A Fabric mod for Minecraft 1.20.4 that pulls articles from an RSS or Atom feed and delivers them in-game as written books you can buy from Villagers or Wandering Traders.
This mod can run entirely server-side without issue, and does not need to be installed client-side. If it is installed client-side, players will get a creative menu containing every book generated by this mod, otherwise, they can only get the books through trading.
This mod depends on Fabric API 0.97.3+1.20.4 or newer.
Configuration
The config file is located in config/rss-gutenberg.json, and is automatically generated on first launch with the following defaults:
{
"feedUrl": "",
"dateFormat": "DMY",
"authorOverride": "",
"checkSchedule": "0 */12 * * *",
"tradeItem": "minecraft:emerald",
"tradeQuantity": 1
}
| Field |
Type |
Default |
Description |
feedUrl |
string |
"" |
URL of the RSS 2.0 or Atom 1.0 feed to read. |
dateFormat |
string |
"DMY" |
Date format appended to book titles. "DMY" gives DD/MM, "MDY" gives MM/DD. |
authorOverride |
string |
"" |
Forces a custom author name on every book. Leave blank to use the name from the feed (or the feed's domain if none is provided). |
checkSchedule |
string |
"0 */12 * * *" |
How often to check the feed, as a cron expression. The default checks every 12 hours. crontab.guru is a good site for figuring out how to write these. |
tradeItem |
string |
"minecraft:emerald" |
The item charged by Villagers and Wandering Traders for the books. |
tradeQuantity |
int |
1 |
How many of that item each book costs. |
Persistence
Books are saved to config/rss-gutenberg-books.json between restarts, so your library survives a reboot. Articles that have already been fetched are tracked by their GUID and won't be duplicated.
Server command
/rssgutenberg check
Triggers an immediate feed check outside the normal schedule. Requires operator level 2.
Updates?
I have no plans to update this mod to newer versions of the game, unless I personally need this mod to run on a newer version. I made this mod for a private server I run, which happens to be running on 1.20.4. Because I actively play on a server this mod will be installed on, any severe bugs will almost certainly get patched, and small improvements may be added over time if I can be bothered to do so, but I myself won't update it to run on newer versions of Minecraft unless I myself need it on a newer version. If you do, feel free to fork.
Forge/Quilt/NeoForge/Paper/Spigot/Bukkit/BreakIntoMojangAndSneakItIntoVanilla?
No plans for me to personally do any of those ports, as I personally don't need them, and don't think I ever will. If you do, feel free to fork.
(It will probably work on Quilt as most Fabric mods do, but I haven't tested this.)
License
GNU General Public License v3.
评论 0
登录后参与评分
还没有评论,来抢沙发吧