Fix ArrayIndexOutOfBoundsException in satisfiedInsertion

This should fix a crash that occurs if a crafting pattern produces more outputs than it consumes inputs.
Should also fix a possible deadlock with isDone returning false.
This will NOT fix the crash if the bug has already written wrong-length arrays to NBT data, that would need a separate workaround.
This commit is contained in:
Michael Sparmann
2016-09-04 19:30:39 +02:00
committed by GitHub
parent 647b5ea163
commit 412d218e2d

View File

@@ -23,7 +23,7 @@ public class CraftingTaskProcessing extends CraftingTask {
super(pattern); super(pattern);
this.satisfied = new boolean[pattern.getInputs().size()]; this.satisfied = new boolean[pattern.getInputs().size()];
this.satisfiedInsertion = new boolean[pattern.getInputs().size()]; this.satisfiedInsertion = new boolean[pattern.getOutputs().size()];
this.checked = new boolean[pattern.getInputs().size()]; this.checked = new boolean[pattern.getInputs().size()];
} }