BeaconFlight

BeaconFlight 允许在满足可配置条件时,激活的信标赋予玩家创造模式风格的飞行能力。
游戏逻辑在服务端运行,因此可以在未安装模组的客户端连接的专用服务器上正常工作。同一个 jar 包也可用于单人游戏。如果在客户端安装了 Mod Menu 和 Cloth Config,模组还会提供一个游戏内配置界面。
兼容性
- Minecraft
1.21 至 1.21.11
- Fabric Loader
0.15.11+
- Java
21+
- 需要 Fabric API
- Mod Menu 可选
- Cloth Config 可选
工作原理
- 信标必须处于激活状态且已选择主要效果。
- 默认情况下,BeaconFlight 需要 4 级信标以及
minecraft:end/elytra 进度。
- 当玩家保持在范围内并满足所有配置要求时,允许飞行。
- 当玩家离开范围后,飞行效果可以保留一段可配置的时间。
- 当玩家在空中的飞行能力被移除时,会自动施加缓降(Slow Falling)效果。
安装
- 为你目标版本的 Minecraft 安装 Fabric Loader 和 Fabric API。
- 将 BeaconFlight 的 jar 文件放入
mods 文件夹。
- 在专用服务器上,仅需服务端安装该模组即可生效。
- 在单人游戏中,按正常方式在客户端安装该 jar 文件。
- 启动游戏或服务器一次以生成配置文件。
配置文件生成于:
config/beaconflight_config.json
配置
你可以直接编辑 JSON 文件,或者如果安装了 Mod Menu 和 Cloth Config,也可以使用 Mod Menu 的配置界面。
可用选项:
minBeaconLevel: 所需的最低信标金字塔等级。有效值为 1 至 4。
mainHandItem: 玩家主手所需物品,或 null。
offHandItem: 玩家副手所需物品,或 null。
anyHandItem: 玩家任意手持所需物品,或 null。
headItem: 所需头盔物品,或 null。
chestItem: 所需胸甲物品,或 null。
legsItem: 所需护腿物品,或 null。
feetItem: 所需靴子物品,或 null。
advancementsRequired: 玩家必须完成的进度 ID 列表。
xpDrainRate: 每次活跃飞行每秒消耗的 XP 点数。使用 0.0 禁用 XP 消耗。
flightLingerTime: 玩家离开信标范围后的自定义停留持续时间(以刻为单位)。使用 0 则复用正常的信标效果持续时间。
slowFallingTime: 失去飞行能力后缓降效果的持续时间(秒)。
logLevel: BeaconFlight 日志级别。常用值有 INFO、DEBUG、TRACE、ALL 和 OFF。
注意事项:
- 物品字段必须使用物品 ID,例如
minecraft:diamond_chestplate。
- 进度字段必须使用进度 ID,例如
minecraft:end/elytra。
- 重置配置会恢复为默认要求,这些默认要求并非最小化测试设置。
默认配置:
{
"minBeaconLevel": 4,
"mainHandItem": null,
"offHandItem": null,
"anyHandItem": null,
"headItem": null,
"chestItem": null,
"legsItem": null,
"feetItem": null,
"advancementsRequired": [
"minecraft:end/elytra"
],
"xpDrainRate": 0.0,
"flightLingerTime": 0,
"slowFallingTime": 10,
"logLevel": "INFO"
}
用于测试的最小配置:
{
"minBeaconLevel": 1,
"mainHandItem": null,
"offHandItem": null,
"anyHandItem": null,
"headItem": null,
"chestItem": null,
"legsItem": null,
"feetItem": null,
"advancementsRequired": [],
"xpDrainRate": 0.0,
"flightLingerTime": 0,
"slowFallingTime": 10,
"logLevel": "ALL"
}
故障排除
- 如果飞行未激活,请确保信标确实处于激活状态且已选择主要效果。
- 如果你在配置 UI 中使用了“重置”,请记住默认设置仍然需要 4 级信标以及鞘翅进度。
- 将
logLevel 设置为 ALL 以便在游戏日志中查看授予或拒绝飞行的消息。
- 如果你想进行干净的测试,请移除所有物品要求,清空
advancementsRequired,并将 minBeaconLevel 设置为与你的信标等级匹配。
从源码构建
使用 Gradle 包装器:
.\gradlew.bat build
构建好的 jar 文件输出到:
build/libs/
致谢
BeaconFlight

