Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GregTech & Railcraft #64

Closed
rjenkins8142 opened this issue Apr 30, 2013 · 8 comments
Closed

GregTech & Railcraft #64

rjenkins8142 opened this issue Apr 30, 2013 · 8 comments

Comments

@rjenkins8142
Copy link

Looks like Railcraft has some recipes that return NULL or a zero stack size. Greg has taken to spamming his IT'S NOT MY FAULT exception whenever he encounters one of these now.

I originally reported this to GregTech when altRecipesEnabled=true in Railcraft. He then added a check that spams his IT'S NOT MY FAULT warning every time it happens. I'm no longer running with that option enabled, but I'm getting a huge amount of spam from GregTech now.

I've removed all mods except for Forge 679, IC2-305lf, GregTech 3.03e, Railcraft 6.17.0.36. I'm using default configs for each.

To reproduce:

Create an 32/t EU power grid of some kind, attach a GregTech Electric Autocrafting Table to the grid. Change the mode of the Electric Autocrafting Table to the second mode. (From the arrow pointing left to a 3x3 box of squares.) Watch the spam in the error log / console.

I'm fighting a bit with Greg on this. Hopefully you can help in some way, either by tweaking your side or helping convince Greg he's mistaken. ;) But, I think we both know the likely-hood of the latter happening. :)

@CovertJaguar
Copy link
Member

The only way you could do that is to disable items that shouldn't be disabled. altRecipesEnabled=true would not be enough.

I'll add some spam of my own and skip any recipes with missing items.

@rjenkins8142
Copy link
Author

Like I said, I get this with the default config (erased all configs and let them generate new ones, even). So, I'm not sure how some items could be disabled that shouldn't be disabled.

In any case, thanks for looking into this.

@CovertJaguar
Copy link
Member

Is it possible Greg is not accounting for custom recipes? They typically return null to IRecipe.getRecipeOutput(), even the vanilla ones do this.

@rjenkins8142
Copy link
Author

Not sure at all. He's definitely assuming that he won't ever get a NULL right now.

BTW, tried the .37 version and I'm still getting the same thing from GregTech.

@rjenkins8142
Copy link
Author

I'm trying to convince Greg now on his Thread that his assumptions about getRecipeOutput are flawed. (My name is Sibmer there.)

@rjenkins8142
Copy link
Author

Can you take a look at RoutingTableCopyRecipe? It looks like the matches function there is a little backwards. It looks like it's returning true by default and false only if it can eliminate things, which seems a little backwards to me. If it's passed a bad grid (0 size or whatever), it looks like it'd fall through and return true incorrectly.

In any case, I think what is happening is Greg's autocrafting machine is passing a strange grid when iterating through the recipes and it's hitting that recipe and matches is returning true, then he's attempting to getRecipeOutput for it and getting null. I still say he's making a bad assumption and assuming matches == true means getRecipeOutput is going to exist. And it looks like there might be a bug in his autocrafting machine where it's looking for recipes when it shouldn't.

@CovertJaguar
Copy link
Member

Oh good catch on the RoutingTableCopyRecipe. I didn't consider that possibility.

But yes, getRecipeOutput() can return null. I honestly don't even know why its in the interface. Workbenches don't use it. RecipesArmorDyes returns null to it.

@rjenkins8142
Copy link
Author

Thanks, the fix in RoutingTableCopyRecipe works great in .38. This has fixed the main issue with GregTech now, it looks like. Now to just get Greg to tweak a little more on his side. :)

Thanks a ton for your help and all your hard work on Railcraft! One of my very favorite mods. :) Closing this issue now, if that's ok.

EmreDurdu pushed a commit to Bil481Railcraft/Railcraft that referenced this issue Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants