Back to mods
Sleepium project artwork

CurseForge · Minecraft mod

Sleepium

A performance engine for servers and clients that keeps the game exact: idle ticks put to sleep, a compiled event bus, parallel worldgen, a fast renderer with its own shaderpack support (beta).

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Sleepium release matches Forge?

Updated today
Best match for your filters Sleepium 1.3.1 for 1.20.1 (Forge)
Game version 1.20.1
Loader Forge

Sleepium 1.3.1 for 1.20.1 (Forge) targets 1.20.1 with Forge. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.

Where it goes

Is Sleepium required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release Forge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does Sleepium 1.3.1 for 1.20.1 (Forge) need?

Sleepium 1.3.1 for 1.20.1 (Forge) on Forge. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Sleepium without breaking your instance.

Built for Sleepium 1.3.1 for 1.20.1 (Forge) on Forge. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use Sleepium 1.3.1 for 1.20.1 (Forge). It targets 1.20.1 with Forge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside Sleepium 1.3.1 for 1.20.1 (Forge). It opens that exact file at the source.

About this project

What does Sleepium add?

Sleepium

A performance engine for Minecraft 1.21.1 (NeoForge) and 1.20.1 (Forge) that makes servers and clients cheaper to run without changing what the game computes.


Known issue in 1.2.0-1.3.0: many tech-mod machines can make the server slower

Sleepium lets idle machines from other mods "sleep" so the server doesn't tick them. This feature (ObservedModSleep, on by default since 1.2.0) isn't finished the way it should be. For machines whose code Sleepium can't analyse, it checks every tick whether the machine has changed. It does this by looking at all of the machine's state and its neighbours'. That check costs about 10 µs per machine per tick, while most mod machines' own ticks take 0.5-2 µs. So the more machines you have, the more time it costs instead of saving.

Measured on a dedicated server with 13 popular tech and storage mods (Immersive Engineering, Mekanism, Industrial Foregoing, PneumaticCraft, Functional Storage, Sophisticated Storage, AE2, Create and others):

  • 18,000 machines (all 562 ticking machine types, 32 of each), NeoForge 1.21.1: 15 ms per tick without Sleepium, 126 ms with 1.3.0;
  • the same on Forge 1.20.1: 19 ms without, 120 ms with 1.3.0;
  • 20,000 machines of 80 types: 12 ms without, 203 ms with 1.3.0. Rough rule: about +10 ms per tick for every 1,000 such machines, and a tick has 50 ms. Packs with a few hundred machines barely notice it. Big factories do.

If you're on 1.2.0-1.3.0: turn it off. Options → Sleepium… → World ticks and mobs → ObservedModSleep. On a server, add lab.sleep.ObservedModSleep=false to config/sleepium.properties and restart. Everything else in Sleepium keeps working.

1.3.1 fixes it. Sleepium now measures, for each machine type, what the check costs and what it saves. It switches the feature off for types where it doesn't pay. With 1.3.1 the same 18,000 machines run at 15 ms per tick on 1.21.1 and 19 ms on 1.20.1, the same as without Sleepium. 1.3.1 also keeps chunk saving off the main thread when Immersive Engineering or Mekanism are installed (before, those mods turned it off). Making mod machines actually sleep without a per-tick check is planned for a later version.


Using C2ME? Use Sleepium 1.1.4 or newer, and check your world. Before 1.1.4, Sleepium together with C2ME (or another mod that saves chunks on its own threads) could save chunks with parts missing. That was my bug, found and fixed in 1.1.4. Signs of it: No key palette in MapLike[{}] in the log, chunks that look hollow or do not appear. 1.1.4 saves correctly (tested: a world generated with C2ME, the game restarted, every chunk read back without an error), but it cannot restore data that was never written. If you played with C2ME on an older version, regenerate the broken chunks - delete them with MCA Selector, or the region files of that area in saves/<world>/region - or start a new world. Anything built in those chunks is lost when they regenerate.


Help wanted: checking Sleepium against mods

Sleepium lets a block entity sleep only when it can prove from the code that skipping its tick changes nothing, and every release is checked against vanilla scene by scene. Mods are where that proof is hardest: a mod's machine may keep its state in its own objects, use its own inventories and energy, or tick in ways our tests have not seen yet. This release found and closed one such gap (machines whose tick goes through an interface) by placing every block of 13 popular mods and reading what the analysis made of them. Next we want an automatic check that works for any mod: every machine fed and drained through the standard item / energy / fluid connections, put to sleep and woken in every way a player can, and compared with vanilla tick by tick.

