mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 23:03:01 +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
@@ -59,7 +59,7 @@ public class ContainerPRC 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())
|
||||
@@ -71,7 +71,7 @@ public class ContainerPRC extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(ChargeUtils.canBeDischarged(slotStack))
|
||||
@@ -80,14 +80,14 @@ public class ContainerPRC extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 1)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,13 +97,13 @@ public class ContainerPRC extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,27 +112,27 @@ public class ContainerPRC extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 30, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 29)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 29, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -140,7 +140,7 @@ public class ContainerPRC extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
Reference in new issue
Block a user