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
+11 -8
View File
@@ -1,21 +1,24 @@
package appeng.util.inv;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
public class AdaptorPlayerInventory implements IInventory
{
private InventoryPlayer src;
private int min;
private int size;
private final IInventory src;
private final int min=0;
private final int size=36;
public AdaptorPlayerInventory(InventoryPlayer a) {
src = a;
min = 0; // a.getStartInventorySide( d );
size = 36; // a.getSizeInventorySide( d );
public AdaptorPlayerInventory(IInventory playerInv, boolean swap)
{
if ( swap )
src = new WrapperChainedInventory( new WrapperInventoryRange( playerInv, 9, size-9, false ), new WrapperInventoryRange( playerInv, 0, 9, false ) );
else
src = playerInv;
}
@Override