If you know a mod whose machines behave differently with Sleepium, know a good way to test this kind of thing, or want to help run such checks on your pack, please open an issue on GitHub or leave a comment - we will be grateful. A link to the mod or the pack is enough: we download mods only from their official pages.


A hopper with nothing to do, a resting item stack, a furnace waiting for fuel: in vanilla each of them runs its full tick 20 times a second only to find out that nothing happened. Sleepium proves from the class's own bytecode and from what it observes that a tick only moves clocks, takes the object off the tick ("puts it to sleep") and wakes it at exactly the tick vanilla would have acted. Around that idea sit an event engine, exact memos and indexes, parallel world generation, batched chunk I/O, and a renderer that keeps frames pixel-identical.

Every optimisation is checked against vanilla: a scene runs twice from the same seeds, once with the optimisations off and once on, and after the same number of ticks every block, block entity and every field of every entity is hashed. On the client, rendered frames are hashed.

Numbers

Intel N100 (4 cores, 6 W, Intel UHD Graphics), server milliseconds per tick, lower is better:

scene vanilla Sleepium
4 000 item stacks 109.6 8.0 ×13.7
1 024 idle hoppers 2.78 0.73 ×3.8
items among sliding minecarts 36.97 10.82 ×3.4
1 024 furnaces 1.25 0.55 ×2.3
water and lava flowing 10.43 5.15 ×2.0
300 farm animals + 50 villagers 18.48 10.00 ×1.8

Client, entity / block-entity scene (armour stands, item frames, chests, signs, skulls):

  • Intel N100: 36-42 → 134-135 fps
  • Ryzen 7 5800X + RTX 4070 SUPER: 69 → 2 152 fps

