Percentage based drop prize on Mob entity kill
/**
 * Gets a random drop for NPC by random percentage
 * @param npc       The NPC id
 * @return  The drop details
 */
public Drop getRandomDrop(int npc) {
    List&lt;Drop&gt; drops = this.drops.get(npc);

    float roll = random.nextFloat();

    for ( Drop d : drops ) {
        float chance = d.getChance();
        if ( roll &lt; chance ) {
            return d;
        }

        roll -= chance;
    }

    // if no drop was selected, return an empty drop
    return Drop::EMPTY_DROP;
}


This is how I would write it.  Note that I changed the random variable to be called roll like a roll of a die.  For each drop, it compares the roll to the chance of getting that drop.  If the roll is less than the drop rate, then that drop is the loot.  Otherwise, reduce the roll by the drop chance (which makes subsequent drops more likely).  

This method assumes that the drop chances in the XML add up to 1 or that there is an implicit chance of an empty drop.  If you want to always drop and have drop chances that don't add up to 1, you can normalize the rate.  

float totalChance = 0.0;
for ( Drop d : drops ) {
    totalChance += d.getChance();
}


and then in the current loop 

        float chance = d.getChance() / totalChance;


You may still have to do some adjustment to get the rounding right in the case of a maximum random.nextFloat result.  

You would set the EMPTY_DROP to be a static class constant representing no loot.  Note that this would also be the drop if the NPC's section was missing from the XML file.