Tag Exclusion

Tag Exclusion

Library & utility for removing entries from tags

by
203 Downloads
fabriclibraryutility
Rent Server with this Mod

Screenshots

Example of abbreviated tag syntax & removing entries

About this Mod

This library is now obsolete on 26.1+, as Fabric API and Neoforge now both contain ways to remove entries from tag files.


A library & utility to allow removing entries from tags, to avoid having to use "replace": true in datapacks.

Syntax

There is now an abbreviated syntax for tag entries. You can add a ? at the end of an entry to mark it as optional and
a ! at the beginning of an entry to mark it as an exclusion entry.

Exclusion entries will be removed from the tag, including from previous entries in the same tag file and from entries
in lower packs.

Example:

{
  "values": [
    
    "#minecraft:doors",
    // Add all doors
    "!minecraft:spruce_door",
    // Except the spruce door
    
    "#minecraft:logs",
    // Add all logs
    "!#minecraft:logs_that_burn",
    // But not the ones that burn
    
    "create:brass_casing?",
    // Add create brass casing, if it's installed
    
    "!#enderscape:veiled_logs?"
    // Remove enderscape veiled logs, if it's installed
    
  ]
}

The standard expanded format is also extended.

{
  "values": [
    "#minecraft:logs",
    {
      "id": "#minecraft:logs_that_burn",
      "tagex:exclude": true
    }
  ]
}

Depending on Tag Exclusion

Currently, it is recommended to use JitPack to add the mod in Gradle and to jar-in-jar it.

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    modImplementation include("com.github.ThePotatoArchivist:TagExclusion:${project.tagex_version}")
}

Note: For some reason, JitPack cannot have + in version names, so when specifying the version in Gradle you must use
- instead, e.g. 1.0.0-mc1.21.11. The version in the mod metadata still uses +, only the maven version uses -.

Data Generation

To add tag exclusions in data generation, use the extension methods to TagAppender.

valueLookupBuilder(ItemTags.ANVIL)
        .tagex_exclude(Items.CHIPPED_ANVIL);

valueLookupBuilder(ItemTags.LOGS_THAT_BURN)
        .tagex_forceExcludeTag(ItemTags.DARK_OAK_LOGS);

If you're using Kotlin, there are also extension functions that don't have tagex_ in the name.

with (valueLookupBuilder(ItemTags.ANVIL)) {
    exclude(Items.CHIPPED_ANVIL)
}

To avoid messing with datagen when it's not supposed to, datagen will only produce tag entries in abbreviated form if
the generating mod has specified its mod id for datagen and declares a hard dependency on tagex.

In build.gradle:

fabricApi {
    configureDataGeneration {
        // ...
        modId = "testmod"
    }
}

You may need to regenerate your IDE run configurations.

In fabric.mod.json:

{
  // ...
  "depends": {
    // ...
    "tagex": "^1.0.0"
  }
}

Available Versions

Tag Exclusion 1.1.1+mc26.1release
MC 26.1, 26.1.1, 26.1.2fabric
March 25, 2026
Tag Exclusion 1.1.0+mc1.21.11release
MC 1.21.11fabric
February 3, 2026

How to Install Tag Exclusion on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (26.1.2).

3

Install Mod

Open the mod browser in the dashboard and search for "Tag Exclusion". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

26.1.2, 26.1.1, 26.1 (+3 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Tag Exclusion server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.1.2). You can switch loaders with one click in the panel.

Is Tag Exclusion compatible with fabric?

Tag Exclusion officially supports fabric for Minecraft 26.1.2, 26.1.1, 26.1. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Tag Exclusion – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Tag Exclusion consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Tag Exclusion with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Required

Supported Versions

26.1.226.1.126.11.21.111.21.11.21