Logo
MINECRAFTBIBLE
Items
Items

All game items

Blocks
Blocks

Building blocks

Mobs
Mobs

Creatures & monsters

Biomes
Biomes

World biomes

Structures
Structures

Generated structures

Recipes
Recipes

Crafting guides

Advancements
Advancements

Achievements

Loot Tables
Loot Tables

Drop rates

Tags
Tags

Item groupings

All Versions
View all data →
Capes
Cape ArchiveNEW

Browse rare Minecon capes, OptiFine capes, and custom capes from players worldwide

Browse

Player Database
Player DatabasePopular

Search any player

Skin Browser
Skin Browser

Browse & download skins

Cape Gallery
Cape GalleryNEW

Minecon & OptiFine capes

Seed Vault
Seed Vault

Curated seeds

Learn

Guides
GuidesNew

Tutorials & tips

Blog
Blog

News & updates

Community

Community Hub
Community HubHub

Posts, discussions & more

All Versions
View community →
Seed Analyzer
Seed Analyzer

World seed analysis

Loot Explorer
Loot Explorer

Drop rates

Crafting Calculator
Crafting Calculator

Material planning

Enchant Calculator
Enchant Calculator

Probability math

Redstone Lab
Redstone Lab

Signal timing

Trading Profit
Trading Profit

Villager ROI

All Versions
View all tools →
Mods
Mods

Browse all mods

Plugins
Plugins

Server plugins

Resource Packs
Resource Packs

Textures & sounds

Shaders
Shaders

Visual enhancements

Datapacks
Datapacks

World logic

Scanner
Mod Intelligence

Scan & analyze any mod

All Versions
View all mods →
Loading...
IntroductionIntroductionVersion HistoryVersion HistoryGuidesGuidesBlog & NewsBlog & News
ItemsItemsBlocksBlocksMobsMobsRecipesRecipesBiomesBiomesStructuresStructuresAdvancementsAdvancementsLoot TablesLoot TablesTagsTags
ModsModsPluginsPluginsResource PacksResource PacksShadersShadersDatapacksDatapacks

MinecraftBible

The Ultimate Wiki

Logo
MINECRAFTBIBLE

The ultimate Minecraft reference. Every item, block, mob, and recipe documented with precision.

Community

  • Skin Browser
  • Cape Gallery
  • Seed Vault
  • Blog
  • Guides

Database

  • Items
  • Blocks
  • Mobs
  • Recipes
  • Biomes
  • Structures

Tools

  • Seed Analyzer
  • Mod Intelligence
  • Crafting Calculator
  • Enchant Calculator

Mods & Packs

  • Mods
  • Plugins
  • Resource Packs
  • Shaders
  • Datapacks

Site & Legal

  • About
  • Authors
  • Editorial Policy
  • Corrections
  • Contact
  • Privacy Policy
  • Terms of Service
  • DMCA
  • Sitemap

© 2026 MinecraftBible. Not affiliated with Mojang or Microsoft.

PrivacyTermsContact
Tag Exclusion
ModMIT

Tag Exclusion

Library & utility for removing entries from tags

7
Downloads
0
Followers
5 months ago
Updated
📦
1
Versions
libraryutilityfabric
Download Latestv1.1.0+mc1.21.11View on Modrinth

📖About Tag Exclusion

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

Syntax

There is now an abbreivated 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"
  }
}

👥 Team & Contributors

ThePotatoArchivist
ThePotatoArchivistOwner

⚙️ Compatibility

Environment
🖥️ Server-side
Loaders
fabric
Minecraft Versions
1.21.11

🔗 Links

Modrinth Page