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
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.
This is all configurable, along with requiring the player to have certain items equipped or held. Here are all the config options:
minBeaconLevelspecifies the minimum level the beacon must be to grant this effect
mainHandItemspecifies the item, if any, which needs to be held in the player's main hand
offHandItemspecifies the item, if any, which needs to be held in the player's off hand
anyHandItemspecifies an item, if any, which needs to be held in one of the player's hands
headItemspecifies the item, if any, which must be worn on the player's head
chestItemspecifies the item, if any, which must be worn on the player's chest
legsItemspecifies the item, if any, which must be worn on the player's legs
feetItemspecifies the item, if any, which must be worn on the player's feet
advancementsRequiredspecifies the list of advancements that the player must have unlocked*
xpDrainRatespecifies the amount of XP used per tick of flying (0.25 works well) (v1.1+)
flightLingerTimespecifies how long the flight lasts when not in range**
slowFallingTimespecifies how long the Slow Falling effect is given for after flight is lost
logLevelspecifies the level of logging in the console, can be
* 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.
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.
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:
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
If the file doesn't exist, the mod will create a default file upon startup.
Thanks to @xAlicatt for the ideas, commissioning the mod, and for testing!