Fixed Solderer resetting progress when the inventory changes, fixes #1453

This commit is contained in:
raoulvdberge
2017-09-08 14:08:23 +02:00
parent 32e22acd7a
commit 17d4669439
2 changed files with 3 additions and 2 deletions

View File

@@ -46,8 +46,7 @@ public class NetworkNodeSolderer extends NetworkNode {
protected void onContentsChanged(int slot) {
super.onContentsChanged(slot);
recipe = API.instance().getSoldererRegistry().getRecipe(this);
progress = 0;
recipe = API.instance().getSoldererRegistry().getRecipe(ingredients);
}
};
@@ -95,6 +94,7 @@ public class NetworkNodeSolderer extends NetworkNode {
if (working) {
if (recipe == null) {
working = false;
progress = 0;
markDirty();
} else if ((result.getStackInSlot(0).isEmpty() || API.instance().getComparer().isEqualNoQuantity(recipe.getResult(), result.getStackInSlot(0))) && result.getStackInSlot(0).getCount() + recipe.getResult().getCount() <= result.getStackInSlot(0).getMaxStackSize()) {