promotional bannermobile promotional banner

Heimlich

When the game chokes on loading chunks, it performs quick upward thrusts on the diaphragm
item image

Description

The Heimlich

Server side. NeoForge 1.21.1.

A first-aid technique of applying quick, upward abdominal thrusts to force an object out of a choking person's airway.

This mod does that but to the game. It stops your server freezing while it waits for chunks to load, and tells you what caused every freeze.

This was code taken from the boogaloo core mod, I figured other packs and devs might want to use it.

The problem

When something on the server needs a chunk that isn't loaded yet, the whole server stops and waits for it, effectively choking. Everyone freezes, often for many seconds. In big modpacks this happens all the time, machines at the edge of loaded land, comparators, mobs, weather, and mods that look around a moving player.

What it does

Prevents. The Heimlich grabs the server by the stomach and forces it to not choke when the server ends up waiting for a chunk, and makes that one thing wait instead of stopping the whole server.

Explains. Every freeze is logged with its cause and the code that was running, so you can see what to fix.

Results

Pack Test Without With The Heimlich
IMC 2.0 Multiple players exploring on foot 20 s of chunk freezes a session 0 s
IMC 2.0 New structures loading 15 s every 10 minutes Under 0.5 s
Integrated Boogaloo Weather2 storms near players Up to 7.6 s a session 0 s
All the Mods 10 Multiple players exploring on foot 4.6–6.2 s of chunk freezes a session 0.3–4.3 s

Guards

Guard What it stops
comparators Comparators freezing the server beside a loading chunk
machines Machines freezing the server beside a loading chunk
machine_reach Machines that reach further than machines checks
hollowmarch_structures Hollowmarch structures loading all at once
ftb_quests FTB Quests rewriting every quest file on each save
portals The Nether portal freeze: the other side starts loading while you stand in the portal
mod_fixes Known freezes in single mods: Hollowmarch obelisks, Weather2 storms, Malisis Doors, MFFS, Create Cybernetics, Alex's Caves
off_thread Mods loading chunks from their own threads, such as structure searches for maps

All are on by default except off_thread. Turn any of them off in config/heimlich-common.toml

Commands

  • /heimlich status: what each guard has done and how many freezes this session
  • /heimlich guard <name> on|off: switch a guard until the server restarts

What it doesn't fix

  • Slow world generation.
  • Lag that isn't chunk loading
  • Freezes on your own computer, this is just server side

 

I’ve spent thousands of hours on my mods. I learned Java specifically for this. If you've enjoyed my projects a ton, two great ways to support me are through Patreon directly, or buying your server through Bisect Hosting. Click on the above picture to get a server, use my code CraisinCraft to get 25% off your first month and enjoy playing with your friends! Set up is so easy, it's basically one click.

 

Click on the picture bellow for my patreon to directly support me. You'll get exclusive discord roles, chats, and get to directly influence the development of IDAS.

Join the Discord by clicking on the image or link below if you run into an issue of any kind or have a suggestion, I'll try my best to respond to everyone and would absolutely love suggestions! Thanks for playing and supporting my mod!                  

                  

                  https://discord.com/invite/72a7jmc5mb

Heimlich Team

profile avatar
  • 497
    Followers
  • 51
    Projects
  • 117.8M
    Downloads

More from CraisinLordView all