HyskExpFly

A Minecraft Fabric mod that allows players to fly using experience points in survival mode

286

HyskExpFly

HyskExpFly Mod

> A Minecraft Fabric mod that allows players to fly in survival mode using experience points

Mod Introduction

HyskExpFly Mod is an innovative Minecraft Fabric mod that allows players to consume experience points to gain flight ability in survival mode. Through simple commands and an intuitive interface, players can easily manage their flight status and enjoy the freedom of aerial exploration.

- All code features are assisted by Deepseek AI - Qingxin Hengyue Shikong Server free public flight mod

QQ Group: YkinLing QQ Group: Deepseek QQ Group: 783492881 (Get open source code)

Core Features

Basic Flight Features

- Mode Support: Fly in survival mode using experience points - Mode Support: Automatically deduct configured experience points per second - Mode Support: Automatically restore flight status when reconnecting - Mode Support: Supports survival mode, automatically handles other modes

Management Features

- Safety Detection: Complete ban system supporting name and UUID bans - Safety Detection: Real-time adjustable experience consumption rate - Safety Detection: Administrators can query all flying player status - Safety Detection: Multiple safety checks to prevent state abnormalities

Multi-language Support

- Custom Extension: Full support for Chinese and English - Custom Extension: Supports in-game language switching commands - Custom Extension: All prompt messages have bilingual versions - Custom Extension: Supports adding new language configurations

User Experience

- Easy Operation: Continuously shows remaining time and experience information during flight - Easy Operation: Rich status prompts and operation guidance - Easy Operation: Automatically handles flight status during death, mode switching, and riding - Easy Operation: Supports double-tap spacebar for quick takeoff/landing

Safety & Stability

- Config Check: Automatically detects and fixes flight state abnormalities - Config Check: Automatically pauses flight when riding vehicles, resumes after dismounting - Config Check: Monitors experience deduction intervals to prevent abnormal deductions - Config Check: Automatically checks configuration integrity and fixes missing items

Installation Requirements

Required Dependencies

- Java: 1.21.8 - Java: ≥ 0.16.9 - Java: Latest version - Java: ≥ 21

Recommended Environment

- Server Environment: Fabric Server - Client: Fabric Client - Memory: ≥ 2GB RAM

Command List

Player Commands

| Command | Permission | Description | |---------|------------|-------------| | `/fly` | All players | Enable/disable experience flight mode | | `/flystatus` | All players | View own flight status information |

Administrator Commands

| Command | Permission | Description | |---------|------------|-------------| | `/fly reload` | OP Level 4 | Reload configuration files | | `/fly cost <points>` | OP Level 4 | Set experience consumption rate | | `/fly enable` | OP Level 4 | Enable survival mode flight | | `/fly disable` | OP Level 4 | Disable survival mode flight | | `/fly ban <player>` | OP Level 4 | Ban player from using flight | | `/fly deban <player>` | OP Level 4 | Unban player | | `/fly banlist` | OP Level 4 | View ban list | | `/fly query` | OP Level 4 | Query flying players list | | `/fly debug [player]` | OP Level 4 | View debug information | | `/flystatus <player>` | OP Level 4 | View other player's flight status | | `/fly lang [language]` | OP Level 4 | View or switch language | | `/fly checkconfig` | OP Level 4 | Check configuration integrity | | `/fly updateconfig` | OP Level 4 | Update missing configuration items |

Operation Methods

Basic Operation Flow

1. Disable Flight: Use `/fly` command to enable flight mode 2. Disable Flight: Double-tap spacebar to start flying 3. Disable Flight: - Disable Flight: Ascend - Disable Flight: Descend - Disable Flight: Move forward/backward/left/right 4. Disable Flight: Double-tap spacebar again to land 5. Disable Flight: Use `/fly` command to disable flight mode

Flight Status Description

- Auto Protection: Continuously consumes experience points, shows remaining time - Auto Protection: Pauses experience consumption, shows remaining experience - Auto Protection: Automatically pauses when riding vehicles, resumes after dismounting - Auto Protection: Automatically disables when dying or switching to adventure mode

Configuration System

Configuration File Location

Configuration files are located in the server's `config/hyskexpfly/` directory:

``` config/ └── hyskexpfly/ ├── hyskexpfly.json # Main configuration file └── lang.json # Language configuration file ```

