Tinkers' Complement

Tinkers' Complement

27M Downloads

cannot remove oredicted recipes from melter

mattieboy079 opened this issue ยท 15 comments

commented

It could be a stupid question.
I wanted to remove the recipe of iron ore (and some other ores).
I tried 2 things:

  1. with the OreDict ore:oreIron, but I get an error that it uses an IItemStack and not an IOreDictEntry.
  2. with the normal iron ore id minecraft:iron_ore, but then the recipe has not been removed.
commented

What exact code are you using to make the script?

commented

I use zenscript.

commented

mods.tcomplement.Blacklist.addRecipe(liquid:iron, minecraft:iron_ore); --> results in the iron still be abled to be smelted.
mods.tcomplement.Blacklist.addRecipe(liquid:iron, ore:oreIron); --> results in the error i mentioned

commented

Do you have any idea how to fix this? Because I'm creating an ageing modpack, and I don't want to be able to smelt Iron in the Melter, and I really would like to use the Melter as an early game ore smelter.

commented

Alright, this looks like a misunderstanding of how the melter recipes work. The melter registry has three parts:

  • Tinkers Smeltety recipes: the melter will pull recipes from the Tinkers Smeltery by default, so any recipes there will also be available for the melter.
  • Overrides: this is the melters personal recipe set, allowing you to add a melter exclusive recipes or change the result of a vanilla recipe. It is used internally to add ore recipes that do not ore double.
  • Blacklist: this is the one you are mistakenly using. The blacklist prevents a vanilla TiC recipe from melting in the melter. It is used internally to remove all seared stone recipes from the melter

For what you are trying to do, there are two steps:

  • Remove the melter ore override: use Overrides.removeRecipe to remove the melter iron ore recipe.
  • Blacklist iron ore: use Blacklist.addRecipe to blacklist the smeltety iron ore recipe from working in the melter. Otherwise after removing the single ore output recipe you get the double one.

See the following for syntax: https://docs.blamejared.com/1.12/en/Mods/Modtweaker/TComplement/Handlers/Overrides/

commented

Ok, thank you for your answer, I will try to do this. I will let you know if it worked!

commented

Okay, so it worked for almost everything, except for the iron and golden horse armor, and for the different tracks which result in liquid iron or gold:
minecraft:iron_horse_armor
minecraft:golden_horse_armor
minecraft:golden_rail
minecraft:detector_rail
minecraft:rail
minecraft:activator_rail

I have used
Overrides.removeRecipe(liquid:iron);
Overrides.removeRecipe(liquid:gold);

And i have blacklisted all of the items above. Have I missed something?
Thanks for your help!

commented

Did you add a blacklist entry for those? Rails are a smeltery recipe, they behave the same in the melter. An easy check is to see if the recipe is the same in both the smeltety and the melter, if so blacklist is right.

commented

How did you add the blacklist entry? Exact script would help

commented

Overrides.removeRecipe(liquid:iron);
Overrides.removeRecipe(liquid:gold);

Blacklist.addRecipe(liquid:gold, minecraft:golden_horse_armor);
Blacklist.addRecipe(liquid:gold, minecraft:golden_rail);

Blacklist.addRecipe(liquid:iron, minecraft:iron_horse_armor);
Blacklist.addRecipe(liquid:iron, minecraft:rail);
Blacklist.addRecipe(liquid:iron, minecraft:activator_rail);
Blacklist.addRecipe(liquid:iron, minecraft:detector_rail);

I have imported Overrides and Blacklist ofcourse.

commented

Okay, thanks for the tip! But yea, I added a blacklist entry for those items.

commented

Have you tried a blacklist for all gold or iron? Since those are the ores you are blocking.

commented

Yep, no items resulting in iron or gold can be smelted in the melter anymore, except for these 6 items

commented

I looked into the integration, and it looks like the blacklist is handled really poorly by modtweaker. To expand upon that, I do not add any crafttweaker integration myself, its all on modtweaker.

The fluid in the blacklist is entirely unused, which makes sense because my blacklist does not handle fluids. I see no reason why the itemstack blacklist recipes would not be working, but I cannot understand the logic behind the integration in CraftTweaker, so maybe that is what broke it. To explain it a bit more, the liquid is entirely unused in Blacklist.addRecipe, except that he uses the liquid size to be the item stack size. The item is all that should matter, and he adds items the same way I do.

So this may be a code bug, as what you are typing should work. However, neither Tinkers Complement or ModTweaker are getting any new 1.12 updates, so if it is a bug, its unlikely to be fixed.

commented

Okay. Well thanks for your time and answers, I appreciate it!
Ill guess I just have to accept it for now.