stfwi / engineers-decor

Engineer's Decor
MIT License
35 stars 16 forks source link

Disabling recipes doesn't work #154

Closed gekkone closed 3 years ago

gekkone commented 3 years ago

Recipe blocking doesn't work. I use such config keys, for example:

#Disable the factory hopper.
without_factory_hopper = true

But I can still craft hopper

stfwi commented 3 years ago

Hi, did you use version engineersdecor-1.16.4-1.1.6-b3?

stfwi commented 3 years ago

... never mind, I just found it, missing recipe condition class initialisation. That's when you do modding an hour here and there and have to stop in the middle of a task :/. Gonna add it for the next version. [edit] And it gets worse, the recipes seem now to loaded before the mod configs, so recipe opt-outs can't be properly done anymore. I'll check if something's known about this in the Forge channels, but I recon there's a reason why this has been changed over the versions. I suggest for you to use something like kubejs or "whatever-tweaker" to disable the blocks you don't need - this could take some time, and depending on how things are progressing I will completely remove opt-outs for 1.17.

gekkone commented 3 years ago

Oh, I can imagine :] I will try to check the blocking of recipes in another mod, if it works there I will unsubscribe, you can peek at the code from its author

gekkone commented 3 years ago

Yeah, my theory was confirmed. In the Aquaculture mod there are such configs

"Enable recipes for Neptunium items?" = false
"Enable recipes for Neptunium armor?" = false

and they do disable the recipe. Perhaps you could look at how it works and fix the code. https://github.com/TeamMetallurgy/Aquaculture Perhaps I will offer a push request myself, but I do not know when I will get my hands on it and how much time it will take, I have not yet contributed to your mod

stfwi commented 3 years ago

Hi, quickly asked in the Forge channel, the opt-out has to be moved to the COMMON config because the SERVER config is loaded after data packs (bummer as I switched to that config a while ago because it is synced to the clients) ...

stfwi commented 3 years ago

Ok, added the excludes and includes in the common config, but left them for now "as overrides" in the server config to prevent breaking existing configs. The flag based opt-outs will be removed in MC1.17.

gekkone commented 3 years ago

Thank you, excludes and includes are working. In future updates, will configs like "without_*" be removed, or will they also work? They also duplicate the functionality of the excludes and includes configs.