acutallyAdded = randomFilter(pMatter.mass); currentLevel += acutallyAdded; currentBiomassItems.add(pMatter); myLogger.debug("added = " + pMatter.mass + "with currentLevel @ " + currentLevel); return acutallyAdded;
    public float addBioMatter(BioMatter pMatter) {        if (pMatter.mass <= 0)            return 0f;        myLogger.debug("pMatter.mass trying to be added=" + pMatter.mass);        float acutallyAdded = 0f;        if ((pMatter.mass + currentLevel) > currentCapacity) {            //adding more than currentCapacity            acutallyAdded = currentCapacity - currentLevel;            currentLevel += acutallyAdded;            overflow += (pMatter.mass - acutallyAdded);            float fractionOfOriginal = acutallyAdded / pMatter.mass;            BioMatter newBioMatter = new BioMatter(acutallyAdded,                    pMatter.inedibleFraction, pMatter.edibleWaterContent                            * fractionOfOriginal, pMatter.inedibleWaterContent                            * fractionOfOriginal, pMatter.type);            currentBiomassItems.add(newBioMatter);            myLogger.debug("added = " + newBioMatter.mass                    + " with currentLevel @ " + currentLevel);            return acutallyAdded;        } else {            acutallyAdded = randomFilter(pMatter.mass);            currentLevel += acutallyAdded;            currentBiomassItems.add(pMatter);            myLogger.debug("added = " + pMatter.mass + "with currentLevel @ "                    + currentLevel);            return acutallyAdded;        }    }