GhastQoL
经典的快乐恶魂插件。
快乐的恶魂本有潜力成为有史以来最棒的交通工具,不幸的是它们飞行缓慢且难以追赶,当你站在它们身上时还会因为“飞行”而被踢出服务器。这个插件修复了所有这些问题以及其他更多问题。
适用于 Minecraft 21.X & 26.X 的 Paper 插件,为快乐恶魂提供了一系列生活质量优化:
它们飞得更快(对其 flying_speed 属性进行加成),并且在看向玩家时会飞向该玩家。还添加了旋转锁定功能,使在恶魂周围建造变得更加容易。此插件还移除了站在快乐恶魂上时出现的“此服务器上未启用飞行”的错误提示。
不支持:Spigot/Bukkit(使用了仅 Paper 的 API)或 Folia。
插件会在启动时运行自检,并在 Folia 或早于 26 版本的 Minecraft 上禁用自身并输出清晰的日志消息。
配置 (plugins/GhastQoL/config.yml)
speed-multiplier: 3.0 # 原版飞行速度的 3 倍
only-when-ridden: true # true = 仅在玩家骑乘时加速
follow: # 让无人骑乘的恶魂跟随最近的玩家
enabled: true
range: 32.0 # 仅在此距离内的玩家才会被跟随
stop-distance: 4.0 # 接近到此距离后停止靠近
speed: 1.0 # 导航速度倍数
跟随机制
每个恶魂都有一个家(它休息的地方——加载时设置,当骑手离开时重新设置为当前位置,模仿原版行为)。只有在家 range 范围内的玩家才会被跟随,并且不会超出此范围追逐;如果它漂移出去了,它会转向回家。
触发跟随的条件取决于 follow.trigger:
look(默认)— 恶魂会跟随看着它的玩家(在 look-angle 度范围内,如果开启 require-line-of-sight 则需视线畅通)。在他们移开视线后的 look-linger-seconds 秒内继续保持跟随状态,这样快速瞥向别处不会让它立即停下。
timer — 恶魂按照周期跟随:follow-seconds 的追逐时间,然后是 rest-seconds 的原版正常飞行时间,循环往复。
调优建议:range 是家的牵引半径;look-angle 扩大/缩小“看着它”的锥形区域;speed 缩放滑行速度;stop-distance 是它靠近的最大距离。
编辑后使用 /ghastqol reload 重载配置(权限 ghastqol.reload,默认为 OP)。
命令
/ghastqol reload — 重载配置(权限 ghastqol.reload,默认为 OP)。
/ghastqol rotate — 将你正在骑乘的(或在 rotate.range 范围内的最近一只)快乐恶魂的偏航角调整为 0°,使其与方块网格对齐。在使用恶魂作为建筑平台时非常有用。权限 ghastqol.rotate(默认:所有人)。
/ghastqol check — 看向(或站在附近)一只恶魂并运行此命令,以查看它是否附加了跟随目标和速度加成,以及其家和范围信息。它会即时重新附加任何缺失的部分——非常适合那些成长或重载后丢失了我们逻辑的恶魂。
/ghastqol settings — 列出所有可编辑的设置及其当前值。
/ghastqol settings <path...> <value> — 实时更改设置(无需重启或重载)。
空格分隔的路径映射到配置键,因此 follow enabled 表示 follow.enabled。
示例:/ghastqol settings speed-multiplier 5、/ghastqol settings follow trigger timer、
/ghastqol settings follow enabled false。值会进行类型检查和范围检查,Tab 补全会遍历路径并建议值,更改会保存到 config.yml 并立即应用于所有已加载的恶魂。权限 ghastqol.settings(默认为 OP)。
注意:Minecraft AI 可能会重新旋转生物,因此在对齐后,插件会短暂暂停该恶魂的跟随功能(rotate.hold-seconds)以使其保持静止。当玩家正在骑乘并操控时,骑手的输入仍然控制朝向——请在静止时对齐,或者先跳下来。
工作原理
原版快乐恶魂的 flying_speed 基础值约为 ~0.05,感觉行动迟缓。
插件添加了一个标量属性修改器,使有效速度变为
base × speed-multiplier。当恶魂进入世界时(生成或区块加载)应用此修改器,如果你禁用/移除插件,修改器会被干净地移除。
注意事项
only-when-ridden 使用挂载/卸载事件,使得恶魂仅在乘客在场时变快,然后恢复正常。
- 极高的倍数会使恶魂难以操控——2–4 是一个舒适的范围。
- 这是标准的 Paper API;对于 Folia,你需要将调度器调用替换为区域/实体调度器。
“此服务器上未启用飞行”踢出问题
Minecraft 有一个内置检查,会踢出看似在空中停留过久的玩家(Player was kicked for floating too long!)。它不把实体的碰撞箱算作地面,所以站在快乐恶魂上——用它作为建筑平台——即使你什么都没做错,也可能导致你被踢出。
GhastQoL 会取消该踢出操作,但仅当玩家确实站在快乐恶魂上时。它会检查踢出的原因是飞行检查,然后确认玩家位于恶魂碰撞箱的顶部(或边缘)。其他所有踢出操作——封禁、/kick、超时、真正的反作弊——均不受影响,而没有恶魂在下面的真正漂浮仍会被踢出。
flight-kick-fix:
enabled: true
vertical-tolerance: 3.0 # 高出碰撞箱多远仍算作站在上面
horizontal-padding: 1.5 # 边缘周围的余量,用于站在边缘附近
log-saves: false # 记录每次被取消的踢出操作(测试时很有用)
用法
MIT 许可证,如果您重新分发,请链接回原始仓库以进行错误报告和维护等。
GhastQoL
The quintessential happy ghast plugin.
Happy Ghasts have the potential to be the best form of transportation ever introduced, unfortunately they're slow and difficult to catch up with when they fly away, and when you're standing on top of them you get kicked for 'flying', this plugin fixes all of those issues and more.
A Paper plugin for Minecraft 21.X & 26.X with quality-of-life tweaks for happy ghasts:
they fly faster (a boost to their flying_speed attribute) and, fly to a player when
looking at them. Also adds a rotate lock to make building around Ghasts easier. This plugin also removes the 'flying is not enabled on this server' bug when standing on a happy ghast.
Not supported: Spigot/Bukkit (uses Paper-only APIs) or Folia.
The plugin runs a startup self-check and disables itself with
a clear log message on Folia or on Minecraft older than 26.
Config (plugins/GhastQoL/config.yml)
speed-multiplier: 3.0 # 3x vanilla flight speed
only-when-ridden: true # true = only boost while a player is riding
follow: # make unridden ghasts follow the nearest player
enabled: true
range: 32.0 # only follow players within this many blocks
stop-distance: 4.0 # stop approaching once this close
speed: 1.0 # navigation speed multiplier
Following
Each ghast has a home (where it's resting — set when it loads, and re-set to wherever
a rider leaves it, mirroring vanilla). It only follows players inside range of that home
and won't chase them beyond it; if it drifts out, it steers back home.
What triggers a follow depends on follow.trigger:
look (default) — the ghast follows whoever is looking at it (within look-angle
degrees, and with clear line of sight if require-line-of-sight is on). It keeps
following for look-linger-seconds after they look away, so a quick glance elsewhere
doesn't stop it dead.
timer — the ghast follows on a cycle: follow-seconds chasing, then rest-seconds
of normal vanilla flight, repeating.
Tuning tips: range is the home leash radius; look-angle widens/tightens the "looking at
it" cone; speed scales glide speed; stop-distance is how close it gets.
Reload after editing with /ghastqol reload (permission ghastqol.reload, default OP).
Commands- /ghastqol reload — reload the config (permission ghastqol.reload, default OP).
/ghastqol rotate — snap the happy ghast you're riding (or the nearest one within
rotate.range) to yaw 0° so it lines up with the block grid. Handy when using a ghast
as a build platform. Permission ghastqol.rotate (default: everyone).
/ghastqol check — look at (or stand near) a ghast and run this to see whether it has
the follow goal and speed boost attached, and its home/range. It re-attaches anything
missing on the spot — handy for a ghast that grew up or reloaded without our logic.
/ghastqol settings — list all editable settings and their current values.
/ghastqol settings <path...> <value> — change a setting live (no restart/reload needed).
The space-separated path maps to the config key, so follow enabled means follow.enabled.
Examples: /ghastqol settings speed-multiplier 5, /ghastqol settings follow trigger timer,
/ghastqol settings follow enabled false. Values are type-checked and range-checked, tab
completion walks the path and suggests values, and changes are saved to config.yml and
applied to all loaded ghasts immediately. Permission ghastqol.settings (default OP).
Note: Minecraft AI can re-rotate a mob, so after aligning, the plugin briefly pauses
follow for that ghast (rotate.hold-seconds) so it stays put. While a player is
actively riding and steering, the rider's input still controls facing — align while
sitting still, or hop off first.
How it works
Vanilla happy ghasts have a flying_speed base of ~0.05, which feels sluggish.
The plugin adds a scalar attribute modifier so the effective speed becomes
base × speed-multiplier. The modifier is applied when a ghast enters the world
(spawn or chunk load) and is cleanly removed if you disable/remove the plugin.
Notes
only-when-ridden uses mount/dismount events so the ghast is only fast with a
rider aboard, then returns to normal.
- Very high multipliers can make the ghast hard to steer — 2–4 is a comfortable range.
- This is standard Paper API; for Folia you'd need to swap the scheduler calls
for the region/entity scheduler.
The "Flying is not enabled on this server" kick
Minecraft has a built-in check that kicks players who appear airborne too long
(Player was kicked for floating too long!). It doesn't count an entity's hitbox as
ground, so standing on a happy ghast — using it as a build platform — can get you kicked
even though you're doing nothing wrong.
GhastQoL cancels that kick, but only when the player is genuinely standing on a happy
ghast. It checks the kick's cause is the flight check, then confirms the player is on top
of (or at the rim of) a ghast's hitbox. Every other kick — bans, /kick, timeouts, real
anti-cheat — is untouched, and genuine floating with no ghast underneath is still kicked.
flight-kick-fix:
enabled: true
vertical-tolerance: 3.0 # how far above the hitbox still counts as standing on it
horizontal-padding: 1.5 # margin around the edges, for standing near the rim
log-saves: false # log each cancelled kick (handy while testing)
Usage
MIT License, if you redistribute please link back to the original repo for bug reports and maintenance, etc.
评论 0
登录后参与评分
还没有评论,来抢沙发吧