mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 05:44:27 +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
@@ -60,7 +60,7 @@ public class ContainerElectricMachine 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())
|
||||
@@ -72,7 +72,7 @@ public class ContainerElectricMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(RecipeHandler.getRecipe(new ItemStackInput(slotStack), tileEntity.getRecipes()) != null)
|
||||
@@ -81,13 +81,13 @@ public class ContainerElectricMachine 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,14 +97,14 @@ public class ContainerElectricMachine 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,27 +113,27 @@ public class ContainerElectricMachine 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();
|
||||
@@ -141,7 +141,7 @@ public class ContainerElectricMachine extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
Reference in new issue
Block a user