Shift-click items to top (fill) slot

This commit is contained in:
Christian Ehrhardt 2015-02-12 19:18:16 -06:00
parent 7e08643ebd
commit db4adce2a8

View file

@ -68,26 +68,16 @@ public class ContainerGasTank extends Container
if(slotStack.getItem() instanceof IGasItem) if(slotStack.getItem() instanceof IGasItem)
{ {
if(slotID != 0 && slotID != 1) if(slotID != 0 && slotID != 1)
{
if(!mergeItemStack(slotStack, 1, 2, false))
{
if(!mergeItemStack(slotStack, 0, 1, false))
{
return null;
}
}
}
else if(slotID == 1)
{ {
if(!mergeItemStack(slotStack, 0, 1, false)) if(!mergeItemStack(slotStack, 0, 1, false))
{ {
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), false)) if(!mergeItemStack(slotStack, 1, 2, false))
{ {
return null; return null;
} }
} }
} }
else if(slotID == 0) else
{ {
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true)) if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
{ {