Merge pull request #742 from Need4Speed402/patch-1
TranslatorSimple changed to support compatibility.
This commit is contained in:
commit
1eb2bd12a7
1 changed files with 10 additions and 4 deletions
|
@ -19,14 +19,20 @@ public class TransactorSimple extends Transactor {
|
||||||
|
|
||||||
int slotIndex = 0;
|
int slotIndex = 0;
|
||||||
int slot = 0;
|
int slot = 0;
|
||||||
while ((slot = getPartialSlot(stack, orientation, slotIndex++)) >= 0 && injected < stack.stackSize) {
|
while (slotIndex < inventory.getSizeInventory() && injected < stack.stackSize) {
|
||||||
|
slot = getPartialSlot(stack, orientation, slotIndex++);
|
||||||
|
if (slot != -1){
|
||||||
injected += addToSlot(slot, stack, injected, doAdd);
|
injected += addToSlot(slot, stack, injected, doAdd);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
slotIndex = 0;
|
slotIndex = 0;
|
||||||
while ((slot = getEmptySlot(stack, orientation, slotIndex++)) >= 0 && injected < stack.stackSize) {
|
while (slotIndex < inventory.getSizeInventory() && injected < stack.stackSize) {
|
||||||
|
slot = getEmptySlot(stack, orientation, slotIndex++);
|
||||||
|
if (slot != -1){
|
||||||
injected += addToSlot(slot, stack, injected, doAdd);
|
injected += addToSlot(slot, stack, injected, doAdd);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
inventory.onInventoryChanged();
|
inventory.onInventoryChanged();
|
||||||
return injected;
|
return injected;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue