BeaconFlight

这是一个仅服务器端的模组(可与未加载模组的客户端配合使用!),当满足某些可配置的条件时,它允许信标赋予玩家创造模式飞行能力。
注意: 尽管这是一个服务端模组,但它仍然可以在单人游戏中用于客户端
行为机制
默认情况下,该模组要求信标为已激活的 4 级信标(即拥有活跃效果的最大等级信标),并且要求玩家解锁了“天际极限”(Sky's the Limit)进度。如果同时满足这两个条件,玩家在信标范围内即可飞行。
如果玩家离开信标范围,飞行将持续的时间与药水效果相同。一旦飞行失效,玩家将获得持续 10 秒的缓慢下降(Slow Falling)效果,使其能够安全地滑翔降落。
配置
所有设置均可自定义,包括要求玩家装备或手持特定物品,或使用经验值作为燃料。以下是所有配置选项:
minBeaconLevel 指定授予此效果所需的最低信标等级(必须为整数)
mainHandItem 指定需要握在玩家主手(右手)中的物品(如有)
offHandItem 指定需要握在玩家副手(左手)中的物品(如有)
anyHandItem 指定需要握在玩家任意一只手(主手或副手)中的物品(如有)
headItem 指定需要穿戴在玩家头部的物品(如有)
chestItem 指定需要穿戴在玩家胸部的物品(如有)
legsItem 指定需要穿戴在玩家腿部的物品(如有)
feetItem 指定需要穿戴在玩家脚部的物品(如有)
advancementsRequired 指定玩家必须解锁的进度列表*
xpDrainRaite 指定每次飞行tick消耗的经验值数量(0.25 效果良好)** (v1.1+)
flightLingerTime 指定不在信标范围内时飞行持续的时间(必须为整数)**
slowFallingTime 指定失去飞行能力后给予缓慢下降效果的持续时间(必须为整数)
logLevel 指定控制台日志级别,可以是 INFO、WARN、ERROR 或 OFF
* 需要提供进度的 ID。这可以在游戏中的进度命令自动补全中找到,或者在 Minecraft Wiki 上找到包含描述的完整列表。
** 如果 flightLingerTime 设置为 0,则飞行持续时间与该信标等级的效果时间相同。如果是自定义值,时间应大于 4 秒,因为信标每 4 秒才会应用一次其效果。
示例
以下是一个示例配置,要求最大等级信标,要求玩家在双手持有羽毛,身穿全套钻石盔甲,并解锁“天际极限”(Sky's the Limit)和“以牙还牙”(Return to Sender)进度。它将授予与药水效果相同时间的飞行,每次飞行 tick 消耗 0.25 XP,并在失去飞行能力后提供 10 秒的缓慢下降效果:
{
"minBeaconLevel": 4,
"mainHandItem": "minecraft:feather",
"offHandItem": "minecraft:feather",
"anyHandItem": null,
"headItem": "minecraft:diamond_helmet",
"chestItem": "minecraft:diamond_chestplate",
"legsItem": "minecraft:diamond_leggings",
"feetItem": "minecraft:diamond_boots",
"advancementsRequired": [
"minecraft:end/elytra",
"minecraft:nether/return_to_sender"
],
"xpDrainRate": 0.25,
"flightLingerTime": 0,
"slowFallingTime": 10,
"logLevel": "INFO"
}
配置文件位于名为 “config” 的文件夹中,该文件夹位于 Minecraft 所在目录的同一目录下(对于专用服务器是服务器目录,对于客户端则是 .minecraft 文件夹,它与 mods 文件夹在同一位置)。文件名为 beaconflight_config.json。
如果文件不存在,模组将在启动时创建一个默认文件。
致谢
感谢 @xAlicatt 提供的创意、委托制作该模组以及进行测试!
感谢 @ExtraCrafTX 制作的原始模组。
DecDuck 将其更新至 1.21.4
BeaconFlight

This is a server-side only mod (works with unmodded clients!) which allows beacons to grant creative flight to players when certain configurable conditions are met.
Note: Although this is a server-side mod, it can still be used in single player on clients
Behaviour
By default, the mod requires the beacon to be an activated level 4 beacon (i.e. a max level beacon with an effect active) and requires the player to have the "Sky's the Limit" advancement unlocked. If both these conditions are met, the player will be able to fly when within range of the beacon.
If the player goes out of range of the beacon, the flight will last the same amount of time as the potion effects. Once the flight expires, the player will be given the Slow Falling effect for 10s, allowing them to glide back down safely.
Configuration
This is all configurable, along with requiring the player to have certain items equipped or held, or to use XP as fuel. Here are all the config options:
minBeaconLevel specifies the minimum level the beacon must be to grant this effect (must be an integer)
mainHandItem specifies the item, if any, which needs to be held in the player's main hand
offHandItem specifies the item, if any, which needs to be held in the player's off hand
anyHandItem specifies an item, if any, which needs to be held in one of the player's hands
headItem specifies the item, if any, which must be worn on the player's head
chestItem specifies the item, if any, which must be worn on the player's chest
legsItem specifies the item, if any, which must be worn on the player's legs
feetItem specifies the item, if any, which must be worn on the player's feet
advancementsRequired specifies the list of advancements that the player must have unlocked*
xpDrainRaite specifies the amount of XP to use per tick of flight (0.25 works well) (v1.1+)
flightLingerTime specifies how long the flight lasts when not in range (must be an integer)**
slowFallingTime specifies how long the Slow Falling effect is given for after flight is lost (must be an integer)
logLevel specifies the level of logging in the console, can be INFO, WARN, ERROR or OFF
* The id of the advancements is required. This can be found in the in-game autocomplete for the advancement command, or a full list with descriptions may be found on the Minecraft wiki.
** A flightLingerTime of 0 gives the same time as the effects for that beacon level. The time should also be more than 4 seconds if custom, as beacons only apply their effects every 4 seconds.
Example
The following is an example config that requires a max level beacon, requires the player to hold feathers in both hands and have equipped full diamond armour and have the "Sky's the Limit" and "Return to Sender" advancements. It will grant flight for the same amount of time as the potion effects, will use 0.25 XP per tick of flight and gives 10 seconds of Slow Falling upon losing flight:
{
"minBeaconLevel": 4,
"mainHandItem": "minecraft:feather",
"offHandItem": "minecraft:feather",
"anyHandItem": null,
"headItem": "minecraft:diamond_helmet",
"chestItem": "minecraft:diamond_chestplate",
"legsItem": "minecraft:diamond_leggings",
"feetItem": "minecraft:diamond_boots",
"advancementsRequired": [
"minecraft:end/elytra",
"minecraft:nether/return_to_sender"
],
"xpDrainRate": 0.25,
"flightLingerTime": 0,
"slowFallingTime": 10,
"logLevel": "INFO"
}
The config file is present in a folder called "config" in the same directory as Minecraft, which is the server directory in case of a dedicated server, or .minecraft in case of the client (it will be in the same place as the mods folder). It is called beaconflight_config.json.
If the file doesn't exist, the mod will create a default file upon startup.
Credits
Thanks to @xAlicatt for the ideas, commissioning the mod, and for testing!
@ExtraCrafTX for the original mod.
DecDuck updated it to 1.21.4
评论 0
登录后参与评分
还没有评论,来抢沙发吧