Main Configuration (hyskexpfly.json)

```json { "costPerSecond": 1, "enableSurvivalFlight": true, "bannedPlayers": [] } ```

Configuration Options Description

| Option | Type | Default | Description | |--------|------|---------|-------------| | `costPerSecond` | Integer | 1 | Experience points consumed per second | | `enableSurvivalFlight` | Boolean | true | Whether to allow survival mode flight | | `bannedPlayers` | Array | [] | List of banned players |

Banned Player Data Structure

```json { "name": "PlayerName", "uuid": "PlayerUUID", "banTime": "BanTimestamp" } ```

Language Configuration (lang.json)

```json { "currentLanguage": "zh_cn", "languages": { "zh_cn": { "flyEnabled": "§a飞行模式已开启!", "flyDisabled": "§c飞行模式已关闭", "notEnoughExp": "§c你没有足够的经验点来开启飞行!", "...": "More translation items..." }, "en_us": { "flyEnabled": "§aFlight mode enabled!", "flyDisabled": "§cFlight mode disabled", "notEnoughExp": "§cYou don't have enough experience points to fly!", "...": "More translations..." } } } ```

Supported Languages

- en_us: Simplified Chinese - en_us: English (US)

Configuration Modification Methods

Method 1: In-game Commands (Recommended)

```bash

Modify experience consumption rate

/fly cost 5

Enable/disable survival flight

/fly enable /fly disable

Switch language

/fly lang en_us

Reload configuration

/fly reload ```

Method 2: Direct File Editing

1. Stop the server 2. Edit `config/hyskexpfly/hyskexpfly.json` or `config/hyskexpfly/lang.json` 3. Restart the server

Method 3: Hot Reload Configuration

```bash

Execute in-game

/fly reload ```

Configuration Integrity Check

The mod provides automatic configuration checking and repair functions:

```bash

Check configuration integrity

/fly checkconfig

Automatically update missing configurations

/fly updateconfig ```

Auto-repair Features

- ✅ Automatically detects missing configuration items - ✅ Fills in default values - ✅ Validates configuration format - ✅ Repairs corrupted configuration files

Configuration Best Practices

Balanced Server Settings

```json { "costPerSecond": 2, "enableSurvivalFlight": true, "bannedPlayers": [] } ```

Hardcore Server Settings

```json { "costPerSecond": 5, "enableSurvivalFlight": true, "bannedPlayers": ["Violator1", "Violator2"] } ```

Creative Server Settings

```json { "costPerSecond": 1, "enableSurvivalFlight": false, "bannedPlayers": [] } ```

Troubleshooting

Common Configuration Issues

1. Configuration Files Missing - Solution: Use `/fly updateconfig` to regenerate

2. Configuration Format Error - Solution: Delete configuration files and use `/fly reload` to regenerate

3. Language Display Abnormal - Solution: Use `/fly lang zh_cn` to reset language

4. Permissions Not Working - Solution: Check OP permission level, requires OP Level 4

Custom Language

To add new language support:

1. Add new language code in `lang.json`'s `languages` object 2. Copy key-value pairs from existing languages and translate content 3. Use `/fly lang <new-language-code>` to switch

Example: ```json { "currentLanguage": "zh_cn", "languages": { "zh_cn": { ... }, "en_us": { ... }, "ja_jp": { "flyEnabled": "§a飛行モードが有効になりました!", "flyDisabled": "§c飛行モードが無効になりました", "...": "More Japanese translations..." } } } ```

Technical Features

Mixin Injection System

- Safe Injection: Detects player input, implements double-tap spacebar takeoff/landing - Safe Injection: Handles riding state, automatically pauses and resumes flight - Safe Injection: Uses Mixin framework to ensure compatibility with other mods

Experience Calculation System

- Safe Deduction: Uses Minecraft standard experience calculation formulas - Safe Deduction: Automatically detects experience changes and updates display - Safe Deduction: Monitors deduction intervals to prevent abnormal situations

State Management System

- Auto Repair: Automatically restores flight status when players reconnect - Auto Repair: Multiple safety checks to ensure state consistency - Auto Repair: Automatically repairs state abnormalities when detected

This configuration system is designed to provide maximum flexibility and ease of use, allowing server administrators to easily adjust mod behavior to suit different gaming environments.~~~~

ADS