#entity_type tag works, but not updated by data pack? [SOLVED]

1 messages · Page 1 of 1 (latest)

cloud sail
#

I have an entity_type tag defined thusly (Mojang mappings):

public static TagKey<EntityType<?>> SINKABLE_BOATS = TagKey.create(Registries.ENTITY_TYPE, locate("sinkable"));

which I check with this code:

if (!getType().is(UnseaworthyCommon.SINKABLE_BOATS)) return;

The tag is defined in src/main/resources/data/unseaworthy/tags/entity_type/sinkable.json which contains

{
  "values": [
    "#c:boats"
  ]
}

This part works fine! It matches #c:boats entities as expected.

However, if I try to modify the tag with a data pack, it doesn't seem like the tag contents are updated.

My data pack has
mypack/data/unseaworthy/tags/entity_types/sinkable.json which contains

{
    "values": [
        "#c:boats",
        "ecologics:azalea_boat",
        "ecologics:coconut_boat",
        "ecologics:flowering_azalea_boat",
        "ecologics:walnut_boat",
        "ecologics:azalea_chest_boat",
        "ecologics:coconut_chest_boat",
        "ecologics:flowering_azalea_chest_boat",
        "ecologics:walnut_chest_boat"
    ],
    "replace": true
  }

but when I test in game, the additional boats don't appear to be matched by the tag. Also, when I dump the entity_tags registry with KubeJS, my tag doesn't appear in the output.

What am I doing wrong here?

fervent geode
#

What version of Minecraft? And can you post a log output with the pack loaded?

cloud sail
#

1.20.1. AfK at the moment but will get a log when i get back to my PC

cloud sail
#

Ah, okay now that I have created a minimal test case, I can see the issue in the logs:

[11:29:37] [Render thread/INFO]: [fabric-registry-sync] Loaded registry data [file 1/4]
[11:29:37] [Worker-Main-3/ERROR]: Couldn't load tag unseaworthy:sinkable as it is missing following references: ecologics:azalea_boat (from file/spectral_seas), ecologics:coconut_boat (from file/spectral_seas), ecologics:flowering_azalea_boat (from file/spectral_seas), ecologics:walnut_boat (from file/spectral_seas), ecologics:azalea_chest_boat (from file/spectral_seas), ecologics:coconut_chest_boat (from file/spectral_seas), ecologics:flowering_azalea_chest_boat (from file/spectral_seas), ecologics:walnut_chest_boat (from file/spectral_seas)

I don't quite understand it though, because the Ecologics mod is loaded and I can /give myself those items… Looking at the Ecologics code now to see if it doesn't properly register those boat entities or something

#

ah, i think i see the problem. those are items, the entities are just minecraft:boat and minecraft:chest_boat… and for some reason the boats in Ecologics aren't those entity types

#

figured it out. the entity_types are ecologics:boat and ecologics:chest_boat. my code works fine, i was just referring to the wrong thing in my datapack.

#

rubber duck debugging wins again