SleepyTrousers / EnderIO-1.5-1.12

http://enderio.com/
The Unlicense
728 stars 356 forks source link

Possible Bug: Alloy Smelter fails to craft Conductive Iron #3797

Closed Kaisoul closed 7 years ago

Kaisoul commented 7 years ago

Issue Description:

Just updated ender io 1.10.2-3.0.1.124_beta & endercore 1.10.2-0.4.1.58-beta to the most up to date version on curseforge & now in fresh world i can not make Conductive Iron.

What happens:

one iron ingot + 1 redstone dust but my alloy smelter no mater the power level will not produce the alloy.

What you expected to happen:

the alloy smelter to make Conductive Iron when one follows the recipe.

Steps to reproduce:

1.updated both ender io & endercore

  1. try to make Conductive Iron in suvival
  2. fail miserably like i did... ...

Affected Versions (Do not use "latest"):

Your most recent log file where the issue was present:

[pastebin/gist/etc link here] there was no crash so my client does save any logs.

Kazzamkablam commented 7 years ago

Same thing happens when trying to craft vibrant alloy.

HenryLoenwind commented 7 years ago

And probably all recipes with multiple inputs in all Ender IO machines.

I know which change must have broken this, but even looking over it again I don't see why. I'll have to trace this out in the debugger---earliest tomorrow evening.

HenryLoenwind commented 7 years ago

Could you please test if build 125 fixes the problem or makes it worse? I have no way of running the game at the moment.

utoc commented 7 years ago

Tested; Working but not working.

My pack contains refined iron which is simply smelted iron. The first time you add Redstone + Iron (being careful to add the redstone first so it doesnt autosmelt iron) it will make a refined iron ingot. Once you remove the refined iron ingot, it makes all conductive iron after that.

Putting the smelter into alloy mode will prevent this behavior as a workaround - Seen here: http://i.imgur.com/KSkBw1z.png

HenryLoenwind commented 7 years ago

Are you sure that behavior was introduced with 124? All the new code does is to skip recipes from consideration if there's some input in the machine that is not in the recipe. (125 changed it so empty slots would not be considered "wrong".)

Kazzamkablam commented 7 years ago

Actually when I tested it, this seemed to only happen with conductive iron and vibrant alloy recipes, which was weird.

Works properly on my pack with new version.

utoc commented 7 years ago

@HenryLoenwind No, I'm not sure if the behavior with smelting refined iron before making conductive iron is new or not

HenryLoenwind commented 7 years ago

@Kazzamkablam Recipes that filled all input slots were working with 124. It was the empty slots that made the recipes reject their inputs.

@utoc Ok, I'll test this out tomorrow. At least it'll be easy to reproduce the setup ;)

HenryLoenwind commented 7 years ago

@utoc I've not been able to reproduce this with a vanilla smelting recipe. The only way I see this may happen would be an invalid alloy recipe. Could you have a look in you pack's Ender IO and ModTweaker config for this refined iron recipe?

utoc commented 7 years ago

@HenryLoenwind I understand whats going on now and this is probably not a bug. I always assumed that the slots in order were 1, 2 and 3. It looks like the slots are 2, 1 and 3. Whatever goes in the middle slot of the alloy furnace, in All Smelting mode, is going to get first choice at smelting. So in my case in testing I put the redstone in the left slot and iron in the middle slot. Of course, it made refined iron the first time.

Placing iron in left, redstone in right makes it work first time every time.

I don't have a MT script for refined iron; that comes from TechReborn but the recipe appears as such in JEI: http://i.imgur.com/a5cN1Z0.png

The only special recipe I have added is for RefinedStorage's Quartz Enriched iron which looks like the following:

    <recipe name="Quartz Iron" energyCost="7500" >
      <input>
        <itemStack oreDictionary="ingotIron" number="2" />
        <itemStack oreDictionary="gemQuartz" />
      </input>
      <output>
        <itemStack modID="refinedstorage" itemName="quartz_enriched_iron" itemMeta="0" exp="0.5" />
      </output>
    </recipe>

It exhibits the same behavior though; If you place both ingredients in there by quick shift-clicking, it's going to make the alloy of the item in the middle be it quartz glass or refined iron. Like I said, this is probably intended hevaior and I have the slots figured wrong.

HenryLoenwind commented 7 years ago

That Refined Iron recipes is a alloy smelter recipe, not a furnace recipe. They look a little bit different in JEI.

Those slots should not matter. A recipe only matches if all slots together match it. There should never be a partial match. However, Ender IO does not ship with recipes that are a partial match of each other---but that Refined Iron recipe is is a partial match for other recipes.

And that is where the fun begins. We have 2 different code paths: One to determine if an item should be allowed into a slot (that is: would the result be part of a recipe), the other to find the matching recipe for the input slots to execute it. For the first one it obviously is ok to accept a partial match, but the second one should only accept a full match. It seems to me it also accepts an over-match, ignoring the extra items. Not a problem with our default recipes---no additional item would form a valid recipe, so additional items are not allowed to be put in in the first place, but with partial match recipes...

I'll have to look into this further to not break anything by fixing this.

HenryLoenwind commented 7 years ago

Aaaand...that's not it. :-(

Still cannot reproduce it. So it's not a general problem. I'll need to setup an environment with those mods to debug this.

utoc commented 7 years ago

http://bbqsauce.terron.com/eio/testpack.zip which I paired with FML 2116

Contains TechReborn, EnderIO and JEI. I'll let you be the judge of it but in All Smelting (Alloy and Furnace) it exhibits the behavior I described earlier. No special configs, everything default

HenryLoenwind commented 7 years ago

First test: Normal Ender IO development environment + TechReborn from your zip: Cannot reproduce the issue

I'll have to test this with (a) the configs from your zip and (b) the newer Forge tomorrow. Nearly 1am here...