mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-23 21:39:40 +00:00
Even more inventory changes
This commit is contained in:
1 parent
01ab160ff9
commit
afd3525a4b
52 files changed
+498
-537
No files matched your search
@@ -56,7 +56,7 @@ public class ContainerUpgradeManagement extends Container
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotID)
|
||||
{
|
||||
ItemStack stack = null;
|
||||
ItemStack stack = ItemStack.EMPTY;
|
||||
Slot currentSlot = (Slot)inventorySlots.get(slotID);
|
||||
|
||||
if(currentSlot != null && currentSlot.getHasStack())
|
||||
@@ -70,13 +70,13 @@ public class ContainerUpgradeManagement extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,27 +85,27 @@ public class ContainerUpgradeManagement extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 28, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 27)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 27, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -113,7 +113,7 @@ public class ContainerUpgradeManagement extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
Reference in new issue
Block a user