Railcraft

Railcraft

34M Downloads

GregTech & Railcraft

rjenkins8142 opened this issue ยท 8 comments

commented

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. :)

commented

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.

commented

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.

commented

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

commented

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

commented

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.

commented

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.

commented

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.

commented

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.