Curios API (Fabric)

Curios API (Fabric)

819k Downloads

[Bug]: "Replace" attribute doesn't work

buloz opened this issue ยท 6 comments

commented

Minecraft Version

1.20.1

What happened?

While making my own curios datapack for my server, I could not get rid of values brought by mods with "replace" attribute.

How do you trigger this bug?

Example:
twilightforest mod adds several items for head slot without replace attribute.
I try to override those items with my own head slot definition with "replace : true" attribute.
twilightforest object are still tagged for head slot and can still be used in head slot.

See in attachment my curios/tags/items/head.json then twilightforest's curios/tags/items/head.json

Loader

Forge

Loader Version

forge-47.2.0

Mod Version

curios-forge-5.7.0

Relevant Log Outputs

my head slot :
https://gist.github.com/buloz/8964a74f9fc601f2338b6bd8ad968f5d
tf's head slot :
https://gist.github.com/buloz/5c746cc8c563f911937964b4520e86fb

commented

See in attachment my curios/tags/items/head.json then twilightforest's curios/tags/items/head.json

What is the entire directory path of your head.json file?

commented

See in attachment my curios/tags/items/head.json then twilightforest's curios/tags/items/head.json

What is the entire directory path of your head.json file?

./data/curios/tags/items/head.json

commented

Since you have create:goggles in the values array, have you verified that this item exists in your game?

If you have verified that, can you share your debug.log or latest.log for the session when you load up the server with the datapack?

commented

:|
I tried to reproduce but I'm not able to, I think it happens when player had a previous curios datapack config before... Is this a known issue ?

commented

wrong repro steps, i close

commented

I think it happens when player had a previous curios datapack config before... Is this a known issue ?

Datapacks have ordering, and this is important when using "replace". If your custom datapack loads before Twilight Forest's datapack, then it won't replace the latter's values because it loads before it. Usually if you suspect this is the case you can see the ordering by doing /datapack list as a command and resolve it by doing /datapack disable and /datapack enable on your custom datapack to have it load last.