Tag Rescue

Puts back the tag entries a mod deletes with "replace": true. Silently, Minecraft lets them go.

# Tag Rescue

A mod sets `"replace": true` on a tag, and every entry the other mods put there is gone.

No error. No warning. Not a line in the log.

Blocks stop being mineable. Ores stop generating. Structures stop spawning. You notice in week
three, and spend an evening bisecting a 300-mod list.

## What actually happens

When a tag file declares `replace`, Minecraft empties the entry list before the replacing mod
writes its own — taking everything the packs below it contributed with it:

```java
if (tagfile.replace()) {
    list.clear();          // everything another mod added: gone
}
```

The replacing mod means *"I define this tag now."* It has no idea a second mod already added to it.
Nobody is told.

**What counts as damage.** A mod redefining a *vanilla* tag is usually doing exactly what `replace`
is for, and the default policy lets it have that. The damage is when a replacer deletes **another
mod's** entries — that mod is nowhere in the replacer's file, nobody is told it lost, and the feature
it added simply stops working.

## What Tag Rescue does

Every entry in that list knows which pack it came from. So the wipe does not have to be
all-or-nothing. Tag Rescue keeps what should never have been deleted.

| Policy | What survives |
|---|---|
| **KEEP_MOD_ENTRIES** (default) | Entries other mods added. The replacer may still drop vanilla's. |
| KEEP_EVERYTHING | Everything. `replace` stops meaning anything; the tag is merged. |
| VANILLA | Nothing — the original behaviour, if you want it back. |

The default honours what `replace` almost always means — *"I am redefining this vanilla tag"* —
while refusing to let it delete a third party's work as collateral.

`replace` is not automatically a bug. A mod emptying a vanilla tag on purpose is using the feature
correctly. It becomes a bug the moment somebody else has already added to that tag. Individual tags
can be excluded in the config.

## Seeing it work

Rescues are logged, and `/tagrescue` lists them in game:

```
Tag Rescue
  policy: KEEP_MOD_ENTRIES
  Put back 1 entr(ies) across 1 tag(s):
  minecraft:dirt
    'file/wipe-test' wanted them gone
    kept: farmersdelight:rich_soil
```

## Not the same as Load My F***ing Tags

That mod (8.2M downloads, and worth having) fixes a **different** bug: one **invalid** entry in a
tag makes Minecraft throw out the whole tag. It does nothing about `replace`. The two do not
overlap — run both.

## Notes

- Client and server. Safe on either alone.
- No dependencies.
- Configurable per tag, in `config/tagrescue-common.toml`.
- MIT licensed.

The Tag Rescue Team

profile avatar
  • 4
    Projects
  • 214
    Downloads

More from derh3kiv4tor