mojira.dev
MC-249007

Not all defined tags for registry are present in data pack after switching between worlds

When a tag is defined via a data pack that is loaded in one world, that tag stays defined on the client side and is not removed even if the player logs out of a world and joins another world.

Game output console

01:12:15.191
Not all defined tags for registry ResourceKey[minecraft:root / minecraft:item] are present in data pack: minecraft:bookshelf_books, minecraft:hanging_signs
01:12:15.191
Not all defined tags for registry ResourceKey[minecraft:root / minecraft:block] are present in data pack: minecraft:all_hanging_signs, minecraft:ceiling_hanging_signs, minecraft:wall_hanging_signs

Also affects 1.20 snapshot game built-in data packs.

Steps to Reproduce:

  1. Create a new world with the attached data pack.

  2. Look at some grass blocks, dirt, sand, or waxed copper.

  3. In the F3 menu, notice that there is a line #test:tags_persist_across_worlds.

  4. Save and quit to title.

  5. Create or join another world with cheats enabled but without any data packs beside the vanilla data pack.

  6. Look at some grass blocks, dirt, sand, or waxed copper.

  7. In the F3 menu, notice that there is still a line #test:tags_persist_across_worlds, which should not be there given that the data pack providing the tag is not present in the current world.

  8. Check the client logs. One or more lines of the following form would have been printed.
    Not all defined tags for registry ResourceKey[minecraft:root / minecraft:block] are present in data pack: [...], test:tags_persist_across_worlds

Linked issues

Attachments

Comments 8

Confirming it's still present in the latest snapshots

It seems like a problem that still exists

Not just a client problem:
If a data pack tries to use a non-existing tag, it also prints this, even after removing the tag reference and reloading.
A full client/server restart is needed to fix this.
As long as this error gets printed, the client/server thinks the tag should exist, and suggests it in commands and shows it in F3 menu.

Yeah, I just recently noticed and reported this under MC-254136 before being linked to this report. I discovered it through item tags. It’s interesting that you can use commands like /clear to clear all items of a tag that shouldn’t even exist for that world. I haven’t tested it yet, but does anyone know if altering a vanilla tag through a datapack is impacted? I would guess not but I also would’ve guessed this bug didn’t exist so who knows. If it is affected, I feel like that could have more noticeable consequences.

Confirmed in 1.20.2.

I found that there was a bug in 1.19.4 which invalid entries prevent the entire tag loading,
but it's no longer exist in 1.20.4. maybe they're related

This is still an issue in 1.20.6 and 1.21-pre2.

Still present in 1.21, and might be a little more impactful than just a couple of error messages. Some changes to tags even seem to persist between worlds; adding a new item to #minecraft:stone_tool_materials in one world, exiting, and loading another will carry over and allow the newly-added item to be used to repair stone tools in an anvil, even without any datapacks loaded, until the game is rebooted.

jamesmoton

(Unassigned)

Confirmed

Platform

Low

Data Packs

1.18.2, 1.19, 1.19.2, 22w43a, 22w46a, 1.19.4, 1.20.2, 1.20.6, 1.21 Pre-Release 2

Retrieved