Back to mods
Fast NBT project artwork

CurseForge · Minecraft mod

Fast NBT

Speed up all kinds of NBT operations and improve game performance

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

Quick answer

Which Fast NBT release should I use?

Updated 19 days ago
Latest stable file fastnbt-1.21.1-26.9.1-neoforge.jar
Game version 1.21, 1.21.1
Loader NeoForge

Fast NBT fastnbt-1.21.1-26.9.1-neoforge.jar targets 1.21, 1.21.1 with NeoForge. 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 Fast NBT 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 NeoForge
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 Fast NBT fastnbt-1.21.1-26.9.1-neoforge.jar need?

fastnbt-1.21.1-26.9.1-neoforge.jar. Change the file and its required mods may change too.

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 Fast NBT without breaking your instance.

Built for Fast NBT fastnbt-1.21.1-26.9.1-neoforge.jar. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use fastnbt-1.21.1-26.9.1-neoforge.jar. It targets 1.21, 1.21.1 with NeoForge; 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 fastnbt-1.21.1-26.9.1-neoforge.jar. It opens that exact file at the source.

About this project

What does Fast NBT add?

Fast NBT makes the NBT work Minecraft does constantly cheaper: reading tags, turning them into game objects, and loading them from chunks, packets, block states and ItemStacks.

CompoundTag

  • All kinds of get methods. In the vanilla game it first calls contains to check whether the key exists, then invokes get — two map lookups. Fast NBT merges those two operations into one and applies inlining, which greatly improves the lookup speed.
  • Iteration. Iterating with keySet paired with get is replaced by an approach that walks keys and values simultaneously, so writing and merging a compound no longer does a lookup for every entry.
  • Related classes. Operations that use those get methods in other related classes are optimized too.

ItemStack, block states and NBT I/O

  • ItemStack loading. Reading an ItemStack from NBT takes tag and ForgeCaps straight from the backing map instead of probing with two contains calls, and getOrCreateTagElement, getTagElement and removeTagKey resolve in a single lookup.
  • Block states. NbtUtils.readBlockState and getDataVersion read Name and Properties directly, instead of going through the vanilla contains / getString chain.
  • Chunk section palettes. Each palette entry normally goes through the full DFU codec chain — dispatch codec, registry lookup, one MapCodec per property, plus DataResult / Either / Pair / Optional allocations — on every chunk load and every save. Fast NBT resolves the canonical {Name, Properties} tag straight from the map. This is the largest win in the mod.
  • NBT I/O. Unlimited readers — every chunk load, plus level.dat and playerdata — skip a byte-accounting pass whose result is thrown away.

So the gains land where NBT is decoded in bulk: world and chunk loading, server autosaves (which re-encode every chunk), and the inventory, block entity and entity payloads that carry tagged ItemStacks. Fewer temporary objects on the palette path also means less GC pressure.

This is not a general performance mod: it touches nothing outside NBT, and it cannot help a workload that is bounded by disk or network. The savings scale with how much NBT a pack decodes, and are smallest in a plain vanilla world.

Configuration

config/fastnbt.toml is generated on first launch and gives each optimization its own switch:

enabled = true              # master switch for everything below

[features.itemStack]
    enabled = true

[features.blockState]
    enabled = true

[features.blockStateCodec]
    enabled = true

[features.nbtIo]
    enabled = true

The CompoundTag rewrites have no separate switch; the global enabled flag controls them.

How it stays safe

  • Only canonical data takes a fast path. Anything that is not canonical is reported as a decode error instead of being guessed at, and a key in Properties that the block does not have is ignored, exactly as in vanilla. For chunk palettes the caller turns a failed entry into air, so a world referencing blocks from an uninstalled mod still loads — with one log line per entry.
  • Encoding is never replaced. The palette optimization only speeds up decoding, so saved chunks and network packets stay byte-identical.
  • Injection conflicts. The optimizations replace or redirect vanilla methods and ship no non-destructive variant, so if another mod targets the same method, the last one applied wins. Test large packs before shipping them.

Licensed under the GNU LGPL v3.0 or later.

Project description from CurseForge.

Pick your setup

Fast NBT by Minecraft version and loader

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

4 available setups

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

Recent files

Fast NBT versions and loaders

3 of 3 releases match

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