Back to mods
FastMapCodec project artwork

Modrinth · Minecraft mod

FastMapCodec

Provides more efficient BaseMapCodec.decode implementation

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

Quick answer

Which FastMapCodec release should I use?

Updated last month
Latest stable file 1.0.4
Game version 1.21, 1.21.1, 1.21.2
Loader NeoForge

FastMapCodec 1.0.4 targets 1.21, 1.21.1, 1.21.2 with NeoForge. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

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

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
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 marks this as usable on both the client and server.

What else does FastMapCodec 1.0.4 need?

1.0.4. 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 FastMapCodec without breaking your instance.

Built for FastMapCodec 1.0.4. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.0.4. It targets 1.21, 1.21.1, 1.21.2 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

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.0.4. It opens that exact file at the source.

About this project

What does FastMapCodec add?

Mainly fixes TPS freeze on player join caused by large advancement files (and the same class of freeze anywhere else in the game, or in other mods, that arises from decoding a large map through DFU).

It is okay to use this mod on server only or client only.

Fixes O(N²) behavior in Mojang's BaseMapCodec (part of com.mojang:datafixerupper) when decoding large map-based Codecs. Since the fix lives in BaseMapCodec itself, it applies to every codec built on top of it - UnboundedMapCodec, SimpleMapCodec, and anything else sharing the same decode/encode logic - not just player advancements.

This bug was introduced in 1.21 and is present up to modern versions.

Benchmarks comparing this mod's fix to vanilla behaviour (with some context) are available here:

nekotxs/BaseMapCodec-bench

The fix has also been submitted upstream to Mojang's DataFixerUpper:

Mojang/DataFixerUpper#110

If Mojang accepts the PR, this mod won't be needed on newer versions.

NeoForge disclaimer

On NeoForge, this mod uses some cursed techniques to modify DFU behaviour, which may cause incompatibility with other mods. If you notice any issues, please open an issue on GitHub.

It is known to be incompatible with Sodium Extra.

This only applies to NeoForge — the Fabric version is not affected.

Project description from Modrinth.

Pick your setup

FastMapCodec by Minecraft version and loader

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

34 available setups

Showing the newest 12 of 17 game versions. Older files are in the list below.

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

Recent files

FastMapCodec versions and loaders

10 of 10 releases match

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