yeelp / Scaling-Feast

A simple, balanced way to increase your maximum hunger in Minecraft over the course of a world.
MIT License
0 stars 1 forks source link

[1.12.2] Conflict with CraftTweaker. Using Gun Powder, Glowstone or Redstone for Potions will turn them into Metabolism Potions. #32

Closed SonicX8000 closed 4 years ago

SonicX8000 commented 4 years ago

Minecraft: 1.12.2 Forge: 14.23.5.2847

Mods: 5 AppleCore-mc1.12.2-3.2.0 AppleSkin-mc1.12-1.0.9 CraftTweaker2-1.12-4.1.20.562 jei_1.12.2-4.15.0.291 scalingfeast-1.2.1-beta

=====

The CT script being used: https://drive.google.com/file/d/1PXeyFnGxc8EDzjl39pSFD1QX9Vj0nN0h/view?usp=sharing

The script used above is a CT Script for adding in bewing recipes for the Potion Core mod however I forgot to include it during the testing and noticed the conflict still occurs without it.

Anyway... when brewing potions, if you use Glowstone, Redstone or Gunpowder to change the potion... they will always brew into Metabolism Potions. To name some examples...


Water Bottle + Gun Powder = Metabolism Splash Potion

Water Breathing Potion + Redstone = Metabolism Potion 4:00

Speed Potion + Glowstone = Metabolism II Potion


Without Scaling Feast installed, no conflict occurs with the script.

yeelp commented 4 years ago

You of course also had Potion Core installed right? Which version? Can this be reproduced without the CraftTweaker script?

SonicX8000 commented 4 years ago

PotionCore-1.9_for_1.12.2

Potion Core doesn't need to be installed but most of the script is not used since the brewing recipes in the script are suppose to allow you to brew the Potion Core Potions, as by default they lack a recipe. The conflict still occurs with or without Potion Core.

As for the script itself. No conflict occurs if the CT script isn't used meaning your Water Bottles / Potions won't turn into Metabolism Potions when brewing them.

yeelp commented 4 years ago

As you said, the problem seems to only occur when the CT script is loaded. Checking crafttweaker.log unfortunately reveals no insight as to why everything is now a brewing ingredient for Metabolic Potions. I'm wondering if this is more of a problem with the CraftTweaker script then with Scaling Feast, but it's hard to tell. I have no other CraftTweaker scripts that deal with PotionCore brewing recipes that I can test against. I have used Scaling Feast with CraftTweaker scripts before in a currently unreleased modpack with no issues so far. None of these scripts modified brewing recipes though.

The console log does produce this though:

http://puu.sh/FwCjX/b01021b03f.png

Which is interesting. However, that still doesn't give me much.

I only have remedial knowledge in CraftTweaker scripts, as I haven't gone super in depth with them before, but I imagine you could remove the brewing recipes for the Metabolic Potions and then add them back in, which could probably work for now.

I'm going to add some configuration options to remove Metabolic Potions and/or their brewing recipes. This can serve as a temporary solution while I figure out what's going on.

This one's a real thinker.

SonicX8000 commented 4 years ago

Unfortunately, the config option to disable the brewing recipe but keep the potions enabled still conflicts. Had to set the 'Enable Metabolic Potions' to false as that removes the potions and now the conflict no longer occurs.

There was one other mod that had a conflict with this CT script and that was Genetics Reborn where using gun powder to brew any splash potion would always result in getting Splash Potion of Virus Protection, if the script wasn't being used then no conflict occurs. Now it's been fixed on Genetics' side meaning that I can use the script alongside Genetics' and the potions brew correctly.

In my private survival world with quite a number of mods added... those are the only two mods that for whatever reason conflicts with that CT script. It doesn't even touch any of the potion recipes from those mods so... shrugs

I do have other mods added that add in potions and there's no conflict with them when using the script, unless that's maybe due to the way that their potion recipes are registered? To name a few mods...

Resizing Potion Extra Alchemy Potion Core Extra Utilities 2

yeelp commented 4 years ago

The config option for disabling the potions not actually solving the problem is boggling my mind. If the potions recipes aren't registered, how the heck can you even brew them in the first place? Hmm...

That aside, the fact that Genetics Reborn encountered this, and that it's open source is actually a huge boon (looks like it was fixed recently too). Using their source, it wouldn't surprise me if I could roll out a patch for this today, depending on the complexity of the solution (although I might have to change how the potions are registered, causing a missing registries warning on world load, but that's no big deal).

EDIT: As a side note, the main difficulty with this comes from the fact that Forge doesn't load brewing recipes from JSON files, but it can (but doesn't have to) load crafting recipes from JSON files, which makes creating and maintaining them super easy, not to mention and guarantee that nothing will mess with them in weird ways. It'd actually be super cool to have some sort of API that could load brewing recipes from JSON files to add to the game, but I'm not qualified enough to attempt that myself, based purely off my modding experience alone, neither do I know if it already exists nor know if it has been attempted before. But it would be cool. As it stands, things have to be done in code, and it's a huge convoluted mess. But I digress.

yeelp commented 4 years ago

Commit f5b7b64 at least allows the "Enable brewing recipes" config to work. I'll release this in 1.2.3-beta shortly then keep working on it.

SonicX8000 commented 4 years ago

'scalingfeast-1.2.3-beta' crashes upon startup. https://pastebin.com/s538HMzu

yeelp commented 4 years ago

Just found this myself. I'm not sure how I was able to start up to begin with. Either way, I just patched this. will release a new version again

SonicX8000 commented 4 years ago

It appears that the conflict now no longer occurs in 'scalingfeast-1.2.4-beta'. Water Bottles / Potions no longer brew into Metabolism Potions when using Gunpowder, Redstone or Glowstone.

I had the potions enabled in the config as well as the 'remove brewing recipes' set to false.... although it seems that there isn't any brewing recipes for the Metabolism Potion... but you did say you were still working on it.

I tested this in a new world & in my modded survival world.

yeelp commented 4 years ago

I am still working on it. It very well could be that I may have the config backwards. You can check to see if setting "remove brewing recipes" to true enables the recipes. This should of course, make everything brew into a Metabolic Potion (Since that part isn't fixed yet)

But for now you can at least disable the problem while I fix it.

SonicX8000 commented 4 years ago

I tried 'true' and no recipes appear, as well as no conflict. I did notice something, however...

If set to 'true', the Hearty Shank can be put at the top slot of the brewing stand but it won't brew with Thick Potions, after looking at the code to see what the recipe was.

If set to 'false'. You won't be able to place the Hearty Shank at the top slot for the brewing stand.

yeelp commented 4 years ago

Been a few days since I've been able to work on this.

I've tweaked my brewing recipe and, from the testing I did, it works as intended. However, JEI will not recognize and add the recipes. This is almost certainly because of how I'm handling the brewing recipes, which probably isn't the best way to do things. I'm going to see if I can redo the recipe properly in the meantime. If that's for some reason not possible, I'm currently set up to use the JEI API to add the recipe manually.

1.2.6-beta will include these fixes. If everything works as intended on your end, you can safely close this issue

SonicX8000 commented 4 years ago

Just confirming that the conflict no longer occurs & the recipe config works correctly now as of 1.2.6-beta.

I was able to brew the Metabolism Potions along with their upgrades & was able to brew other potions without them turning into Metabolism Potions.

I'll go ahead & close this issue now. Thank you.