注意事项
如果您正在使用 Kawamood's Waystones 3.5.3 或更高版本,则您不需要此插件。我暂时保留该插件的下载,以防有人确实需要它。我建议您尝试我的插件 PkWaystones Companion 以获得基岩版兼容性。
这是什么?
pkWaystones Fix 是一个 Paper 服务器插件,用于修复在 Paper 26.1.2 build 18 中首次引入的一个错误:该错误导致 Kawamood's Waystones 数据包和 Kawamood's Painting Table 数据包的 GUI 停止工作。您可以在此处查看错误跟踪器 here。此外,还需要安装 Kawamood's Waystones 和/或 Painting Table。
关于此插件
上述错误是由 Paper 延迟桶(barrel)打开/关闭方块状态更新引起的,这导致这些数据包无法检测到传送石或绘画桌被打开。该插件通过拦截玩家与传送石或绘画桌的交互来解决此问题,强制其库存状态立即设为 open=true,并在玩家持有 GUI 时通过重复任务每刻保持其开启状态。它还静默地重新触发通常用于启动 GUI 的数据包进度。
为了实现上述功能,该插件需要记录每个传送石和绘画桌的位置。在首次启动时,它将扫描每个数据包命令存储区并构建所有传送石和绘画桌的本地缓存,存储它们的坐标、维度、名称(仅限传送石)和 ID。Kawamood 的数据包使用隐藏在传送石和绘画桌内部的桶来管理其库存。正是这个缓存使得插件能够识别右键点击的桶是属于传送石、绘画桌还是普通的桶。如果坐标与缓存条目不匹配,则忽略该交互并恢复原版行为。
通过监控传送石和绘画桌的放置或移除,缓存会实时同步,因此当这些物品被放置或移除时,插件无需重新扫描整个服务器。
命令与故障排除
该插件提供了一些可在游戏中运行的命令(需要 OP 权限),以帮助进行故障排除。这些命令包括:
- /pkfix rescan waystones — 从数据包存储手动重建传送石缓存
- /pkfix rescan paintingtable — 从数据包存储手动重建绘画桌缓存
- /pkfix status waystones [page] — 列出所有已缓存的传送石及其坐标,分页显示
- /pkfix status paintingtable [page] — 列出所有已缓存的绘画桌及其坐标,分页显示
- /pkfix reload — 在不重启服务器的情况下重载 config.yml
- /pkfix force — 切换暴力模式(见下文)
暴力模式会对服务器上所有朝下的桶应用修复,无论它们是否属于传送石或绘画桌。这对于故障排除很有用,但长期开启可能会影响性能。
该插件还具有一个可切换的日志系统。日志系统显示实体跟踪、玩家交互、缓存操作以及修复过程本身。您可以在 config.yml 中单独启用或禁用这些日志,以帮助诊断问题。您可以在 plugins 文件夹中的 pkWaystonesfix 文件夹中找到此文件。
NOTICE
If you are using Kawamood's Waystones 3.5.3 or newer then you shouldn't need this plugin. I'm leaving the plugin up for now just in case someone in fact does need it. I do suggest to check out my plugin, PkWaystones Companion, for bedrock compatibility.
What is this?
pkWaystones Fix is a Paper server plugin that fixes a bug first introduced in Paper 26.1.2 build 18 where Kawamood's Waystones datapack and Kawamood's Painting Table datapack GUIs stop working. You can see the bug tracker here. Additionally, Kawamood's Waystones and/or Painting Table are required.
About the plugin
The bug mentioned above is caused by Paper delaying barrel open/close block state updates, which causes these datapacks to never detect that a Waystone or Painting Table was opened. The plugin fixes this by intercepting player interactions with Waystones or Painting Tables, forcing their inventory state to open=true immediately, and keeping it open every tick via a repeating task while the player has the GUI open. It also silently re-triggers the datapack's advancement that normally starts the GUI.
To do any of this, the plugin needs to keep track of where every Waystone and Painting Table is located. On the first startup, it will scan for each datapack's command storage and build a local cache of all Waystones and Painting Tables, storing their coordinates, dimension, name (Waystones only), and ID. Kawamood's datapacks use barrels hidden inside the Waystones and Painting Table to manage their inventories. This cache is what allows the plugin to identify whether a right-clicked barrel belongs to a Waystone, Painting Table, or is just a regular barrel. If the coordinates don't match a cache entry, the interaction is ignored and vanilla behavior takes over.
The cache is kept in sync in real time by monitoring for Waystones and Painting Tables being placed or removed so the plugin doesn't need to rescan the entire server when one of these items are placed or removed.
Commands and Troubleshooting
The plugin offers commands (requires op permission) that can be run in the game to help with troubleshooting. These are:
- /pkfix rescan waystones — manually rebuilds the Waystones cache from datapack storage
- /pkfix rescan paintingtable — manually rebuilds the Painting Table cache from datapack storage
- /pkfix status waystones [page] — lists all cached Waystones with coordinates, paginated
- /pkfix status paintingtable [page] — lists all cached Painting Tables with coordinates, paginated
- /pkfix reload — reloads config.yml without restarting
- /pkfix force — toggles Brute Force mode (see below)
Brute Force mode applies the fix to every downward-facing barrel on the server regardless of if it belongs to a Waystone or Painting Table. This is useful for troubleshooting, but leaving it on permanently may impact performance.
The plugin also has a toggleable logging system. The logging system displays entity tracking, player interactions, cache operations, and the fix itself. These can be individually enabled or disabled in config.yml to help diagnose issues. You can find this in the pkWaystonesfix folder in your plugins folder.
评论 0
登录后参与评分
还没有评论,来抢沙发吧