CraftTweaker

CraftTweaker

151M Downloads

Recipes are being edited but JEI still showing removed recipes.

coryjreid opened this issue · 18 comments

commented

Issue Description:

I am attempting to build a "modpack" for my friends and I to play. We are trying to fix duplicate recipe problems. As an example, wood gears from EnderIO and AE2 can be crafted with multiple recipes which overlap. We have used CraftTweaker to remove all of them and then only add back a single recipe for each. This does work, as you can only craft each type with the recipe we specify. However, JEI still shows all the old recipes and not only the one recipe I have defined.

What happens:

All recipes for wood gears from EnderIO and AE2 are not removed from JEI, but the recipe changes I have made are in the game. I can only craft the items as I dictated in my recipes.zs file but JEI still shows all the "old" possible recipes.

What you expected to happen:

JEI only show the recipes that are available.

Script used:

https://pastebin.com/bev2rXvT

crafttweaker.log file:

https://pastebin.com/g1L3cvyK


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2768
  • Crafttweaker: 4.1.13
  • JEI: 4.13.1.225
  • Using a server: no

Your most recent log file where the issue was present:

https://gist.github.com/coryjreid/6081845f80e260f10f5890b4ff80327e

commented
commented

Thanks for the quick reply @jaredlll08!

So, when I place my sticks in the Crafting Table, I get the gears only via the recipes I defined using CraftTweaker. This is expected! Screenshots:

2018-12-17_16 25 34
2018-12-17_16 25 40
2018-12-17_16 25 47

However, If I view all recipes for each type of gear in JEI, it shows all the default recipes which I removed in my script and not just the one I want it to. Screenshots:

2018-12-17_16 25 58
2018-12-17_16 25 55
2018-12-17_16 25 51

To help clarify, looking at screenshot 2 in the second set of screenshots: I should only see a recipe for <ore:stickWood> in the four corners, and none of the additional recipes JEI is showing. This same idea applies for screenshot 3: there are extra recipes which don't actually exist but are displayed in JEI.

commented

That's intentional, it should be ore:stickWood. What you're describing has zero to do with JEI showing recipes that were removed.

commented

let's say i remove the recipe for vanilla furnace, and then add a recipe for it that uses oredict for cobble. then jei will show all the recipes back even tho i removed it because jei shows that it can be crafted with that oredict cobble. which means the only way that i could add it back and not show old recipes would be to add it back with a specific cobble type.

commented

@coryjreid do me a favour and just remove the recipes, don't add any new ones, and post screenshots again.

commented

@jaredlll08 Merely removing them has no effect. They are still in JEI, which I'm sure is going to lead you to tell me it's the other mods' fault, correct?

The script commenting out adding back recipes: https://pastebin.com/SPetHB8B

The screenshots:
The Thermal Foundation mod honors the removal perfectly, it has no recipe to display.
2018-12-18_13 18 25
2018-12-18_13 18 27

As you can see, no such luck with the other two. EnderIO and AE2 just suck, I'm guessing. Which looking at this now with a clear head seems highly probable.

commented

let's say i remove the recipe for vanilla furnace, and then add a recipe for it that uses oredict for cobble. then jei will show all the recipes back even tho i removed it because jei shows that it can be crafted with that oredict cobble. which means the only way that i could add it back and not show old recipes would be to add it back with a specific cobble type.

