HomeJavaModsFast Tag
Fast Tag
ModsJava

Fast Tag

by nutant233 · on CurseForge

Optimize performance related to tags

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21–1.21.1 · NeoForge⬇ Download for 1.20.1 · Forge
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

In vanilla MC, TagKey objects are deduplicated upon creation through an Interner, so no multiple identical objects exist (allowing identity comparison via identityHashCode and ==). However, since TagKey is a record class, it automatically generates hashCode and equals methods that compare the internal registry and location, and the Interner relies on these for deduplication. This makes hashCode and equals calls elsewhere slower compared to identity comparison. This mod replaces the Interner with a custom deduplicator and overrides the record-generated hashCode and equals, using identityHashCode and == instead, greatly improving comparison and lookup performance elsewhere while also slightly speeding up creation. Incidentally, ResourceKey has also been switched to this custom deduplicator, improving creation speed and reducing memory usage.

Which areas can be optimized: Tags are used in various places throughout MC, such as items, blocks, fluids, entities, world generation, etc., and they all perform checks on whether they contain a certain tag.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more