▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Hibernate Fabric
Hibernate Fabric

Hibernate Fabric

Lets your Minecraft Fabric server snooze when idle, slashing CPU usage without missing a block!

Оцените первым
2.5K
11

Hibernate Fabric

Lets your Minecraft Fabric server snooze when idle, slashing CPU usage without missing a block!

Download on Modrinth | Download from Releases

About The Project

Hibernate Fabric is a lightweight tool that automatically puts your Minecraft Fabric server to sleep when no players are online. By reducing CPU usage during idle times, it helps save server resources, lowers your electricity bill, and makes your server more eco-friendly. It's a simple way to keep your Minecraft world running smoothly without wasting power when it's not needed.

Built With

This project is built with the following technologies:

  • !Java
  • !Gradle
  • !Fabric

Run

You will need a Minecraft Fabric server.

  1. Download hibernate-fabric-x.x.x+mc2x.x.jar from one of the places at the top of this README.
  2. Copy the downloaded jar file to the mods folder of your Minecraft Fabric server.

Don't forget to set pause-when-empty-seconds to 0 in your server.properties file to disable the vanilla hibernation system.

NeoForge Support Via Compatibility Layer

[!WARNING] NeoForge is currently supported only through Sinytra Connector which is a compatiblilty layer to allow Fabric mods to load in NeoForge.

Hibernate Fabric can currently be used on NeoForge through Sinytra Connector, but this configuration is not officially supported. While it works, compatibility depends on both Hibernate Fabric and Sinytra Connector, and future updates to either project may cause it to stop working.

Issues that occur only when using NeoForge/Sinytra Connector are generally not supported and may be closed without investigation. If you encounter an issue, please first reproduce it on Fabric before reporting it.

In addition to the instructions above:

  1. Download and install Sinytra Connector and LaunchPad to the mods folder of your Minecraft NeoForge server.
  2. Download and install Forgified Fabric API to the mods folder of your Minecraft NeoForge server.

Getting Started With Development

To get a local copy up and running, follow these simple steps.

Prerequisites

Ensure you have the following installed on your machine:

  • Java Development Kit (JDK): Version 25 or higher.
    • Download JDK
  • Gradle: Version 9.5.1 or higher.
    • Install Gradle
  • Minecraft: Version 26.3

Build

  1. Clone the repository
git clone https://codeberg.org/VoxelBill/hibernate-fabric.git
  1. Navigate to the project directory
cd hibernate-fabric
  1. Build the project with Gradle
./gradlew clean build

You can find the built mod at hibernate-fabric/build/libs/hibernate-fabric-x.x.x+mc2x.x.jar.

Configuration

The mod automatically creates a configuration file at config/hibernate-fabric.json on first run. Here are the available settings:

Basic Settings

{
  "startEnabled": true,
  "ticksToSkip": 400,
  "permissionLevel": 2,
  "sleepTimeMs": 75,
  ...
SettingDefaultDescription
startEnabledtrueWhether hibernation activates automatically when server starts with no players
ticksToSkip400Number of ticks to process before applying sleep during hibernation
permissionLevel2Required permission level to use hibernation commands (0=all, 4=owner)
sleepTimeMs75Milliseconds to sleep between tick processing cycles

Memory Optimization

  ...
  "enableMemoryOptimization": true,
  "memoryCleanupIntervalSeconds": 30,
  "memoryThresholdPercent": 80.0,
  "forceGarbageCollection": true,
  "gcIntervalSeconds": 30,
  "saveBeforeHibernation": true,
  "removeEntities": [
    "minecraft:item",
    "minecraft:firework_rocket",
    "minecraft:arrow",
    "minecraft:experience_orb"
  ],
  "droppedItemMaxAgeSeconds": 300,
  "logMemoryInfo": false,
  ...
SettingDefaultDescription
enableMemoryOptimizationtrueEnable memory cleanup during hibernation
memoryCleanupIntervalSeconds30How often to run memory cleanup routines
memoryThresholdPercent80.0Memory usage percentage that triggers cleanup
forceGarbageCollectiontrueForce Java garbage collection during hibernation
gcIntervalSeconds30Minimum time between garbage collection runs
saveBeforeHibernationtrueSave world data before entering hibernation
removeEntitiesitem, firework_rocket, arrow, experience_orbList of entities to remove during hibernation (ignores entities with custom names)
droppedItemMaxAgeSeconds300Age in seconds after which items are removed (5 minutes)
logMemoryInfofalseLog memory usage and garbage collector information to console

CPU Optimization

  ...
  "aggressiveCpuSaving": true,
  "minSleepInterval": 1500,
  "highLoadSleepMultiplier": 1.5,
  "yieldInterval": 8,
  ...
SettingDefaultDescription
aggressiveCpuSavingtrueEnable more aggressive CPU saving measures
minSleepInterval1500Minimum time in milliseconds between sleep cycles
highLoadSleepMultiplier1.5Multiplier for sleep time when system load is high
yieldInterval8How often to yield CPU to other threads (every N ticks)

Gamerule Values When The Servers Awake

  ...
  "awakeGameRules": {
    "advance_time": true,
    "advance_weather": true,
    "random_tick_speed": 3,
    "spawn_mobs": true,
    "fire_spread_radius_around_player": 128
  },
  ...
SettingDefaultDescription
advance_timetrueThe value to set the gamerule advance_time to when coming out of hibernation
advance_weathertrueThe value to set the gamerule advance_weather to when coming out of hibernation
random_tick_speed3The value to set the gamerule random_tick_speed to when coming out of hibernation
spawn_mobstrueThe value to set the gamerule spawn_mobs to when coming out of hibernation
fire_spread_radius_around_player128The value to set the gamerule fire_spread_radius_around_player to when coming out of hibernation

Gamerule Values When The Servers Hibernating

  ...
  "hibernatingGameRules": {
    "advance_time": false,
    "advance_weather": false,
    "random_tick_speed": 0,
    "spawn_mobs": false,
    "fire_spread_radius_around_player": 0
  }
}
SettingDefaultDescription
advance_timefalseThe value to set the gamerule advance_time to when going into hibernation
advance_weatherfalseThe value to set the gamerule advance_weather to when going into hibernation
random_tick_speed0The value to set the gamerule random_tick_speed to when going into hibernation
spawn_mobsfalseThe value to set the gamerule spawn_mobs to when going into hibernation
fire_spread_radius_around_player0The value to set the gamerule fire_spread_radius_around_player to when going into hibernation

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. If you don't have any coding experience, testing other platforms and configurations is also very welcome!

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU Lesser General Public License v3.0 or later (LGPL-3.0-or-later).

This project is a fork of Hibernateforge which was distributed under the European Union Public License v1.2 (EUPL-1.2). Relicensing has been done in accordance with the compatibility clause of the EUPL (Article 5).

See LICENSE for more information.

Партнёрский материал

Как поиграть с друзьями с модом Hibernate Fabric?

Мод Hibernate Fabric куда интереснее в компании: поднимите сервер Майнкрафт с уже установленным модом, позовите друзей и играйте по своим правилам. Хостинг Майнкрафт для мода Hibernate Fabric будет готов за пару минут - BungeeHost сделает всё за вас.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

26.3.x26.2.x26.1.x1.21.x

Платформы

Поддерживаемые окружения

Сервер

Зависимости

Ссылки

Создатели

Детали

Лицензия:
Опубликован:10 месяцев назад
Обновлён:3 недели назад
Главная