@LuisAdeur This is sensible if I added back an identical recipe. The single shaped oredict recipe should be there plus its plain cobblestone (original) counterpart (because they're the same materials and same shape), but not all the other various shaped recipes which are still removed.

commented

Do the recipes still craft?

Also just making sure I understand this correctly, some recipes are removed but others aren't?

commented

The recipe changes are honored 100% by the game. I literally cannot make any gears using any of the recipes. The issue is purely JEI still showing the recipes, and I have no idea why. The recipes are full-on gone, but JEI says otherwise.

Here's screenshots of me attempting to craft the wooden gears and the crafting table producing no output.

2018-12-18_13 31 53
2018-12-18_13 31 59
2018-12-18_13 32 04
2018-12-18_13 32 11

commented

Can you reproduce with other items?

commented

once you added
val stickWood = ore:stickWood you defined that anything that is considered stickWood will be used in the recipe.
instead add
val stick = minecraft:stick
then just replace the recipes with stick.

commented

Can you elaborate?

Do you want me to reproduce using the other types of stickWood and/or define the recipes using only minecraft:stick instead of the oredict:stickWood?
Do you want me to find something other than wooden gears and attempt to do the same thing?
Something else?

commented

try and remove a recipe for other items, like the buildcraft quarry or something (I don't know your mods) just something different from a different mod

commented

EnderIO defines all its own recipes in .xml files. AppliedEnergistics2 defines all its own recipes in .recipe files. These mods read these files and overwrite any changes this mod makes. Thanks anyway.

commented

I am also having this problem, sorry if this reopens this but it's still happening it will do the change but JEI confuses people as it shows the old recipes for items like uncrafting table I wanted to make it harder since it's a OP tool when you have things like loot backs or many danugens so
2019-04-18_18 47 55

what is should be:
2019-04-18_18 48 47

But the JEI recipe returns:
2019-04-18_18 49 00

commented

Are you on a server?

commented

Having a similar problem. I'm building a private modpack too, but when I use recipes.removeAll() to completely reimplement things in non-vanilla crafting mechanics, JEI still shows recipes for everything, despite the recipes not actually working when I try to craft them. I'm on CT 4.1.17, JEI 4.15.0.277, Forge 14.23.5.2816, MC 1.12.2, and in the second-to-last file run (according to the #priority preprocessor), I call recipes.removeAll() before adding only fourteen so far back in. JEI shows 1125 pages of recipes for vanilla crafting.

(EDIT) In the minecraft console output, I see this:

[Client thread/ERROR] [jei]: Error caught from Recipe Category: mezz.jei.plugins.vanilla.crafting.CraftingRecipeCategory
java.lang.NullPointerException: null
	at com.brandon3055.draconicevolution.integration.jei.EIOSpawnerRecipesWrapper.setRecipe(EIOSpawnerRecipesWrapper.java:52) ~[EIOSpawnerRecipesWrapper.class:?]
	at mezz.jei.plugins.vanilla.crafting.CraftingRecipeCategory.setRecipe(CraftingRecipeCategory.java:90) ~[CraftingRecipeCategory.class:?]
	at mezz.jei.gui.recipes.RecipeLayout.create(RecipeLayout.java:69) [RecipeLayout.class:?]
	at mezz.jei.gui.recipes.RecipeGuiLogic.getRecipeLayouts(RecipeGuiLogic.java:198) [RecipeGuiLogic.class:?]
	at mezz.jei.gui.recipes.RecipesGui.updateLayout(RecipesGui.java:477) [RecipesGui.class:?]
	at mezz.jei.gui.recipes.RecipesGui.onStateChange(RecipesGui.java:523) [RecipesGui.class:?]
	at mezz.jei.gui.recipes.RecipeGuiLogic.previousPage(RecipeGuiLogic.java:264) [RecipeGuiLogic.class:?]
	at mezz.jei.gui.recipes.RecipesGui.handleMouseInput(RecipesGui.java:294) [RecipesGui.class:?]
	at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:501) [blk.class:?]
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1759) [bib.class:?]
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1098) [bib.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:3941) [bib.class:?]
	at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_211]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_211]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_211]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_211]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_211]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_211]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_211]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_211]
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?]
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]

which suggests that it might be other mods not expecting their recipes to be wiped. Possible cause?

commented

Update: this only happens with some recipes, but it happens no matter how they're removed. I moved all recipes for crafting sticks to a different mechanic and used recipes.remove(<ore:stickWood>) in my script, and JEI no longer shows any of the vanilla table stick recipes except for this one which:

  • accepts two of any logWood, one atop the other
  • does NOT show a recipe ID
  • cannot actually be crafted even using the exact recipe (down to the item) shown in that screenshot

In short, I think this whole thing is a JEI problem, and I'm going to go post it to them.