← All work CODE · 2025

Hide Names — The Minecraft Mod Nobody Asked For

One mixin. Zero nametags. Infinite paranoia.

A Fabric mod for Minecraft 1.21 that removes player nametags — built with Java 21 and SpongePowered Mixin to make hide-and-seek actually playable. Thirteen lines of bytecode surgery.

Hide Names — The Minecraft Mod Nobody Asked For

Let's talk about a problem so stupid it shouldn't exist.

You fire up Minecraft with your mates. Someone suggests hide-and-seek. Everyone scatters. Brilliant — except there's a floating white nametag above every player's head, visible through walls, across biomes, through the very fabric of spacetime. Mojang, in their infinite wisdom, decided you should always know exactly where everyone is.

Hide-and-seek is now just seek.

So I built a mod that removes them. One job. Thirteen lines.

What It Actually Does

Hide Names is a client-side Fabric mod for Minecraft 1.21 that strips player nametags from rendering. Compasses, maps, and every other tracking tool still work — only the floating text above heads is gone. No config screens, no settings panels, no twelve-page wiki. Install it and nametags vanish.

Thirteen Lines of Bytecode Surgery

Minecraft's rendering pipeline doesn't expose a polite setNametagVisible(false) API. The nametag is drawn deep inside EntityRenderer.renderLabelIfPresent() — a method responsible for label rendering on every entity in the game. There's no event hook, no config flag, no toggle.

The mod uses SpongePowered Mixin — a bytecode manipulation framework that lets you inject code directly into Minecraft's compiled classes at launch. The injection targets the very first instruction of the label method. If the entity is a player, the call is cancelled before a single vertex is written.

Here's the entire core:

@Mixin(EntityRenderer.class)
public abstract class EntityRendererMixin {

    @Inject(
        method = "renderLabelIfPresent",
        at = @At("HEAD"),
        cancellable = true
    )
    private void hidePlayerNametags(
        Entity entity, Text text, MatrixStack matrices,
        VertexConsumerProvider vertexConsumers,
        int light, float distance, CallbackInfo ci
    ) {
        if (entity instanceof PlayerEntity) {
            ci.cancel();
        }
    }
}

@Inject at HEAD means the hook fires before any original code runs. ci.cancel() aborts the method entirely — no label computation, no buffer writes, no draw call. Clean removal at the bytecode level. Mob labels, item names, everything else renders as normal.

Why Mixin and Not Just an Override?

The alternative is overriding the entire renderer class. Ship a full copy of Minecraft's source, paste in your change, hope nobody else touches the same class. The moment a second mod does the same thing — and they will — one of you breaks.

Mixin injection is surgical. It modifies only the bytes it needs, coexists with other mods targeting the same class, and doesn't require shipping Mojang's renderer source. The tradeoff is complexity — understanding injection points, callback signatures, and the somewhat arcane @At targeting system. For a mod this size it's overkill in learning curve. But it's the correct approach for anything that needs to survive across versions and play nicely with others.

The Stack

RuntimeJava 21
Mod LoaderFabric API 0.102.0
Minecraft1.21
BuildGradle 8.14 + Fabric Loom
InjectionSpongePowered Mixin (bytecode-level)
LicenceMIT — open source

Project Layout

Even for a small mod, structure matters. One mixin today becomes five tomorrow.

src/main/java/net/mc121/hide_names_fabric/
├── HideNamesFabric.java            // Mod entrypoint & logger
├── client/
│   └── NametagHiderClientMod.java  // Client initialiser
└── mixin/
    └── EntityRendererMixin.java    // The magic

The mixin configuration lives in hide-names-fabric.mixins.json, which tells Fabric Loader which classes to transform at launch. The mod entrypoint registers with the Fabric lifecycle, and the client initialiser handles client-specific setup — future-proofing for when the feature set grows beyond a single injection.

The CI Pipeline

Every push and pull request triggers a GitHub Actions build running on Ubuntu 24.04 — JDK 21 validation, Gradle wrapper verification, full compilation, and artifact capture. Nothing merges without a green build.

What's Next

The mod works. It's also deliberately minimal. The roadmap includes command toggles for server operators, friend and team lists so allies can still see each other, and version ports from 1.20 upward. Development is paused whilst I focus on .NET at university — but the codebase is open, documented, and MIT-licenced. PRs are read.

Read my minecraft post updates! and Join my Patreon

If need to have last-second updates, subscribe to my newsletter (go to footer and press a link), I created a dedicated issue number (no. 32) because why not! I am serious about continuing working on mc mods! Additionally I strongly recommmend to joining my free tier patreon as news there are even more detailed, arrive much quicker and are audience dedicated!

Get It

Download from Modrinth  ·  Source on GitHub