promotional bannermobile promotional banner

Fast NBT

Speed up all kinds of NBT operations and improve game performance
Back to Files

fastnbt-1.21.1-26.9.1-neoforge.jar

File namefastnbt-1.21.1-26.9.1-neoforge.jar
Uploader
nutant233nutant233
Uploaded
Sep 19, 2026
Downloads
159
Size
22.6 KB
Mod Loaders
NeoForge
File ID
8924654
Type
R
Release
Supported game versions
  • 1.21.1
  • 1.21

Curse Maven Snippet

NeoForge

implementation "curse.maven:fast-nbt-1417466:8924654"

Learn more about Curse Maven

What's new

1.21.1-26.9.1-neoforge

Added

  • nbtAccounter — unchecked NBT reads. Removes NbtAccounter's accounting entirely: no byte quota, no 512-deep nesting limit and no UTF length scan, on every read path rather than only the unlimited ones. Unlimited reads also share one accounter instead of allocating a new one per read, which is where a chunk read and every trusted-tag packet used to pay. It is faster than nbtIo (which is kept as the safe variant) but it also removes the limits that protect a server from oversized tags sent by clients, and deeply nested tags recurse instead of being rejected. Turn it off on public servers.

Changed

  • Ported to Minecraft 1.21.1 / NeoForge 21.1.x. Java 21, ModDevGradle's neoForge plugin and Gradle 9.7.1. The mixin config is declared in META-INF/neoforge.mods.toml, no refmap is needed (NeoForge 1.21.1 runs on official names), and the access transformers now use official field names (CompoundTag.tags, ListTag.list/type, ...).

Removed

  • The itemStack feature is not part of this branch. Item NBT became data components in 1.20.5, so an ItemStack no longer has the tag/capNBT fields or the ItemStack(CompoundTag) constructor that the 1.20.1 feature optimizes.

Notes

  • blockState, blockStateCodec, nbtIo and the ungated CompoundTag rewrites carried over unchanged. All four mixins were verified on a 1.21.1 dev server: chunks generate, save and load, and CompoundTag, BlockState, NbtUtils and NbtAccounter all come out transformed.

1.20-26.9.1-forge

Fixed

  • NBT data loss in CompoundTag.merge. The merge of a nested compound mutated the target and then replaced it with a copy of the incoming tag, so every key that existed only in the target disappeared. This affects anything that merges NBT: /data merge, the loot table NBT functions (set_nbt, set_contents), placing a block with a BlockEntityTag, spawn eggs carrying an EntityTag, and every mod that merges into its own NBT or saved data. This is the only data-loss fix since 1.2 — see issue #4.

Added

  • Configuration. config/fastnbt.toml is generated on first launch and gives every optimization its own switch, plus a global enabled. Injection is decided by the mixin config plugin, so turning a feature off puts the vanilla method back instead of just skipping it at runtime.
  • blockStateCodec — chunk section palettes resolve the canonical {Name, Properties} tag directly instead of walking the full DFU codec chain (dispatch codec, registry lookup, one MapCodec per property, plus DataResult / Either / Pair / Optional allocations) on every chunk load and save. Decoding only: encoding is untouched, so saved chunks and network packets stay byte-identical.
  • nbtIo — unlimited NBT readers skip a byte-accounting pass whose result is discarded. That covers every chunk load, plus level.dat and playerdata.
  • itemStack and blockState — the existing ItemStack and block-state NBT paths are now switchable features instead of always-on.

Changed

  • The ItemStack#isEnchanted replacement was removed; vanilla's implementation is used again.
  • The CompoundTag rewrites have no separate switch — the global enabled flag controls them.
  • All mixins now carry priority = 100000.

Notes

  • Only canonical data takes a fast path. Non-canonical data is reported as a decode error rather than guessed at, with one deliberate exception to vanilla: an unknown block id is an error here where vanilla resolved it to air, so chunk palette decoding promotes it to air itself and logs one line per entry.
  • Full description, configuration and compatibility notes: README.

This mod has no related projects