BeaconFlight lets active beacons grant creative-style flight when configurable conditions are met.
The gameplay logic is server-side, so it works on dedicated servers with unmodded clients. The same jar can also be used in singleplayer. If you install Mod Menu and Cloth Config on the client, the mod exposes an in-game config screen as well.
Compatibility
- Minecraft
1.21 through 1.21.11
- Fabric Loader
0.15.11+
- Java
21+
- Fabric API required
- Mod Menu optional
- Cloth Config optional
How It Works
- The beacon must be active and have a primary effect selected.
- By default, BeaconFlight requires a level 4 beacon and the
minecraft:end/elytra advancement.
- While the player stays in range and meets all configured requirements, flight is allowed.
- When the player leaves range, flight can linger for a configurable amount of time.
- When flight is removed while the player is airborne, Slow Falling can be applied automatically.
Installation
- Install Fabric Loader and Fabric API for your target Minecraft version.
- Place the BeaconFlight jar in the
mods folder.
- On a dedicated server, only the server needs the mod for flight to work.
- In singleplayer, install the jar normally on the client.
- Start the game or server once to generate the config file.
The config file is created at:
config/beaconflight_config.json
Configuration
You can edit the JSON file directly, or use the Mod Menu config screen if Mod Menu and Cloth Config are installed.
Available options:
minBeaconLevel: minimum beacon pyramid level required. Valid values are 1 to 4.
mainHandItem: required item in the player's main hand, or null.
offHandItem: required item in the player's off hand, or null.
anyHandItem: required item in either hand, or null.
headItem: required helmet item, or null.
chestItem: required chest item, or null.
legsItem: required leggings item, or null.
feetItem: required boots item, or null.
advancementsRequired: list of advancement ids the player must have completed.
xpDrainRate: XP drained per second of active flight. Use 0.0 to disable XP drain.
flightLingerTime: custom linger duration in ticks after the player leaves beacon range. Use 0 to reuse the normal beacon effect duration.
slowFallingTime: Slow Falling duration in seconds after flight is lost.
logLevel: BeaconFlight log level. Useful values are INFO, DEBUG, TRACE, ALL, and OFF.
Notes:
- Item fields must use item ids such as
minecraft:diamond_chestplate.
- Advancement fields must use advancement ids such as
minecraft:end/elytra.
- Resetting the config returns the default requirements, which are not a minimal test setup.
Default config:
{
"minBeaconLevel": 4,
"mainHandItem": null,
"offHandItem": null,
"anyHandItem": null,
"headItem": null,
"chestItem": null,
"legsItem": null,
"feetItem": null,
"advancementsRequired": [
"minecraft:end/elytra"
],
"xpDrainRate": 0.0,
"flightLingerTime": 0,
"slowFallingTime": 10,
"logLevel": "INFO"
}
Minimal config for testing:
{
"minBeaconLevel": 1,
"mainHandItem": null,
"offHandItem": null,
"anyHandItem": null,
"headItem": null,
"chestItem": null,
"legsItem": null,
"feetItem": null,
"advancementsRequired": [],
"xpDrainRate": 0.0,
"flightLingerTime": 0,
"slowFallingTime": 10,
"logLevel": "ALL"
}
Troubleshooting
- If flight does not activate, make sure the beacon is actually active and has a primary effect selected.
- If you used "reset" in the config UI, remember that the defaults still require a level 4 beacon and the Elytra advancement.
- Set
logLevel to ALL to get grant and deny messages in the game log.
- If you want a clean test, remove all item requirements, clear
advancementsRequired, and set minBeaconLevel to match your beacon.
Building From Source
Use the Gradle wrapper:
.\gradlew.bat build
The built jar is written to:
build/libs/
Credits
评论 0
登录后参与评分
还没有评论,来抢沙发吧