mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Add additional checks to the farmers inventory adding method
Hopefully closes #521
This commit is contained in:
parent
37f70cde33
commit
ca2468fda6
1 changed files with 11 additions and 6 deletions
|
@ -235,20 +235,25 @@ public final class WorldUtil{
|
||||||
|
|
||||||
int working = 0;
|
int working = 0;
|
||||||
for(ItemStack stack : stacks){
|
for(ItemStack stack : stacks){
|
||||||
for(int i = start; i < end; i++){
|
if(StackUtil.isValid(stack)){
|
||||||
stack = inventory.insertItemInternal(i, stack, false);
|
for(int i = start; i < end; i++){
|
||||||
|
stack = inventory.insertItemInternal(i, stack, false);
|
||||||
|
|
||||||
if(!StackUtil.isValid(stack)){
|
if(!StackUtil.isValid(stack)){
|
||||||
working++;
|
working++;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
working++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Load the slots again
|
//Load the slots again
|
||||||
if(!actuallyDo){
|
if(!actuallyDo){
|
||||||
for(int i = 0; i < backupSlots.length; i++){
|
for(int i = 0; i < backupSlots.length; i++){
|
||||||
inventory.setStackInSlot(i, backupSlots[i]);
|
inventory.setStackInSlot(i, StackUtil.validateCheck(backupSlots[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue