Nbt Crafting (Fabric)

Nbt Crafting (Fabric)

630k Downloads

[bug] Scoreboard tags appear quoted in data

ehx-v1 opened this issue ยท 1 comments

commented

Version
Minecraft 1.19.2
Fabric API 0.76.0
NBT Crafting 2.2.3
Describe the bug
When using scoreboard tags in the data of an item with entity data (such as a spawn egg), the scoreboard tags are inserted quoted, producing invalid NBT.

To Reproduce

  1. Minimal JSON (should work with any other Spawn Egg as well, ingredient shouldn't matter either):
{
    "type": "minecraft:crafting_shapeless",
    "ingredients": [
		{
            "item": "minecraft:iron_ingot"
        }
    ],
    "result": {
        "item": "minecraft:villager_spawn_egg",
        "count": 1,
		"data": {
			"EntityTag": {
				"Tags": [
					"some_tag",
					"other_tag"
				]
			}
		}
    }
}
  1. When using the crafting recipe in-game and using the resulting spawn egg to spawn an entity, the entity will have quoted scoreboard tags (which is not possible under normal circumstances and not a valid NBT structure)

Expected behavior
The scoreboard tags should be unquoted, like they are from any normal scoreboard tag source

Additional context
The tag target selector cannot query the quoted scoreboard tags.

I'm surprised the game engine even accepts the quoted scoreboard tags. But apparently any invalid NBT is just swallowed with no complaints.

commented

Apparently I misread the normal data. The NBT is just like normal.