Collections.shuffle(tempPumpList);
//First see if there are any fluid blocks touching the pump - if so, sucks and adds the location to the recurring list
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
{
Coord4D wrapper = Coord4D.get(this).getFromSide(orientation);
if(MekanismUtils.isFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord))
{
if(fluidTank.getFluid() == null || MekanismUtils.getFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord).isFluidEqual(fluidTank.getFluid()))
{
if(take)
{
setEnergy(getEnergy() - Mekanism.electricPumpUsage);
recurringNodes.add(wrapper.clone());
fluidTank.fill(MekanismUtils.getFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord), true);
worldObj.setBlockToAir(wrapper.xCoord, wrapper.yCoord, wrapper.zCoord);
}
return true;
}
}
}
//Finally, go over the recurring list of nodes and see if there is a fluid block available to suck - if not, will iterate around the recurring block, attempt to suck,
//and then add the adjacent block to the recurring list
for(Coord4D wrapper : tempPumpList)
{
if(MekanismUtils.isFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord))
{
if(fluidTank.getFluid() == null || MekanismUtils.getFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord).isFluidEqual(fluidTank.getFluid()))
{
if(take)
{
setEnergy(getEnergy() - Mekanism.electricPumpUsage);
fluidTank.fill(MekanismUtils.getFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord), true);
worldObj.setBlockToAir(wrapper.xCoord, wrapper.yCoord, wrapper.zCoord);
}
return true;
}
}
//Add all the blocks surrounding this recurring node to the recurring node list
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
{
Coord4D side = wrapper.getFromSide(orientation);
if(Coord4D.get(this).distanceTo(side) <= 80)
{
if(MekanismUtils.isFluid(worldObj, side.xCoord, side.yCoord, side.zCoord))
{