Mimic Vanilla behavior with shift clicking.

This commit is contained in:
AlgorithmX2
2014-08-28 11:32:53 -05:00
parent 4f9daaad08
commit 804164b3bf
7 changed files with 25 additions and 24 deletions
+5 -4
View File
@@ -4,6 +4,8 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.google.common.collect.ImmutableList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@@ -24,7 +26,7 @@ public class WrapperChainedInventory implements IInventory
private List<IInventory> l;
private HashMap<Integer, InvOffset> offsets;
public WrapperChainedInventory(IInventory ilist) {
public WrapperChainedInventory(IInventory... ilist) {
setInventory( ilist );
}
@@ -67,10 +69,9 @@ public class WrapperChainedInventory implements IInventory
fullSize = offset;
}
public void setInventory(IInventory a)
public void setInventory(IInventory... a)
{
l = new ArrayList();
l.add( a );
l = ImmutableList.copyOf( a );
calculateSizes();
}