Fix StackSearcher using variable side before initializing it. Fixes #2844

This commit is contained in:
Yip Rui Fung 2015-07-26 15:24:59 +08:00
parent 94be300959
commit 9cb67fa054

View file

@ -18,6 +18,7 @@ public class StackSearcher
public StackSearcher(IInventory inventory, ForgeDirection direction)
{
theInventory = InventoryUtils.checkChestInv(inventory);
side = direction;
if(!(theInventory instanceof ISidedInventory))
{
i = inventory.getSizeInventory();
@ -30,7 +31,6 @@ public class StackSearcher
i = slots.length;
}
}
side = direction;
}
public InvStack takeTopStack(Finder id)