mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +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
@@ -32,6 +32,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ItemStackHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -44,6 +45,7 @@ import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
@@ -60,7 +62,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
public Coord4D homeLocation;
|
||||
|
||||
public ItemStack[] inventory = new ItemStack[31];
|
||||
public NonNullList<ItemStack> inventory = NonNullList.withSize(31, ItemStack.EMPTY);
|
||||
|
||||
public int furnaceBurnTime = 0;
|
||||
public int currentItemBurnTime = 0;
|
||||
@@ -178,41 +180,36 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
goHome();
|
||||
}
|
||||
|
||||
if(inventory[27] != null && getEnergy() < MAX_ELECTRICITY)
|
||||
if(!inventory.get(27).isEmpty() && getEnergy() < MAX_ELECTRICITY)
|
||||
{
|
||||
if(inventory[27].getItem() instanceof IEnergizedItem)
|
||||
if(inventory.get(27).getItem() instanceof IEnergizedItem)
|
||||
{
|
||||
setEnergy(getEnergy() + EnergizedItemManager.discharge(inventory[27], MAX_ELECTRICITY - getEnergy()));
|
||||
setEnergy(getEnergy() + EnergizedItemManager.discharge(inventory.get(27), MAX_ELECTRICITY - getEnergy()));
|
||||
}
|
||||
else if(MekanismUtils.useIC2() && inventory[27].getItem() instanceof IElectricItem)
|
||||
else if(MekanismUtils.useIC2() && inventory.get(27).getItem() instanceof IElectricItem)
|
||||
{
|
||||
IElectricItem item = (IElectricItem)inventory[27].getItem();
|
||||
IElectricItem item = (IElectricItem)inventory.get(27).getItem();
|
||||
|
||||
if(item.canProvideEnergy(inventory[27]))
|
||||
if(item.canProvideEnergy(inventory.get(27)))
|
||||
{
|
||||
double gain = ElectricItem.manager.discharge(inventory[27], (MAX_ELECTRICITY - getEnergy())* general.TO_IC2, 4, true, true, false)*general.FROM_IC2;
|
||||
double gain = ElectricItem.manager.discharge(inventory.get(27), (MAX_ELECTRICITY - getEnergy())* general.TO_IC2, 4, true, true, false)*general.FROM_IC2;
|
||||
setEnergy(getEnergy() + gain);
|
||||
}
|
||||
}
|
||||
else if(MekanismUtils.useRF() && inventory[27].getItem() instanceof IEnergyContainerItem)
|
||||
else if(MekanismUtils.useRF() && inventory.get(27).getItem() instanceof IEnergyContainerItem)
|
||||
{
|
||||
ItemStack itemStack = inventory[27];
|
||||
IEnergyContainerItem item = (IEnergyContainerItem)inventory[27].getItem();
|
||||
ItemStack itemStack = inventory.get(27);
|
||||
IEnergyContainerItem item = (IEnergyContainerItem)inventory.get(27).getItem();
|
||||
|
||||
int itemEnergy = (int)Math.round(Math.min(Math.sqrt(item.getMaxEnergyStored(itemStack)), item.getEnergyStored(itemStack)));
|
||||
int toTransfer = (int)Math.round(Math.min(itemEnergy, ((MAX_ELECTRICITY - getEnergy())*general.TO_RF)));
|
||||
|
||||
setEnergy(getEnergy() + (item.extractEnergy(itemStack, toTransfer, false)* general.FROM_RF));
|
||||
}
|
||||
else if(inventory[27].getItem() == Items.REDSTONE && getEnergy()+ general.ENERGY_PER_REDSTONE <= MAX_ELECTRICITY)
|
||||
else if(inventory.get(27).getItem() == Items.REDSTONE && getEnergy()+ general.ENERGY_PER_REDSTONE <= MAX_ELECTRICITY)
|
||||
{
|
||||
setEnergy(getEnergy() + general.ENERGY_PER_REDSTONE);
|
||||
inventory[27].shrink(1);
|
||||
|
||||
if(inventory[27].getCount() <= 0)
|
||||
{
|
||||
inventory[27] = null;
|
||||
}
|
||||
inventory.get(27).shrink(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,17 +222,17 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
{
|
||||
if(furnaceBurnTime == 0 && canSmelt())
|
||||
{
|
||||
currentItemBurnTime = furnaceBurnTime = TileEntityFurnace.getItemBurnTime(inventory[29]);
|
||||
currentItemBurnTime = furnaceBurnTime = TileEntityFurnace.getItemBurnTime(inventory.get(29));
|
||||
|
||||
if(furnaceBurnTime > 0)
|
||||
{
|
||||
if(inventory[29] != null)
|
||||
if(!inventory.get(29).isEmpty())
|
||||
{
|
||||
inventory[29].shrink(1);
|
||||
inventory.get(29).shrink(1);
|
||||
|
||||
if(inventory[29].getCount() == 0)
|
||||
if(inventory.get(29).getCount() == 0)
|
||||
{
|
||||
inventory[29] = inventory[29].getItem().getContainerItem(inventory[29]);
|
||||
inventory.set(29, inventory.get(29).getItem().getContainerItem(inventory.get(29)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -273,11 +270,11 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
for(int i = 0; i < 27; i++)
|
||||
{
|
||||
ItemStack itemStack = inventory[i];
|
||||
ItemStack itemStack = inventory.get(i);
|
||||
|
||||
if(itemStack == null)
|
||||
if(itemStack.isEmpty())
|
||||
{
|
||||
inventory[i] = item.getEntityItem();
|
||||
inventory.set(i, item.getEntityItem());
|
||||
onItemPickup(item, item.getEntityItem().getCount());
|
||||
item.setDead();
|
||||
|
||||
@@ -327,16 +324,16 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
private boolean canSmelt()
|
||||
{
|
||||
if(inventory[28] == null)
|
||||
if(inventory.get(28).isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(inventory[28]);
|
||||
if(itemstack == null) return false;
|
||||
if(inventory[30] == null) return true;
|
||||
if(!inventory[30].isItemEqual(itemstack)) return false;
|
||||
int result = inventory[30].getCount() + itemstack.getCount();
|
||||
ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(inventory.get(28));
|
||||
if(itemstack.isEmpty()) return false;
|
||||
if(inventory.get(30).isEmpty()) return true;
|
||||
if(!inventory.get(30).isItemEqual(itemstack)) return false;
|
||||
int result = inventory.get(30).getCount() + itemstack.getCount();
|
||||
return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize());
|
||||
}
|
||||
}
|
||||
@@ -345,23 +342,18 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
{
|
||||
if(canSmelt())
|
||||
{
|
||||
ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(inventory[28]);
|
||||
ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(inventory.get(28));
|
||||
|
||||
if(inventory[30] == null)
|
||||
if(inventory.get(30).isEmpty())
|
||||
{
|
||||
inventory[30] = itemstack.copy();
|
||||
inventory.set(30, itemstack.copy());
|
||||
}
|
||||
else if(inventory[30].isItemEqual(itemstack))
|
||||
else if(inventory.get(30).isItemEqual(itemstack))
|
||||
{
|
||||
inventory[30].grow(itemstack.getCount());
|
||||
inventory.get(30).grow(itemstack.getCount());
|
||||
}
|
||||
|
||||
inventory[28].shrink(1);
|
||||
|
||||
if(inventory[28].getCount() <= 0)
|
||||
{
|
||||
inventory[28] = null;
|
||||
}
|
||||
inventory.get(28).shrink(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,7 +376,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
if(entityplayer.isSneaking())
|
||||
{
|
||||
if(stack != null && stack.getItem() instanceof ItemConfigurator)
|
||||
if(!stack.isEmpty() && stack.getItem() instanceof ItemConfigurator)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
{
|
||||
@@ -447,13 +439,13 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
|
||||
for(int slotCount = 0; slotCount < inventory.length; slotCount++)
|
||||
for(int slotCount = 0; slotCount < inventory.size(); slotCount++)
|
||||
{
|
||||
if(inventory[slotCount] != null)
|
||||
if(!inventory.get(slotCount).isEmpty())
|
||||
{
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
tagCompound.setByte("Slot", (byte)slotCount);
|
||||
inventory[slotCount].writeToNBT(tagCompound);
|
||||
inventory.get(slotCount).writeToNBT(tagCompound);
|
||||
tagList.appendTag(tagCompound);
|
||||
}
|
||||
}
|
||||
@@ -482,16 +474,16 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
homeLocation = Coord4D.read(nbtTags);
|
||||
|
||||
NBTTagList tagList = nbtTags.getTagList("Items", Constants.NBT.TAG_COMPOUND);
|
||||
inventory = new ItemStack[getSizeInventory()];
|
||||
inventory = NonNullList.withSize(getSizeInventory(), ItemStack.EMPTY);
|
||||
|
||||
for(int tagCount = 0; tagCount < tagList.tagCount(); tagCount++)
|
||||
{
|
||||
NBTTagCompound tagCompound = tagList.getCompoundTagAt(tagCount);
|
||||
byte slotID = tagCompound.getByte("Slot");
|
||||
|
||||
if(slotID >= 0 && slotID < inventory.length)
|
||||
if(slotID >= 0 && slotID < inventory.size())
|
||||
{
|
||||
inventory[slotID] = InventoryUtils.loadFromNBT(tagCompound);
|
||||
inventory.set(slotID, InventoryUtils.loadFromNBT(tagCompound));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -576,64 +568,33 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return inventory.length;
|
||||
return inventory.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int slotID)
|
||||
{
|
||||
return inventory[slotID];
|
||||
return inventory.get(slotID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int slotID, int amount)
|
||||
{
|
||||
if(getStackInSlot(slotID) != null)
|
||||
{
|
||||
ItemStack tempStack;
|
||||
|
||||
if(getStackInSlot(slotID).getCount() <= amount)
|
||||
{
|
||||
tempStack = getStackInSlot(slotID);
|
||||
setInventorySlotContents(slotID, null);
|
||||
return tempStack;
|
||||
}
|
||||
else {
|
||||
tempStack = getStackInSlot(slotID).splitStack(amount);
|
||||
|
||||
if(getStackInSlot(slotID).getCount() == 0)
|
||||
{
|
||||
setInventorySlotContents(slotID, null);
|
||||
}
|
||||
|
||||
return tempStack;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
return ItemStackHelper.getAndSplit(inventory, slotID, amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeStackFromSlot(int slotID)
|
||||
{
|
||||
if(getStackInSlot(slotID) != null)
|
||||
{
|
||||
ItemStack tempStack = getStackInSlot(slotID);
|
||||
setInventorySlotContents(slotID, null);
|
||||
return tempStack;
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
return ItemStackHelper.getAndRemove(inventory, slotID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slotID, ItemStack itemstack)
|
||||
{
|
||||
inventory[slotID] = itemstack;
|
||||
inventory.set(slotID, itemstack);
|
||||
|
||||
if(itemstack != null && itemstack.getCount() > getInventoryStackLimit())
|
||||
if(!itemstack.isEmpty() && itemstack.getCount() > getInventoryStackLimit())
|
||||
{
|
||||
itemstack.setCount(getInventoryStackLimit());
|
||||
}
|
||||
@@ -692,16 +653,16 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
return;
|
||||
}
|
||||
|
||||
inventory = new ItemStack[getSizeInventory()];
|
||||
inventory = NonNullList.withSize(getSizeInventory(), ItemStack.EMPTY);
|
||||
|
||||
for(int slots = 0; slots < nbtTags.tagCount(); slots++)
|
||||
{
|
||||
NBTTagCompound tagCompound = (NBTTagCompound)nbtTags.getCompoundTagAt(slots);
|
||||
byte slotID = tagCompound.getByte("Slot");
|
||||
|
||||
if(slotID >= 0 && slotID < inventory.length)
|
||||
if(slotID >= 0 && slotID < inventory.size())
|
||||
{
|
||||
inventory[slotID] = InventoryUtils.loadFromNBT(tagCompound);
|
||||
inventory.set(slotID, InventoryUtils.loadFromNBT(tagCompound));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -711,13 +672,13 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
{
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
|
||||
for(int slots = 0; slots < inventory.length; slots++)
|
||||
for(int slots = 0; slots < inventory.size(); slots++)
|
||||
{
|
||||
if(inventory[slots] != null)
|
||||
if(!inventory.get(slots).isEmpty())
|
||||
{
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
tagCompound.setByte("Slot", (byte)slots);
|
||||
inventory[slots].writeToNBT(tagCompound);
|
||||
inventory.get(slots).writeToNBT(tagCompound);
|
||||
tagList.appendTag(tagCompound);
|
||||
}
|
||||
}
|
||||
@@ -730,7 +691,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
{
|
||||
for(ItemStack stack : inventory)
|
||||
{
|
||||
if(stack != null)
|
||||
if(!stack.isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class InventoryBin
|
||||
|
||||
public ItemStack getStack()
|
||||
{
|
||||
if(getItemCount() > 0 && getItemType() != null)
|
||||
if(getItemCount() > 0 && !getItemType().isEmpty())
|
||||
{
|
||||
ItemStack ret = getItemType().copy();
|
||||
ret.setCount(Math.min(getItemType().getMaxStackSize(), getItemCount()));
|
||||
@@ -28,16 +28,16 @@ public class InventoryBin
|
||||
return ret;
|
||||
}
|
||||
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
public ItemStack removeStack()
|
||||
{
|
||||
ItemStack stack = getStack();
|
||||
|
||||
if(stack == null)
|
||||
if(stack.isEmpty())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
if(getTier() != BinTier.CREATIVE)
|
||||
@@ -52,7 +52,7 @@ public class InventoryBin
|
||||
{
|
||||
if(isValid(stack) && (getTier() == BinTier.CREATIVE || getItemCount() != getMaxStorage()))
|
||||
{
|
||||
if(getItemType() == null)
|
||||
if(getItemType().isEmpty())
|
||||
{
|
||||
setItemType(stack);
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class InventoryBin
|
||||
if(getItemCount() + stack.getCount() <= getMaxStorage())
|
||||
{
|
||||
setItemCount(getItemCount() + stack.getCount());
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
else {
|
||||
ItemStack rejects = getItemType().copy();
|
||||
@@ -83,7 +83,7 @@ public class InventoryBin
|
||||
|
||||
public boolean isValid(ItemStack stack)
|
||||
{
|
||||
if(stack == null || stack.getCount() <= 0)
|
||||
if(stack.isEmpty() || stack.getCount() <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public class InventoryBin
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getItemType() == null)
|
||||
if(getItemType().isEmpty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public class InventoryBin
|
||||
|
||||
if(getItemCount() == 0)
|
||||
{
|
||||
setItemType(null);
|
||||
setItemType(ItemStack.EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ public class InventoryBin
|
||||
{
|
||||
if(getItemCount() == 0)
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
return InventoryUtils.loadFromNBT(ItemDataUtils.getCompound(bin, "storedItem"));
|
||||
@@ -143,7 +143,7 @@ public class InventoryBin
|
||||
|
||||
public void setItemType(ItemStack stack)
|
||||
{
|
||||
if(stack == null)
|
||||
if(stack.isEmpty())
|
||||
{
|
||||
ItemDataUtils.removeData(bin, "storedItem");
|
||||
return;
|
||||
|
||||
@@ -64,7 +64,7 @@ public class InventoryPersonalChest extends InventoryBasic
|
||||
|
||||
for(int slotCount = 0; slotCount < getSizeInventory(); slotCount++)
|
||||
{
|
||||
if(getStackInSlot(slotCount) != null)
|
||||
if(!getStackInSlot(slotCount).isEmpty())
|
||||
{
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
tagCompound.setByte("Slot", (byte)slotCount);
|
||||
@@ -73,7 +73,7 @@ public class InventoryPersonalChest extends InventoryBasic
|
||||
}
|
||||
}
|
||||
|
||||
if(getStack() != null)
|
||||
if(!getStack().isEmpty())
|
||||
{
|
||||
((ISustainedInventory)getStack().getItem()).setInventory(tagList, getStack());
|
||||
}
|
||||
@@ -109,6 +109,6 @@ public class InventoryPersonalChest extends InventoryBasic
|
||||
|
||||
public ItemStack getStack()
|
||||
{
|
||||
return itemStack != null ? itemStack : entityPlayer.getHeldItem(currentHand);
|
||||
return !itemStack.isEmpty() ? itemStack : entityPlayer.getHeldItem(currentHand);
|
||||
}
|
||||
}
|
||||
+13
-13
@@ -62,7 +62,7 @@ public class ContainerAdvancedElectricMachine 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())
|
||||
@@ -74,7 +74,7 @@ public class ContainerAdvancedElectricMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(ChargeUtils.canBeDischarged(slotStack))
|
||||
@@ -83,13 +83,13 @@ public class ContainerAdvancedElectricMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 4, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,13 +99,13 @@ public class ContainerAdvancedElectricMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,13 +115,13 @@ public class ContainerAdvancedElectricMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,27 +130,27 @@ public class ContainerAdvancedElectricMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 31, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 30)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 30, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -158,7 +158,7 @@ public class ContainerAdvancedElectricMachine extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ContainerChanceMachine 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())
|
||||
@@ -73,7 +73,7 @@ public class ContainerChanceMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(ChargeUtils.canBeDischarged(slotStack))
|
||||
@@ -82,14 +82,14 @@ public class ContainerChanceMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 1)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,13 +99,13 @@ public class ContainerChanceMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,27 +114,27 @@ public class ContainerChanceMachine extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 31, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 30)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 30, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -142,7 +142,7 @@ public class ContainerChanceMachine extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+11
-11
@@ -60,7 +60,7 @@ public class ContainerChemicalCrystallizer 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())
|
||||
@@ -74,13 +74,13 @@ public class ContainerChemicalCrystallizer 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class ContainerChemicalCrystallizer extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(ChargeUtils.canBeDischarged(slotStack))
|
||||
@@ -97,14 +97,14 @@ public class ContainerChemicalCrystallizer extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 2)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,27 +113,27 @@ public class ContainerChemicalCrystallizer 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 ContainerChemicalCrystallizer extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+12
-12
@@ -62,7 +62,7 @@ public class ContainerChemicalDissolutionChamber 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())
|
||||
@@ -76,13 +76,13 @@ public class ContainerChemicalDissolutionChamber extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,14 +92,14 @@ public class ContainerChemicalDissolutionChamber extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 4, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 3)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,14 +111,14 @@ public class ContainerChemicalDissolutionChamber extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,27 +127,27 @@ public class ContainerChemicalDissolutionChamber extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 31, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 30)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 30, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -155,7 +155,7 @@ public class ContainerChemicalDissolutionChamber extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ContainerChemicalInfuser 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())
|
||||
@@ -74,14 +74,14 @@ public class ContainerChemicalInfuser extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 4, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 3)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,13 +91,13 @@ public class ContainerChemicalInfuser extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 5, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,27 +106,27 @@ public class ContainerChemicalInfuser extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 31, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 30)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 30, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -134,7 +134,7 @@ public class ContainerChemicalInfuser extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ContainerChemicalOxidizer 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())
|
||||
@@ -75,14 +75,14 @@ public class ContainerChemicalOxidizer extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,14 +92,14 @@ public class ContainerChemicalOxidizer 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,13 +109,13 @@ public class ContainerChemicalOxidizer extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,27 +124,27 @@ public class ContainerChemicalOxidizer 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();
|
||||
@@ -152,7 +152,7 @@ public class ContainerChemicalOxidizer extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ContainerChemicalWasher 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())
|
||||
@@ -75,7 +75,7 @@ public class ContainerChemicalWasher extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(FluidUtil.getFluidContained(slotStack) != null && FluidUtil.getFluidContained(slotStack).getFluid() == FluidRegistry.WATER)
|
||||
@@ -84,13 +84,13 @@ public class ContainerChemicalWasher extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,13 +100,13 @@ public class ContainerChemicalWasher extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,14 +116,14 @@ public class ContainerChemicalWasher extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 4, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 3)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,27 +132,27 @@ public class ContainerChemicalWasher extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 31, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 31)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 30, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -160,7 +160,7 @@ public class ContainerChemicalWasher extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ContainerDictionary 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())
|
||||
@@ -47,26 +47,26 @@ public class ContainerDictionary extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 27, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 26)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 26, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 0, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -74,7 +74,7 @@ public class ContainerDictionary extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class ContainerDigitalMiner 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())
|
||||
@@ -78,14 +78,14 @@ public class ContainerDigitalMiner extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 27, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID <= 27)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 28, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,18 +94,18 @@ public class ContainerDigitalMiner extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 28, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(!mergeItemStack(slotStack, 0, 27, false))
|
||||
{
|
||||
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 ContainerDigitalMiner extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ContainerDynamicTank 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 ContainerDynamicTank extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,27 +85,27 @@ public class ContainerDynamicTank extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, 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 ContainerDynamicTank extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ContainerElectricPump 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())
|
||||
@@ -133,7 +133,7 @@ public class ContainerElectricPump extends Container
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
|
||||
+12
-12
@@ -62,7 +62,7 @@ public class ContainerElectrolyticSeparator 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())
|
||||
@@ -76,7 +76,7 @@ public class ContainerElectrolyticSeparator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotStack.getItem() instanceof IGasItem)
|
||||
@@ -87,14 +87,14 @@ public class ContainerElectrolyticSeparator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(((IGasItem)slotStack.getItem()).getGas(slotStack).getGas() == GasRegistry.getGas("oxygen"))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class ContainerElectrolyticSeparator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ public class ContainerElectrolyticSeparator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 4, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -121,20 +121,20 @@ public class ContainerElectrolyticSeparator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 31, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 30)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 30, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -142,13 +142,13 @@ public class ContainerElectrolyticSeparator extends Container
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -156,7 +156,7 @@ public class ContainerElectrolyticSeparator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ContainerEnergyCube 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())
|
||||
@@ -77,13 +77,13 @@ public class ContainerEnergyCube extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class ContainerEnergyCube extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public class ContainerEnergyCube extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,14 +119,14 @@ public class ContainerEnergyCube extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public class ContainerEnergyCube extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,27 +144,27 @@ public class ContainerEnergyCube extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -172,7 +172,7 @@ public class ContainerEnergyCube extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -114,7 +114,7 @@ public class ContainerFactory 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())
|
||||
@@ -126,21 +126,21 @@ public class ContainerFactory extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, tileEntity.inventory.size()-1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID != 1 && slotID != 2 && isProperMachine(slotStack) && !slotStack.isItemEqual(tileEntity.getMachineStack()))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 2)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, tileEntity.inventory.size()-1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(tileEntity.recipeType.getAnyRecipe(slotStack, tileEntity.gasTank.getGasType(), tileEntity.infuseStored) != null)
|
||||
@@ -149,13 +149,13 @@ public class ContainerFactory extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 4+tileEntity.tier.processes, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, tileEntity.inventory.size()-1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,14 +165,14 @@ public class ContainerFactory extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, tileEntity.inventory.size()-1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,13 +182,13 @@ public class ContainerFactory extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 4, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, tileEntity.inventory.size()-1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,13 +198,13 @@ public class ContainerFactory extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 4, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, tileEntity.inventory.size()-1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -215,27 +215,27 @@ public class ContainerFactory extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, (slotEnd+27), inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > (slotEnd+26))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, slotEnd, (slotEnd+26), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, slotEnd, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -243,7 +243,7 @@ public class ContainerFactory extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ContainerFilter 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())
|
||||
@@ -64,26 +64,26 @@ public class ContainerFilter extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 27, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 26)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 26, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 0, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -91,7 +91,7 @@ public class ContainerFilter extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ContainerFluidTank 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 ContainerFluidTank extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,27 +85,27 @@ public class ContainerFluidTank extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, 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 ContainerFluidTank extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ContainerFluidicPlenisher 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())
|
||||
@@ -73,13 +73,13 @@ public class ContainerFluidicPlenisher extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,14 +89,14 @@ public class ContainerFluidicPlenisher extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class ContainerFluidicPlenisher extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -112,27 +112,27 @@ public class ContainerFluidicPlenisher 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 ContainerFluidicPlenisher extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+12
-12
@@ -103,7 +103,7 @@ public class ContainerFormulaicAssemblicator 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())
|
||||
@@ -117,13 +117,13 @@ public class ContainerFormulaicAssemblicator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 34, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,13 +133,13 @@ public class ContainerFormulaicAssemblicator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 34, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,14 +147,14 @@ public class ContainerFormulaicAssemblicator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 34, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(tileEntity.formula == null || tileEntity.formula.isIngredient(tileEntity.getWorld(), slotStack))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 20, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -162,27 +162,27 @@ public class ContainerFormulaicAssemblicator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 61, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 60)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 34, 60, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 34, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -190,7 +190,7 @@ public class ContainerFormulaicAssemblicator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ContainerFuelwoodHeater 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())
|
||||
@@ -68,14 +68,14 @@ public class ContainerFuelwoodHeater extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,27 +84,27 @@ public class ContainerFuelwoodHeater 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();
|
||||
@@ -112,7 +112,7 @@ public class ContainerFuelwoodHeater extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ContainerGasTank 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 ContainerGasTank extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ public class ContainerGasTank extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,27 +89,27 @@ public class ContainerGasTank extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -117,7 +117,7 @@ public class ContainerGasTank extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ContainerInductionMatrix 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())
|
||||
@@ -76,13 +76,13 @@ public class ContainerInductionMatrix extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public class ContainerInductionMatrix extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class ContainerInductionMatrix extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,14 +118,14 @@ public class ContainerInductionMatrix extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class ContainerInductionMatrix extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,27 +143,27 @@ public class ContainerInductionMatrix extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -171,7 +171,7 @@ public class ContainerInductionMatrix extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ContainerLaserAmplifier 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())
|
||||
@@ -64,26 +64,26 @@ public class ContainerLaserAmplifier extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 27, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 26)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 26, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 0, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -91,7 +91,7 @@ public class ContainerLaserAmplifier extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ContainerLaserTractorBeam 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,17 +71,17 @@ public class ContainerLaserTractorBeam extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 27, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(!mergeItemStack(slotStack, 0, 27, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -89,7 +89,7 @@ public class ContainerLaserTractorBeam extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+10
-10
@@ -63,7 +63,7 @@ public class ContainerMetallurgicInfuser 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())
|
||||
@@ -77,21 +77,21 @@ public class ContainerMetallurgicInfuser extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(ChargeUtils.canBeDischarged(slotStack))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 4, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(isInputItem(slotStack))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -99,20 +99,20 @@ public class ContainerMetallurgicInfuser extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 31, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 30)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 30, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,13 +120,13 @@ public class ContainerMetallurgicInfuser extends Container
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -134,7 +134,7 @@ public class ContainerMetallurgicInfuser extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ContainerOredictionificator 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())
|
||||
@@ -67,7 +67,7 @@ public class ContainerOredictionificator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(tileEntity.getResult(slotStack) != null)
|
||||
@@ -76,13 +76,13 @@ public class ContainerOredictionificator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,27 +91,27 @@ public class ContainerOredictionificator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -119,7 +119,7 @@ public class ContainerOredictionificator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -98,7 +98,7 @@ public class ContainerPersonalChest extends Container
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotID)
|
||||
{
|
||||
ItemStack stack = null;
|
||||
ItemStack stack = ItemStack.EMPTY;
|
||||
Slot currentSlot = inventorySlots.get(slotID);
|
||||
|
||||
if(currentSlot != null && currentSlot.getHasStack())
|
||||
@@ -110,17 +110,17 @@ public class ContainerPersonalChest extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 54, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(!mergeItemStack(slotStack, 0, 54, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -128,7 +128,7 @@ public class ContainerPersonalChest extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
@@ -146,7 +146,7 @@ public class ContainerPersonalChest extends Container
|
||||
|
||||
if(itemStack != null && MachineType.get(itemStack) == MachineType.PERSONAL_CHEST)
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -52,7 +52,7 @@ public class ContainerQuantumEntangloporter 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())
|
||||
@@ -64,26 +64,26 @@ public class ContainerQuantumEntangloporter extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 27, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 26)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 26, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 0, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -91,7 +91,7 @@ public class ContainerQuantumEntangloporter extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ContainerResistiveHeater 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())
|
||||
@@ -69,14 +69,14 @@ public class ContainerResistiveHeater extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,27 +85,27 @@ public class ContainerResistiveHeater 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 ContainerResistiveHeater extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ContainerRobitInventory 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())
|
||||
@@ -61,17 +61,17 @@ public class ContainerRobitInventory extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 27, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(!mergeItemStack(slotStack, 0, 27, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -79,7 +79,7 @@ public class ContainerRobitInventory extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -51,6 +51,6 @@ public class ContainerRobitMain extends Container
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotID)
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class ContainerRobitSmelting 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())
|
||||
@@ -123,7 +123,7 @@ public class ContainerRobitSmelting extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 3, 39, true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID != 1 && slotID != 0)
|
||||
@@ -132,31 +132,31 @@ public class ContainerRobitSmelting extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(TileEntityFurnace.isItemFuel(slotStack))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID >= 3 && slotID < 30)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 30, 39, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID >= 30 && slotID < 39 && !mergeItemStack(slotStack, 3, 30, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(!mergeItemStack(slotStack, 3, 39, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
@@ -169,7 +169,7 @@ public class ContainerRobitSmelting extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+13
-13
@@ -63,7 +63,7 @@ public class ContainerRotaryCondensentrator 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())
|
||||
@@ -77,13 +77,13 @@ public class ContainerRotaryCondensentrator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 5, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 5, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,13 +93,13 @@ public class ContainerRotaryCondensentrator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 5, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,21 +111,21 @@ public class ContainerRotaryCondensentrator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(((IGasItem)slotStack.getItem()).canReceiveGas(slotStack, tileEntity.gasTank.getGas() != null ? tileEntity.gasTank.getGas().getGas() : null))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 5, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,27 +134,27 @@ public class ContainerRotaryCondensentrator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 32, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 31)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 5, 31, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 5, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -162,7 +162,7 @@ public class ContainerRotaryCondensentrator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ContainerSecurityDesk 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 ContainerSecurityDesk extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,27 +85,27 @@ public class ContainerSecurityDesk extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, 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 ContainerSecurityDesk extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ContainerSeismicVibrator 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())
|
||||
@@ -69,14 +69,14 @@ public class ContainerSeismicVibrator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,27 +85,27 @@ public class ContainerSeismicVibrator 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 ContainerSeismicVibrator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+9
-9
@@ -56,7 +56,7 @@ public class ContainerSolarNeutronActivator 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,21 +72,21 @@ public class ContainerSolarNeutronActivator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(((IGasItem)slotStack.getItem()).canReceiveGas(slotStack, tileEntity.outputTank.getGas() != null ? tileEntity.outputTank.getGas().getGas() : null))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,27 +95,27 @@ public class ContainerSolarNeutronActivator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -123,7 +123,7 @@ public class ContainerSolarNeutronActivator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ContainerTeleporter 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())
|
||||
@@ -69,14 +69,14 @@ public class ContainerTeleporter extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,27 +85,27 @@ public class ContainerTeleporter 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 ContainerTeleporter extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+11
-11
@@ -60,7 +60,7 @@ public class ContainerThermalEvaporationController 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 ContainerThermalEvaporationController extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(FluidContainerUtils.isFluidContainer(slotStack) && FluidUtil.getFluidContained(slotStack) == null)
|
||||
@@ -81,14 +81,14 @@ public class ContainerThermalEvaporationController extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 2)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,14 +98,14 @@ public class ContainerThermalEvaporationController extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,27 +114,27 @@ public class ContainerThermalEvaporationController extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 31, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 30)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 4, 30, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -142,7 +142,7 @@ public class ContainerThermalEvaporationController extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -15,7 +15,7 @@ public class SlotPersonalChest extends Slot
|
||||
@Override
|
||||
public boolean canTakeStack(EntityPlayer player)
|
||||
{
|
||||
if(inventory.getStackInSlot(getSlotIndex()) == null)
|
||||
if(inventory.getStackInSlot(getSlotIndex()).isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public final class ChargeUtils
|
||||
{
|
||||
IInventory inv = (TileEntityContainerBlock)storer;
|
||||
|
||||
if(inv.getStackInSlot(slotID) != null && storer.getEnergy() < storer.getMaxEnergy())
|
||||
if(!inv.getStackInSlot(slotID).isEmpty() && storer.getEnergy() < storer.getMaxEnergy())
|
||||
{
|
||||
if(inv.getStackInSlot(slotID).getItem() instanceof IEnergizedItem)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ public final class ChargeUtils
|
||||
{
|
||||
IInventory inv = (TileEntityContainerBlock)storer;
|
||||
|
||||
if(inv.getStackInSlot(slotID) != null && storer.getEnergy() > 0)
|
||||
if(!inv.getStackInSlot(slotID).isEmpty() && storer.getEnergy() > 0)
|
||||
{
|
||||
if(inv.getStackInSlot(slotID).getItem() instanceof IEnergizedItem)
|
||||
{
|
||||
|
||||
+10
-10
@@ -57,7 +57,7 @@ public class ContainerBioGenerator 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,14 +71,14 @@ public class ContainerBioGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 1)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,13 +88,13 @@ public class ContainerBioGenerator extends Container
|
||||
{
|
||||
if (!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,27 +103,27 @@ public class ContainerBioGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -131,7 +131,7 @@ public class ContainerBioGenerator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+10
-10
@@ -56,7 +56,7 @@ public class ContainerGasGenerator 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,14 +70,14 @@ public class ContainerGasGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 1)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,14 +89,14 @@ public class ContainerGasGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,27 +105,27 @@ public class ContainerGasGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -133,7 +133,7 @@ public class ContainerGasGenerator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+10
-10
@@ -55,7 +55,7 @@ public class ContainerHeatGenerator 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())
|
||||
@@ -69,14 +69,14 @@ public class ContainerHeatGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 1)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,13 +86,13 @@ public class ContainerHeatGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,27 +101,27 @@ public class ContainerHeatGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 29, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID > 28)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 28, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.getCount() == 0)
|
||||
{
|
||||
currentSlot.putStack((ItemStack)null);
|
||||
currentSlot.putStack(ItemStack.EMPTY);
|
||||
}
|
||||
else {
|
||||
currentSlot.onSlotChanged();
|
||||
@@ -129,7 +129,7 @@ public class ContainerHeatGenerator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+8
-8
@@ -54,7 +54,7 @@ public class ContainerNeutronCapture 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())
|
||||
@@ -68,14 +68,14 @@ public class ContainerNeutronCapture extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,27 +84,27 @@ public class ContainerNeutronCapture 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();
|
||||
@@ -112,7 +112,7 @@ public class ContainerNeutronCapture extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+8
-8
@@ -57,7 +57,7 @@ public class ContainerReactorController 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,14 +71,14 @@ public class ContainerReactorController extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,27 +87,27 @@ public class ContainerReactorController 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();
|
||||
@@ -115,7 +115,7 @@ public class ContainerReactorController extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+8
-8
@@ -54,7 +54,7 @@ public class ContainerSolarGenerator 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())
|
||||
@@ -68,14 +68,14 @@ public class ContainerSolarGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,27 +84,27 @@ public class ContainerSolarGenerator 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();
|
||||
@@ -112,7 +112,7 @@ public class ContainerSolarGenerator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
+8
-8
@@ -54,7 +54,7 @@ public class ContainerWindGenerator 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())
|
||||
@@ -68,14 +68,14 @@ public class ContainerWindGenerator extends Container
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(slotID == 0)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, inventorySlots.size(), false))
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,27 +84,27 @@ public class ContainerWindGenerator 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();
|
||||
@@ -112,7 +112,7 @@ public class ContainerWindGenerator extends Container
|
||||
|
||||
if(slotStack.getCount() == stack.getCount())
|
||||
{
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
currentSlot.onTake(player, slotStack);
|
||||
|
||||
Reference in new issue
Block a user