Fabric API

Fabric API

108M Downloads

[1.20] Tag resource conditions do not work for loot data

Technici4n opened this issue ยท 2 comments

commented

This is because they are applied in the prepare phase for loot data, but tags are only available in the apply phase.

Here are our options:

  • Do nothing, tags conditions will not work for loot anymore.
  • Evaluate conditions in the apply phase. Problems:
    • Need to keep track of conditions until then.
    • If the deserialization fails, the reload fails (previously the object just didn't get deserialized at all).
  • Evaluate conditions in the prepare phase if needed, resolve tags from the resource manager directly (ร  la client tags) if something is looking for a tag.

I suggest supporting tag conditions in the prepare phase in general, by reading the tag contents from the ResourceManager ourselves on-demand (like the client tags do). (i.e. the last bullet point)

commented

#3117 fixed the other conditions (mods, registry, etc...), however tag conditions still do not work for loot, and I opened this issue to track that. ๐Ÿ˜‰

commented

#3117 fixed the other conditions (mods, registry, etc...), however tag conditions still do not work for loot, and I opened this issue to track that. ๐Ÿ˜‰

Ah yeah, my bad. Thanks ๐Ÿ‘