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

[1.12.2] Arc Furnace recipes do not consume multiple items from the input slot #3442

Closed
sam-kirby opened this issue Apr 12, 2019 · 2 comments

Comments

@sam-kirby
Copy link

sam-kirby commented Apr 12, 2019

Description of the issue:

Taking a contrived example - double the recipe for constantan - 2 copper ingots, 2 nickel grit produces 4 constantan ingots

import mods.immersiveengineering.ArcFurnace;
ArcFurnace.removeRecipe(<immersiveengineering:metal:6>);
ArcFurnace.addRecipe(<immersiveengineering:metal:6> * 4, <immersiveengineering:metal> * 2, <ore:itemSlag>.firstItem, 200, 512, [<immersiveengineering:metal:13> * 2]);

Screenshot 2019-04-12 at 11 04 24

In this case, the arc furnace will consume only 1 copper ingot. It correctly consumes 2 nickel grit and produces 4 constantan ingots. It will not begin running however if you only insert one copper ingot, and will stop when only one remains.

recording

A real world example that involves other mods would be a recipe for bronze - 3 copper ingots + 1 tin grit produces 4 bronze ingots.

Recipes that consume more than one of an input stack but have no additives are also affected.

Versions & Modlist

Reproduced in minimal environment
Forge - 14.23.5.2815
IE - 0.12-89
CraftTweaker - 4.1.17

Possible Fix (tested - working)

It appears when additives are present, IE forces the process to only consume 1 of the input stack regardless of what is specified by the recipe.

After further testing and feedback from md5i, I discovered this line is also executed when no additives are present. It's not immediately clear if this is intentional as I am unaware of the intended circumstances in which ArcFurnaceRecipe#getConsumedAdditives returns null.

Good news is the proposed change below resolves both cases though.

Index: src/main/java/blusunrize/immersiveengineering/common/blocks/metal/TileEntityArcFurnace.java
===================================================================
--- src/main/java/blusunrize/immersiveengineering/common/blocks/metal/TileEntityArcFurnace.java	(revision 10e24d1bfddebfb1fe5065a162d801a0625b39ec)
+++ src/main/java/blusunrize/immersiveengineering/common/blocks/metal/TileEntityArcFurnace.java	(date 1555061399000)
@@ -146,7 +146,7 @@
 									this.addProcessToQueue(process, false);
 									int[] consumedAdditives = recipe.getConsumedAdditives(additives, true);
 									if(consumedAdditives!=null)
-										process.setInputAmounts(1, consumedAdditives[0], consumedAdditives[1], consumedAdditives[2], consumedAdditives[3]);
+										process.setInputAmounts(recipe.input.inputSize, consumedAdditives[0], consumedAdditives[1], consumedAdditives[2], consumedAdditives[3]);
 									//							update = true;
 								}
 							}
@sam-kirby sam-kirby changed the title [1.12.2] Arc Furnace recipes do not consume multiple inputs when additives are used [1.12.2] Arc Furnace recipes do not consume multiple items from the input slot Apr 12, 2019
@IcedReaper
Copy link

I have the same problem, tried your suggestion and it worked, for me, like a charm.

@BluSunrize
Copy link
Owner

Fixed for future releases

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

3 participants