New in 1.3.1: fixes for mod packs

  • Worlds full of modded machines no longer run slower than without Sleepium. Since 1.2.0, the per-tick check that lets mods' machines sleep could cost more than the machine's own tick. Sleepium now measures it per kind of machine and stops it where it does not pay off. 562 kinds of machines from 13 mods (Create, Mekanism, Immersive Engineering, Industrial Foregoing, Thermal, …) x 32 each: 1.21.1 150 → 16.4 ms a tick (15.6 without Sleepium), 1.20.1 135 → 19.5 ms (19.8 without).
  • Vanilla hoppers sleep fully again: on an Intel N100, 1.20.1 7.4 → 2.4 ms a tick, 1.21.1 1.9 → 0.85 ms.
  • Fixed: a rare freeze while chunks generate with C2ME, ModernFix and Chunky (GitHub issue #10).
  • Fixed: Entity Model Features heads and skulls switched off in bigger worlds, and items in item frames drawn unsafely by the extra render threads.
  • Quieter log: entity sleep prints a summary line instead of a line per mob type.

Checked before release on both versions: every exactness scene identical to vanilla, frames identical to 1.3.0 bit for bit, production clients with Embeddium / Oculus / Sodium / EMF.

New in 1.3.0: the frame and the tick go their own ways (experimental)

In vanilla one thread does everything in turn: it ticks the world, then draws a frame, then ticks again. When a tick runs long - a crowd of mobs, a big pack, a modded machine room - the picture simply stops until it is over, however fast your graphics card is. 1.3.0 is the first step of Sleepium's new cycle: the frame and the game's tick are separated. It is experimental, off by default, and you turn it on at your own risk - we want it in players' hands early, and we want to hear how it behaves in your worlds.

Decoupled frames - Options -> Sleepium -> Decoupled frames (needs a restart):

  • The frame gets its own thread and its own clock. The graphics context moves to a frame thread, and the frame is drawn there while the main thread ticks the world. During a long tick the frame thread keeps drawing on its own clock, so the camera still turns with the mouse instead of freezing.
  • A pipeline instead of taking turns. The main thread records the next frame while the frame thread draws the previous one (a ring of three recorded frames); what each frame sees - the camera, the lists of what to draw - is latched at its start, so a frame never mixes two moments.
  • Mobs tick in parallel. After the client's own tick, mobs - living ones too - are ticked on worker threads, laid out as a graph of tasks that waits only for what it really depends on.
  • Mobs are drawn from tick-rate poses. Each mob's pose is worked out once per tick and the frames in between interpolate it, so drawing a crowd no longer waits for a tick and the tick no longer waits for drawing. Model parts are still prepared on helper threads, as before.
  • Frames in flight kept in check: on drivers that queue frames far ahead (Intel) the number of frames waiting on the graphics card is limited automatically, so input does not lag behind.

What it does in practice (each line one test, the same path with the mode off and on):

off Decoupled frames
a 225-mod pack: the longest freeze 1.8 s 0.15 s
a 474-mod pack, flying over the world: the slowest 1 % of frames 91 fps 185-203 fps
the same, average 280 fps 312-345 fps
a phone (MojoLauncher), distance 6: average / the slowest 1 % of frames 119 fps / 34 ms 150 fps / 22 ms
Intel N100, a flight over new land: the worst frame 417 ms 226 ms

What to know before you turn it on:

  • It is not bit-exact like the rest of Sleepium. Mobs are drawn from interpolated poses (within 0.1 block of vanilla's), translucent items may be drawn in another order, and on 1.21.1 leaves draw no faces deep inside a canopy, where nobody can see them. The world itself - every block, every tick - stays exactly vanilla's.
  • It can be slower. It is about smooth frames, not the average: in the 225-mod pack the average went from 255 to 195 fps, and in that pack's mob zoo it was slower all round (122 -> 87 fps). Mods that replace the game's main loop (in that pack Veil, Sodium, Figura and Xaero's World Map) turn the frame thread's own clock off, and then it mostly costs. Try it in your own world and keep whichever feels better.
  • Some mods may not expect it - they may assume that drawing happens on the main thread. If something looks wrong, turn it off; after a crash that goes through it, the title screen names it and offers to turn it off.
  • Tell us what you see: a GitHub issue with your pack (a link is enough), what happened, and the numbers from Options -> Sleepium -> HUD helps us more than anything.

On by default, exact as always:

32 chunks, flying in circles while turning the camera and going up and down (desktop) 1.2.6 1.3.0
fps 162 806-857
the slowest 1 % of frames, fps 39 150-157
the worst frame 47 ms 35-37 ms
CPU used 8.9 cores 6.4 cores
the camera standing and turning, fps 715 1 120
  • Smoother flight at far view distances: the lists of terrain to draw are built on several threads, Biome Blend colours are worked out with running sums (the same colours; chunk meshing at the largest blend took 6 cores, now 2), crossing a chunk border no longer re-reads every section in view, and a new chunk no longer binds a GPU object it never uses. The same picture, checked frame by frame.
  • Android: render distance above 7 no longer crashes (MojoLauncher, Adreno). Chunk sections get their GPU objects only when they have something to draw: at distance 12, 1 617 instead of 75 000. A phone runs at distance 12 at 110 fps.
  • Fix: freezes of up to seconds in big mod packs (reported with Punchy and Better Combat 1.9.0): Sleepium's mob analysis no longer holds the lock every class lookup waits on (a 474-mod pack: 10.9 s -> 0).
  • Fix: other mods' Mixin warnings printed again and again (GitHub #8).

Next in this cycle: loading chunks in flight. Every time you cross a chunk border at 32 chunks, the game sends a strip of 65 chunks again and meshes them again, more than half of them unchanged; and every 8 blocks it rebuilds its whole visibility graph. Both are what we work on next.

New in 1.2.5: smooth camera turns at far view distances

Turning the camera, 32 chunks, desktop vanilla culling Sleepium 1.2.5
fps 167 1 124
frames over twice the median (stutters) 38.6 % 0.06 %
with the experimental GPU terrain, fps 131 379
  • No stutter when you look around. Every 2 degrees of a camera turn the game works out again which chunk sections are in view, reading every loaded section scattered in memory - about 7 ms a turn at 32 chunks. Sleepium keeps them in flat arrays and decides whole regions at once: the same sections in the same order, the same picture. A phone at 6 chunks: about +7 %.
  • Fix: the experimental GPU terrain left a cross of missing chunks at view distance 31 and above.
  • Fix: turning on the GPU terrain without OpenGL 4.5 (Android launchers) crashed the game; now the normal terrain stays, also when its grid does not fit in video memory (very tall worlds at far view distances).

New in 1.2.3: see and choose what Sleepium does to each mod

  • Options -> Sleepium -> Mods: what Sleepium does to every mod - which of its blocks and entities sleep and why not, which of Sleepium's changes gave way to it - and per-mod switches: sleep, entity sleep, render cache, helper threads, and whether Sleepium gives way to the mod (on a conflict / always / never).
  • What each mod costs: Measure 15 s (or /sleepium profile 15 on a server) times every mod's block entities, entities, event listeners and entity drawing - exact - and lists the ten chunks where the server's time goes.
  • For modpack makers: Save as pack settings writes config/sleepium-pack.properties - ship it, lock what players must not change. Mod authors can declare rules for their own content in their mods.toml. See the page for pack makers.
  • Find the cause: a setting behind a problem found by halves, about 7-8 restarts. After a crash in Sleepium the title screen names the part and offers to turn it off.
  • HUD: frames, a frame graph, stutters taken apart, server tick, GC, CPU per thread, memory, the costliest mods now - in the corners you choose, at no measurable cost (Intel N100: 169 fps without, 168.5 with every widget).
  • Fix: joining a server with Krypton on the client failed ("VarInt too long").

New in 1.2.2: mod machines sleep safely, no sound stalls

A fix first: since 1.2.0 a Thermal dynamo given fuel could stay off under Sleepium. Machines of mods whose code Sleepium cannot follow to the end now sleep only while watched: all of their own state is compared on every skipped tick, they fall asleep after 64 idle ticks, and they watch the blocks around them they send to or take from. Checked with the Thermal series, Draconic Evolution, Flux Networks, Mekanism, Immersive Engineering, Industrial Foregoing, Functional Storage, Applied Energistics 2, PneumaticCraft, Create and Sophisticated Storage: the world comes out the same with and without Sleepium.

before 1.2.2
Thermal dynamos fed fuel stay off run as without Sleepium
a 229-mod pack with Sound Physics Remastered, a burning zombie horde (desktop) 11 fps 41 fps
the same pack with its own shaders, at spawn 268 fps without Sleepium 310 fps
Intel N100, joining a world: the longest frame from Sleepium's chunk buffers up to 89 ms 1.2 ms
a phone (MojoLauncher LTW), 355 armoured mobs: the slowest frames (p99) 76 ms 45-50 ms
  • Sounds no longer stall the game: a sound starts without waiting for the sound thread (it used to hold every frame up next to Sound Physics Remastered and a crowd of mobs).
  • Measured once per machine: Sleepium's measured choices are kept in config/sleepium-calibration.properties - no more seconds of the slower way each time a world opens. Options -> Sleepium -> Recalibrate measures again.
  • Mod packs: the log names the mod and mixin Sleepium gave way to.
  • Dedicated servers no longer print a "ClientLevel for invalid dist" error at start.

New in 1.2.1: Android

Sleepium now runs on phones and tablets through MojoLauncher (and on any driver without OpenGL 4.3 - 1.2.0 crashed there at start). It checks what the graphics driver really supports and draws through OpenGL 3.3 where that is all there is.

A phone (Snapdragon 855+, MojoLauncher LTW, Forge 1.20.1, view distance 6) vanilla Sleepium 1.2.1
355 armoured mobs with swords, item frames, chests, fps 8 42-58 ×5-7
plain terrain view, fps 147 222 +51 %
the slowest frames in the terrain view (p99) 18 ms 10 ms
  • Terrain per region, model parts, items and particles from graphics memory - each with an OpenGL 3.3 path.
  • Animated textures blended on the graphics card where that is faster (on the phone: the slowest client ticks 31 -> 10 ms).
  • Choices by measurement: the render cache or the helper threads for entities, model parts from graphics memory on the helper threads, blending on the graphics card or the processor - Sleepium measures each on the running game and keeps the faster one (a few seconds of measuring when a world opens or a crowd appears).
  • F3 no longer halves the frame rate (1.21.1: 986 -> ~1 300 fps with F3 open).
  • Desktops and laptops: as fast as 1.2.0 (Intel N100: terrain 118, entities 132, items 183, a horde 183 fps), the same picture bit for bit.
  • Known, for 1.2.2: the measuring happens in the running game - a few seconds of the slower way when a world opens or a large crowd appears (a phone: about 5 s). 1.2.2 will remember the results per machine and measure in the main menu.
  • Renderers: tested with MojoLauncher's LTW; Zink / Turnip and Freedreno not tested yet. First of all Sleepium now runs everywhere: it checks what each driver can do and falls back to the game's own way where it cannot.

New in 1.2.0

1.2.0 against vanilla vanilla Sleepium 1.2.0
Intel N100, terrain view, fps 88 118-120 +34-36 %
Intel N100, dropped items, fps 49-56 182 ×3.3-3.7
Intel N100, a horde of mobs, fps 112-119 161-180 +35-60 %
500 Immersive Engineering crushers piling ~2 000 moving items, fps (desktop) 32 423 ×13
60 working IE crushers, fps (desktop) 177 1 786 ×10
1.20.1, 1 440 mobs with Entity Model Features + Fresh Animations, fps 11 43 ×3.9
world generation, chunks per second (desktop) 54 107 ×2.0
  • Intel graphics (laptops, mini PCs): terrain about 1.4x faster - chunks drawn with the call Intel's driver handles best (the N100's terrain view was slower than vanilla before: 82 vs 88 fps; now 120).
  • 1.20.1: Entity Model Features mobs on several threads (EMF 3.3.12 + ETF 7.2.x): 1 440 animated mobs 25 -> 43 fps.
  • Particles up to 2x, machines' moving parts drawn from the graphics card, smoother frames (the slowest frames on the N100 15-21 -> 11-15 ms).
  • Mods' idle machines sleep, on by default (Industrial Foregoing, Functional Storage, PneumaticCraft…). If a machine misbehaves, turn off lab.sleep.ObservedModSleep and tell us which one.
  • Experimental GPU terrain with level of detail (off by default): the N100's terrain view 88 -> 181-184 fps.
  • Tested with ModernFix, Fast Noise, Lithostitched, Bons and Furious; a crash next to Bons and Furious fixed (thanks to BonsUnleashed).

New in 1.1.11: tall-world datapacks generate up to 2x faster

Datapacks such as JJThunder To The Max make the game recompute "climate" values that do not depend on height for every 4x4x4 cell of a very tall column. Sleepium now reads the datapack's functions, finds those parts and computes them once per column - the same world, block for block and biome for biome.

JJThunder To The Max + Chunky, chunks per second vanilla Sleepium 1.1.10 Sleepium 1.1.11
1.21.1 37 108-116 195-233

A normal world and Biomes O' Plenty are unchanged (their climate is already computed once per column).

New in 1.1.10: a fix for world generation far out

On 1.21.1, generating new land far from the world's centre was slower with Sleepium than without it: each new mob's move from the centre to its place made Sleepium check everything in between. Fixed:

576 new chunks 64 000 blocks from the centre, chunks per second vanilla Sleepium 1.1.9 Sleepium 1.1.10
1.21.1 55 20-34 123-126
next to ModernFix, Fast Noise and Lithostitched 66-81 (those mods alone) 31-33 105-126

Long teleports were slowed the same way (less) and are fixed too.

1.20.1: moving blocks up to 1.9x faster. Blocks moved by pistons and falling blocks are now drawn from a cache, as on 1.21.1:

A scene with many moving pistons, 1.20.1 Sleepium 1.1.9 Sleepium 1.1.10
fps 790-979 1 515-1 552
slowest frames (p99), ms 5.7-6.4 2.9-3.3

Also, on both versions: blocks moved by pistons no longer show the light of a moment ago for a frame.

New in 1.1.9: a fix for ImmediatelyFast

1.1.8 was slower next to ImmediatelyFast (in most modpacks): items were prepared for the graphics card and then drawn again the normal way. Fixed - items, and on 1.20.1 also transparent entities, now go to the graphics card next to it:

1 128 dropped items + 1 081 experience orbs, next to ImmediatelyFast Sleepium 1.1.7 Sleepium 1.1.8 Sleepium 1.1.9
fps, 1.21.1 1 057 498 1 765

Also: entities that a mod adds from a world-generation thread go into the chunk being generated or onto the server thread (GitHub #4), and a new setting, off by default, ObservedModSleep - mods' machines that the analysis cannot follow sleep on what Sleepium observes, as before 1.1.8.

New in 1.1.8: items and experience orbs

Dropped items, items in frames and in mobs' hands are drawn by the graphics card from video memory, and experience orbs and items collide with blocks for less (every result the same as vanilla's).

vanilla Sleepium 1.1.7 Sleepium 1.1.8
1 128 dropped items + 1 081 experience orbs on the ground, fps, 1.21.1 182 1 066 2 094
the same, fps, 1.20.1 128 980 1 621
2 000 experience orbs + 1 500 items being picked up, fps, 1.21.1 1 194 215-219
the same on an Intel N100 with integrated graphics, fps 1 22-24 24-27

Many experience orbs at once? Sleepium works well together with Clumps, which merges them: the orb crowd above runs at 996 fps (Clumps alone: 128), on the Intel N100 at 89 fps (Clumps alone: 29).

New in 1.1.0: Minecraft 1.20.1 / Forge

The whole engine on Forge 47 (Java 17 or newer): sleeping block entities and entities, the event engine, exact memos, parallel world generation, the renderer, GeckoLib and Create support, the settings screen, shaderpacks.

Intel N100, production server, milliseconds per tick:

scene vanilla Sleepium
4 000 item stacks 114.9 10.7
300 animals + 50 villagers 22.2 13.25
120 villagers 19.3 14.0
1 024 idle hoppers 6.68 2.4

The fights from a player's Cursed Fate videos (840 entities, zombies burning at noon, black holes and supernovas): 87 -> 600-646 fps; with Oculus + Embeddium installed 289 -> 299 fps (next to Oculus the entities stay on the render thread).

New in 1.1.0: the gains kept next to other optimisation mods

Tested one mod at a time and as a pack (Biohazard: Project Genesis' optimisation set):

next to before 1.1.0 1.1.0
Embeddium (1.20.1), client fps 137 845
Oculus + Embeddium (1.20.1), client fps 238 440-464
ImmediatelyFast (1.20.1), client fps 371 681
Iris + Sodium, no pack (1.21.1), client fps 377 570
ImmediatelyFast (1.21.1), client fps 809 1 149
Lithium (1.21.1), 4 000 items, ms per tick 4.32 3.37

In packs, without Sleepium and with 1.1.0 (production clients):

without 1.1.0
Biohazard, 473 mods (1.20.1), a new world, fps 351-379 571-578
144 Fresh Animations mobs + 450 other entities, EMF 3.2 (1.20.1), fps 32-33 391-392
144 Fresh Animations mobs + 450 other entities, EMF 3.3 (1.21.1), fps 42-46 490-506

Entity Model Features: its animations now run compiled (EMF before 3.3 left them to the interpreter) and its model parts are drawn from video memory - on the scene above with EMF 3.2, Sleepium 1.0 186 fps, 1.1.0 391.

Entity sleep now works next to mods that change entities (Lithium, Radium, Canary); ModernFix no longer turns off the collision memo. Fixed: a crash at start with TerraBlender (Biomes O' Plenty, Regions Unexplored and many packs) in 1.0.x. Exact: world and frame hashes as before.

Water and glass in one draw (1.0.3)

A view over a river on the client (RTX 4070 SUPER): 1 227-1 383 fps on 1.0.2, 2 635-2 833 on 1.0.3 (Sleepium 1.0.2 with Sodium: 1 718). Water, glass and ice are drawn in one multi-draw in vanilla's order; frames unchanged. On an Intel N100 the client's CPU use dropped from 1.67 to 0.52 cores.

With Create

Client on real Create worlds (RTX 4070 SUPER, 1280×720, Flywheel on, default settings; vanilla = the same mods without Sleepium):

world vanilla Sleepium
Alpha Industries (12 880 Create block entities) 48 fps 176–207 fps
Create Aeronautics: SS.Venator placed 108 fps 283–297 fps
Create Aeronautics: SS.Venator assembled (Sable) 101 fps 254 fps

Experimental, off by default: Create's kinetic parts drawn by Sleepium instead of Flywheel - 2 181 fps against Flywheel's 1 523 on a scene of driven lines and belts.

Against other optimisation mods

Server, Intel N100, each mod alone, speed-up over vanilla (vanilla MSPT / the mod's MSPT):

scene Lithium 0.15.4 Moonrise beta.15 Sleepium
4 000 item stacks ×6.8 ×10.9 ×13.6
1 024 idle hoppers ×3.2 ×1.0 ×3.7
200 cows crammed ×1.3 ×1.5 ×2.1
300 animals + 50 villagers ×1.4 ×1.3 ×1.9
120 villagers ×1.4 ×0.9 ×1.5
minecarts ×3.1 ×4.2 ×3.6
redstone clocks ×1.5 ×1.4 ×1.2

Sleepium leads in six of twelve scenes and is level in one; Moonrise is ahead on carts, pistons and crops, Lithium on fluids and redstone.

Client against Sodium (RTX 4070 SUPER, 1280×720):

scene Sodium Sleepium
terrain, no shaders 1 697–1 827 fps 1 762–1 912 fps
entity scene, no shaders 146 fps 1 500–1 680 fps
538 entities, Complementary + shadows (Iris + Sodium) 68–73 fps 484 fps
terrain view, Complementary (Iris + Sodium) 477–515 fps 452–475 fps

Running Sleepium together with them works since 1.0.3 (tested with 22 optimisation mods and a 13-mod pack); see below.

Against Horizon, a Rust rewrite of Minecraft (0.2.97, on 26.3 - the versions differ), on the same Intel N100: the client draws more frames in every scene (entities 115 vs 87 fps, mobs 136 vs 112, light 156 vs 138: +13-32 %); on the server Sleepium is ahead on items, hoppers, smelters, furnaces and pistons, Horizon on mobs, villagers, cramming, redstone, carts and fluids, partly through shortcuts that are not vanilla-exact. Sleepium keeps the vanilla game and its mods.

What it does

  • Sleeping block entities and entities: idle ticks skipped and woken at the exact tick vanilla would act.
  • Event bus: each listener list compiled into its own class, and events nobody listens to never allocated (50 listeners: 542 → 30–38 ns per post).
  • Exact memos and indexes: collisions, shapes, entity sections, neighbour updates, scheduled ticks.
  • World generation and chunk I/O: parallel generation steps, shared noise, chunk saving and loading off the main thread.
  • Renderer: terrain in a few indirect multi-draws with packed vertices, entities batched and posed on the GPU, a render cache for unchanged objects; frames hash-identical to vanilla.
  • GeckoLib models: parallel bone work and compiled Molang.

Shaderpacks (beta)

Sleepium runs OptiFine / Iris-format shaderpacks itself, inside its own renderer, with no Iris or Sodium needed. Put a pack (.zip or folder) into shaderpacks/ and pick it on the settings screen's Shaders tab; it switches without a restart. Tested with Complementary Reimagined r5.9.3 (shadows, deferred lighting, composites). Packs that need features not implemented yet may render wrong. With Iris, Oculus or OptiFine installed, Sleepium leaves shaders to them.

Settings

Options → Sleepium… (or the mod list's Config button): features switched by group, the shaderpack, and every engine flag one by one with search. Saved to config/sleepium.properties.

Installation and compatibility

  • Minecraft 1.21.1 with NeoForge 21.1.251 or later (Java 21 or newer), or Minecraft 1.20.1 with Forge 47.4.9 or later (Java 17 or newer). The renderer needs OpenGL 4.3 (4.6 for multi-draw).
  • Works on the server, on the client, or both: a server with Sleepium accepts clients without it, and the other way round.
  • Tested with Create 6.0.10, Create Aeronautics (Sable, Veil) and GeckoLib 4.9.3.
  • Tested together with Sodium, Iris (also with shaderpacks), Embeddium, Lithium, Moonrise, C2ME, ModernFix, FerriteCore, ImmediatelyFast, EntityCulling, ScalableLux, Radium, BadOptimizations, Dynamic FPS, Chloride, Noisium, spark, FastSuite, Ksyxis, ServerCore, Clumps and Create, and 13 of them at once. With Lithium or Moonrise installed Sleepium's changes stay exact.
  • On 1.20.1 tested with the optimisation set of Biohazard: Project Genesis (Embeddium, Oculus, ImmediatelyFast, EntityCulling, ModernFix, FerriteCore, Radium, Canary, dynamic lights, Create), each alone and all together, and with the Cursed Fate set (GeckoLib, Photon).
  • Where another mod overwrites or redirects the same method, Sleepium's change to it steps aside and vanilla's code runs with the other mod's change.

Source and license

Source, measurements and the full write-up: https://github.com/ha7gawa/sleepium

LGPL-3.0-only. Modpacks may include it; other mods, open or not, may depend on it.

Project description from CurseForge.

Pick your setup

Sleepium by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

2 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Sleepium versions and loaders

21 of 46 releases match
Clear filters

Looking for an older file? The official CurseForge project page is in Resources.