Additional-Mods / additionaladditions

A Minecraft Fabric mod that that aims to add additional uses for Copper, Amethyst and Glow Ink Sacs as well as other useful additional additions to the game.
GNU Lesser General Public License v3.0
41 stars 23 forks source link

Some config keys break tags when disabled #5

Closed kwpugh closed 3 years ago

kwpugh commented 3 years ago

Hello,

I'm the author of the Gobber mod and we both have mods in the Medieval Minecraft modpack.  When your mod is enabled, the ores in my mod cannot be broken with drops with vanilla or modded pickaxes. Everything is fine if your mod is disabled.

I spent some time looking through your source code on GitHub and I do not see anything in particular that. might cause this.

Any ideas?

Regards,

Kevin  

kwpugh commented 3 years ago

I noticed this in the log after running Medieval Minecraft pack:

[11:52:53] [Worker-Main-4/ERROR]: Couldn't load tag fabric:pickaxes as it is missing following references: additionaladditions:rose_gold_pickaxe (from Additional Additions) [11:52:53] [Worker-Main-4/ERROR]: Couldn't load tag fabric:axes as it is missing following references: additionaladditions:rose_gold_axe (from Additional Additions) [11:52:53] [Worker-Main-4/ERROR]: Couldn't load tag fabric:hoes as it is missing following references: additionaladditions:rose_gold_hoe (from Additional Additions) [11:52:53] [Worker-Main-4/ERROR]: Couldn't load tag fabric:shovels as it is missing following references: additionaladditions:rose_gold_shovel (from Additional Additions)

I think when yours fail, my fail as well.

Dqu1J commented 3 years ago

Hello, Kevin! Thanks for reporting this issue to me. Is the issue that your blocks don't drop when broken with a pickaxe with Additional Additions enabled? I am unable to reproduce that issue, with both Additional Additions and Gobber2 enabled on their latest versions, as posted on CurseForge. I used vanilla, Additional Additions and Gobber2 pickaxes, and upon breaking the Gobber Ore (gobber2:gobber2_ore), it dropped an item as it should have. I didn't use the Medieval Minecraft modpack for this, instead I used this list of Fabric mods:

Dqu1J commented 3 years ago

The errors in the log are probably from RoseGold feature disabled in Additional Additions. Can you please send me your Additional Additions config? Maybe it is because of modified config file.

Dqu1J commented 3 years ago

Yes, it is an issue with the Config! Thanks for reporting.

kwpugh commented 3 years ago

I think the issue is that neither of us is the required=false tag for the pickaxe.json fabric tags. If an item is disabled via config AND it is not tagged with required=false, the fabric tag reading will abort reading ANY tags from the pickaxe.json file.

I got bitten by this before with another mod.

kwpugh commented 3 years ago

Medieval Minecraft disables RoseGold in the config and it busts the process of adding additional pickaxes to the fabric pickaxe.json tag. I will adjust mine and you need to adjust yours, that should fix things.

kwpugh commented 3 years ago

can you send me a test build with the new tags when you finish, so I can test with my mod to confirm the fix?

Dqu1J commented 3 years ago

It is the latest Github Actions workflow, but I don't think it solved the issue.

kwpugh commented 3 years ago

what did you change? I can't see that.

kwpugh commented 3 years ago

Oh, I see. You need to wrap each entry, like this: https://github.com/kwpugh/gobber_fabric-1.17/blob/1.17.1/src/main/resources/data/fabric/tags/items/pickaxes.json

kwpugh commented 3 years ago

that way, when the tags are read, if any individual item is not actually registered, it won't stop the process of reading others. Annoying bug in Fabric.

kwpugh commented 3 years ago

any tool you add to any of the fabric tool tags (pickaxe.json, axe.json, etc.) that can be disabled via config, will need the wrapper tag around it.

kwpugh commented 3 years ago

I had updated my other tool mods but forgot to update Gobber, lol.

Dqu1J commented 3 years ago

Can you test with the latest commit?

kwpugh commented 3 years ago

dumb question, how do I get a jar out of that?

kwpugh commented 3 years ago

I do everything local and just push updates to GitHub.

Dqu1J commented 3 years ago

dumb question, how do I get a jar out of that?

https://github.com/Dqu1J/additionaladditions/actions/runs/1133175382

kwpugh commented 3 years ago

Bingo, that fixed it.

Dqu1J commented 3 years ago

Is the issue resolved now?

kwpugh commented 3 years ago

yes. I disabled rose gold with the latest of your mod and mine and block breaking was normal.

kwpugh commented 3 years ago

Gobber2-Fabric-1.17.1-2.4.38.jar.zip

here is my latest if you want to try it yourself.

Dqu1J commented 3 years ago

Closed by 771ab78