Описание
# MixEnergy Mod
The **MixEnergy Mod** introduces a unique mechanic to Minecraft: **player energy**. This energy system adds a new layer of challenge and strategy by making energy a consumable resource for various actions.
**Supported versions:** Minecraft 1.20.1–1.20.6 (Forge) and 1.21.1–1.21.11 plus 26.2 (NeoForge).
See [BUILDING.md](BUILDING.md) for the full target list and the multi-version build workflow.
## Key Features
- **Energy Consumption**: Players will now spend energy on the following actions:
- **Running**: Energy is drained while sprinting.
- **Breaking Blocks**: Mining and harvesting require energy.
- **Building Blocks**: Placing blocks consumes energy.
- **Attacking**: Performing attacks depletes energy.
If the player runs out of energy, these actions will be temporarily **disabled** until energy is restored.
- **Food and Drink Restore Energy**: Finishing any food, potion or drink restores energy.
The amount is configurable, and setting it to `0` turns the mechanic off.
- **Energy Bar Skins**: The HUD bar ships in three looks — **Classic**, **Aqua** and
**Amethyst** — picked in the mod's interface settings, which preview the bar itself.
- **Energy Commands**:
- `/setEnergy `: Set a specific player's energy level. If no player is specified, it defaults to the executing player.
- `/setMaxEnergy `: Adjust the maximum energy limit for a player. Similar to `/setEnergy`, the command defaults to the executing player if no target is provided.
- **Energy HUD**
- **_In creative mode energy doesn't working_**
## Configuration
MixEnergy creates two files in the Minecraft or dedicated-server `config` directory:
- `mixenergy-common.toml` contains authoritative gameplay rules. On a dedicated
server, edit this file on the server.
- `mixenergy-client.toml` contains the local HUD position and skin.
In single-player, every energy source can also be changed from the mod settings
screen. Changes are applied and saved immediately. During multiplayer, gameplay
toggles are shown as server-controlled while the local HUD position and skin
remain editable.
### Example
```toml
[general]
defaultMaxEnergy = 45.0
# 20 server ticks = 1 second at normal TPS
energyRegenCooldownTicks = 30
[energy_sources]
sprinting = true
fastSwimming = true
breakingBlocks = true
placingBlocks = true
attacks = true
jumping = false
[energy_costs]
# Movement costs are charged every server tick
sprintingPerTick = 0.25
fastSwimmingPerTick = 0.25
breakingBlock = 2.0
placingBlock = 1.0
attack = 3.0
jump = 1.0
[regeneration]
# Restored per regeneration pulse; one pulse normally occurs every 3 ticks
baseRate = 1.0
maxRate = 1.8
speedMultiplier = 1.0 # 0 disables passive regeneration
consumableRestore = 8.0 # Restored per food/potion/drink; 0 disables it
```
The HUD preferences are stored separately:
```toml
[hud]
energyBarPosition = "ABOVE_HOTBAR"
energyBarSkin = "DEFAULT"
```
Available positions are `ABOVE_HOTBAR`, `TOP_LEFT`, `TOP_RIGHT`, `TOP_CENTER`,
`BOTTOM_LEFT`, and `BOTTOM_RIGHT`. Available skins are `DEFAULT`, `AQUA` and
`AMETHYST`;
## Gameplay Impact
This mod challenges players to manage their energy wisely, adding a survival aspect even in non-survival game modes. Whether you're mining deep underground, battling mobs, or building your dream base, energy management becomes crucial to success.
Enhance your Minecraft experience with **MixEnergy** and test your resourcefulness like never before!
Tags
Stamina, Stamina system, Energy, Player actions, Player stamina, Player energy, Running energy Minecraft, Building energy Minecraft, Attacking energy Minecraft