Tag Exclusion

⭐ — (1 endorsements) 📥 293 downloads 📌 v1.1.1+mc26.1 📅 2/5/2026
🟡 Updated this year

By ThePotatoArchivist · fabric

⬇ Download Mod Source: Modrinth ↗ 📅 Updated: 3/25/2026 📅 Created: 2/5/2026
⚠️ Install Order · 2 steps
1🛠️ Forge — Minecraft Forge (mod loader) Download ↗
2🛠️ Fabric — Fabric Loader Download ↗

Install in this order, then this mod last — most mods fail to load without their framework and dependencies in place.

🔍 Analysis

  • 🏆 #99 of 909 fabric mods in this game by downloads

📋 About This Mod

**This library is now obsolete on 26.1+, as (https://github.com/FabricMC/fabric-api/pull/5365) and (https://docs.neoforged.net/docs/resources/server/tags/#tag-file-format) 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: ```json5 { "values": } ``` The standard expanded format is also extended. ```json { "values": } ``` ## Depending on Tag Exclusion Currently, it is recommended to use JitPack to add the mod in Gradle and to jar-in-jar it. ```groovy 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`. ```java 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. ```kotlin 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`: ```groovy fabricApi { configureDataGeneration { // ... modId = "testmod" } } ``` You may need to regenerate your IDE run configurations. In `fabric.mod.json`: ```json5 { // ... "depends": { // ... "tagex": "^1.0.0" } } ```

This library is now obsolete on 26. 1+, as (https://github.com/FabricMC/fabric-api/pull/5365) and (https://docs.neoforged.net/docs/resources/server/tags/#tag-file-format) 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.

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.

```json5 { "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.

```json { "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.

```groovy 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`.

```java 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.

```kotlin 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`:

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

You may need to regenerate your IDE run configurations.

In `fabric.mod.json`:

```json5 { // ... "depends": { // ... "tagex": "^1. 0. 0" } } ```

🤖 AI-enhanced — based on mod data

📊 Mod Details

Game
Minecraft Mods
Author
ThePotatoArchivist
Version
1.1.1+mc26.1
Downloads
293
Endorsements
1
Category
fabric
Created
2/5/2026
Updated
3/25/2026
Game Versions
26.1, 26.1.1, 26.1.2
Tags
library, utility

🔧 How to Install Minecraft Mods Mods

Download from Modrinth. Use Prism Launcher or drop into your mods folder.

📖 Full step-by-step install guide for Minecraft Mods →

Visit the official mod page for specific installation instructions for this mod.

🎮 Need cheat codes or console commands? Check ur gaming wiki for Minecraft Mods commands, item IDs, and more.

❓ Frequently Asked Questions

Which Minecraft Mods versions does Tag Exclusion support?

The author lists 26.1, 26.1.1, 26.1.2. Other versions may work but are untested by the author.

What is the latest version of Tag Exclusion?

Version 1.1.1+mc26.1, published 2026-03-25 with 293 downloads recorded at the source.

Keep browsing — more Minecraft Mods mods await

📋 All Minecraft Mods Mods 🏆 Top 25 📂 More fabric 👤 More by ThePotatoArchivist 🔎 Similar Mods 🌐 Best fabric (All Games) 🔀 Check Compatibility ⚖️ Compare Mods 🆕 New Mods